infinite-omicron / pentesting-vm

Penetration Testing Virtual Machine
GNU General Public License v3.0
2 stars 2 forks source link

FileNotFoundError: [Errno 2] No such file or directory: '/etc/theHarvester/proxies.yaml' #4

Closed oxr463 closed 2 years ago

oxr463 commented 3 years ago
theHarvester 
Traceback (most recent call last):
  File "/opt/theharvester/theHarvester/lib/core.py", line 74, in proxy_list
    with open('/etc/theHarvester/proxies.yaml', 'r') as proxy_file:
FileNotFoundError: [Errno 2] No such file or directory: '/etc/theHarvester/proxies.yaml'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/theharvester/theHarvester/lib/core.py", line 78, in proxy_list
    with open('/usr/local/etc/theHarvester/proxies.yaml', 'r') as proxy_file:
FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/etc/theHarvester/proxies.yaml'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/theHarvester", line 7, in <module>
    from theHarvester import __main__
  File "/opt/theharvester/theHarvester/__main__.py", line 4, in <module>
    from theHarvester.discovery import dnssearch, takeover, shodansearch
  File "/opt/theharvester/theHarvester/discovery/takeover.py", line 1, in <module>
    from theHarvester.lib.core import *
  File "/opt/theharvester/theHarvester/lib/core.py", line 377, in <module>
    class AsyncFetcher:
  File "/opt/theharvester/theHarvester/lib/core.py", line 378, in AsyncFetcher
    proxy_list = Core.proxy_list()
  File "/opt/theharvester/theHarvester/lib/core.py", line 81, in proxy_list
    with open('proxies.yaml', 'r') as proxy_file:
FileNotFoundError: [Errno 2] No such file or directory: 'proxies.yaml'
oxr463 commented 3 years ago
sudo su
mkdir /etc/theHarvester
touch /etc/theHarvester/proxies.yaml
exit
theHarvester
Traceback (most recent call last):
  File "/usr/local/bin/theHarvester", line 7, in <module>
    from theHarvester import __main__
  File "/opt/theharvester/theHarvester/__main__.py", line 4, in <module>
    from theHarvester.discovery import dnssearch, takeover, shodansearch
  File "/opt/theharvester/theHarvester/discovery/takeover.py", line 1, in <module>
    from theHarvester.lib.core import *
  File "/opt/theharvester/theHarvester/lib/core.py", line 377, in <module>
    class AsyncFetcher:
  File "/opt/theharvester/theHarvester/lib/core.py", line 378, in AsyncFetcher
    proxy_list = Core.proxy_list()
  File "/opt/theharvester/theHarvester/lib/core.py", line 83, in proxy_list
    http_list = [f'http://{proxy}' for proxy in keys['http']] if keys['http'] is not None else []
TypeError: 'NoneType' object is not subscriptable
oxr463 commented 3 years ago

Bug: https://github.com/laramies/theHarvester/issues/776

outzhu commented 2 years ago

What command did you use to get this?

oxr463 commented 2 years ago

What command did you use to get this?

theHarvester
oxr463 commented 2 years ago

This is the output from the Docker image:

theHarvester 

*******************************************************************
*  _   _                                            _             *
* | |_| |__   ___    /\  /\__ _ _ ____   _____  ___| |_ ___ _ __  *
* | __|  _ \ / _ \  / /_/ / _` | '__\ \ / / _ \/ __| __/ _ \ '__| *
* | |_| | | |  __/ / __  / (_| | |   \ V /  __/\__ \ ||  __/ |    *
*  \__|_| |_|\___| \/ /_/ \__,_|_|    \_/ \___||___/\__\___|_|    *
*                                                                 *
* theHarvester 4.0.3                                              *
* Coded by Christian Martorella                                   *
* Edge-Security Research                                          *
* cmartorella@edge-security.com                                   *
*                                                                 *
******************************************************************* 

usage: theHarvester [-h] -d DOMAIN [-l LIMIT] [-S START] [-g] [-p] [-s]
                    [--screenshot SCREENSHOT] [-v] [-e DNS_SERVER] [-t DNS_TLD] [-r] [-n]
                    [-c] [-f FILENAME] [-b SOURCE]
theHarvester: error: the following arguments are required: -d/--domain
outzhu commented 2 years ago

Looks like it's fixed by using the correct installation option.

Can I closed this issue?

oxr463 commented 2 years ago

Looks like it's fixed by using the correct installation option.

Awesome!

Can I closed this issue?

Yes, please.