View Issue Details

IDProjectCategoryView StatusLast Update
0009444Kali LinuxKali Package Bugpublic2025-12-15 17:17
Reportertweeks2 Assigned To 
PrioritynormalSeverityminorReproducibilityhave not tried
Status newResolutionopen 
Summary0009444: emailharvester (apt installed) is buggy w/new Python
Description

Since the latest Kali release (2025.01-04, and all rolling updates since), the new apt install of TheHarvester.py (with apt installed "emailharvester" wrapper script (/usr/bin/emailharvester), the running of the program, even with just a "-h" invocation, throws python syntax errors:

$ emailharvester -h
/usr/share/emailharvester/./EmailHarvester.py:78: SyntaxWarning: invalid escape sequence '\-'
  '[a-zA-Z0-9.\-_+#~!$&\',;=:]+' +$ emailharvester -d vt.edu -x 'http://proxy.cyberservices.internal:80' -s /tmp/vt-email.txt
/usr/share/emailharvester/./EmailHarvester.py:78: SyntaxWarning: invalid escape sequence '\-'
  '[a-zA-Z0-9.\-_+#~!$&\',;=:]+' +
/usr/share/emailharvester/./EmailHarvester.py:201: SyntaxWarning: invalid escape sequence '\ '
  parser = argparse.ArgumentParser(description="""
[+] User-Agent in use: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.1
[+] Proxy server in use: http://proxy.cyberservices.internal:80
[+] Searching everywhere
[+] Searching in Youtube
[+] Searching in Yahoo + Youtube: 101 results
[+] Searching in Bing + Youtube: 50 results
[+] Searching in Bing + Youtube: 100 results
[+] Searching in Google + Youtube: 100 results

/usr/share/emailharvester/./EmailHarvester.py:201: SyntaxWarning: invalid escape sequence '\ '
  parser = argparse.ArgumentParser(description="""
usage: EmailHarvester.py [-h] [-d DOMAIN] [-s FILE] [-e ENGINE] [-l LIMIT] [-u USER-AGENT] [-x PROXY]
                         [--noprint] [-r EXCLUDED_PLUGINS] [-p]

 _____                   _  _   _   _                                _              
|  ___|                 (_)| | | | | |                              | |             
| |__  _ __ ___    __ _  _ | | | |_| |  __ _  _ __ __   __ ___  ___ | |_  ___  _ __ 
|  __|| '_ ` _ \  / _` || || | |  _  | / _` || '__|\ \ / // _ \/ __|| __|/ _ \| '__|
| |___| | | | | || (_| || || | | | | || (_| || |    \ V /|  __/\__ \| |_|  __/| |   
\____/|_| |_| |_| \__,_||_||_| \_| |_/ \__,_||_|     \_/  \___||___/ \__|\___||_| 

    A tool to retrieve Domain email addresses from Search Engines | @maldevel
                                Version: 1.3.2

options:
  -h, --help            show this help message and exit
  -d, --domain DOMAIN   Domain to search.
  -s, --save FILE       Save the results into a TXT and XML file (both).
  -e, --engine ENGINE   Select search engine plugin(eg. '-e google').
  -l, --limit LIMIT     Limit the number of results.
  -u, --user-agent USER-AGENT
                        Set the User-Agent request header.
  -x, --proxy PROXY     Setup proxy server (eg. '-x http://127.0.0.1:8080')
  --noprint             EmailHarvester will print discovered emails to terminal. It is possible to tell EmailHarvester not to print results to terminal with this option.
  -r, --exclude EXCLUDED_PLUGINS
                        Plugins to exclude when you choose 'all' for search engine (eg. '-r google,twitter')
  -p, --list-plugins    List all available plugins.

Executing an example domain email search (that used to work) also now throws errors, and does not harvest anything (using public/non-key sources).
'''
$ emailharvester -d vt.edu -x 'http://proxy.cyberservices.internal:80' -s /tmp/vt-email.txt
/usr/share/emailharvester/./EmailHarvester.py:78: SyntaxWarning: invalid escape sequence '-'
'[a-zA-Z0-9.-_+#~!$&\',;=:]+' +
/usr/share/emailharvester/./EmailHarvester.py:201: SyntaxWarning: invalid escape sequence '\ '
parser = argparse.ArgumentParser(description="""
[+] User-Agent in use: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.1
[+] Proxy server in use: http://proxy.cyberservices.internal:80
[+] Searching everywhere
[+] Searching in Youtube
[+] Searching in Yahoo + Youtube: 101 results
[+] Searching in Bing + Youtube: 50 results
[+] Searching in Bing + Youtube: 100 results
[+] Searching in Google + Youtube: 100 results
...
[+] Searching in ASK: 20 results
[+] Searching in ASK: 30 results
[+] Searching in ASK: 40 results
[+] Searching in ASK: 50 results
Traceback (most recent call last):
File "/usr/share/emailharvester/./EmailHarvester.py", line 279, in <module>
all_emails += plugins[search_engine]['search'](domain, limit)


  File "/usr/share/emailharvester/plugins/ask.py", line 87, in search
    search.process()
    ~~~~~~~~~~~~~~^^
  File "/usr/share/emailharvester/plugins/ask.py", line 73, in process
    self.do_search()
    ~~~~~~~~~~~~~~^^
  File "/usr/share/emailharvester/plugins/ask.py", line 68, in do_search
    self.results = r.content.decode(r.encoding)
                   ~~~~~~~~~~~~~~~~^^^^^^^^^^^^
TypeError: decode() argument 'encoding' must be str, not None
'''

Is someone looking at fixing this?

T.Weeks

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2025-12-15 17:15 tweeks2 New Issue