aboul3la / Sublist3r

Fast subdomains enumeration tool for penetration testers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

error

knowthetech opened this issue · comments

HTTPSConnectionPool(host='www.virustotal.com', port=443): Max retries exceeded with url: /ui/domains/gitbook.com/subdomains (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f60082a8b50>: Failed to establish a new connection: [Errno -2] Name or service not known'))
Process Virustotal-9:
Traceback (most recent call last):
File "/usr/lib/python3.9/multiprocessing/process.py", line 315, in _bootstrap
self.run()
File "/home/gdattacker/Desktop/tools/Sublist3r/sublist3r.py", line 269, in run
domain_list = self.enumerate()
File "/home/gdattacker/Desktop/tools/Sublist3r/sublist3r.py", line 703, in enumerate
resp = json.loads(resp)
File "/usr/lib/python3.9/json/init.py", line 339, in loads
raise TypeError(f'the JSON object must be str, bytes or bytearray, '
TypeError: the JSON object must be str, bytes or bytearray, not int
/home/gdattacker/Desktop/tools/Sublist3r/sublist3r.py:617: DeprecationWarning: please use dns.resolver.Resolver.resolve() instead
ip = Resolver.query(host, 'A')[0].to_text()

I ran into this issue as well and I don't know why it is happening, but I was able to get around it pretty easily.

On a linux distro, I ran the sublist3r.py file directly from it's source with python. That worked.

On Linux I did:
Update the file index to find the newly added packages
sudo updatedb
Find where the sublist3r.py was installed
locate sublist3r.py
Execute script from it's directory
python /path/to/file/sublist3r.py -d example.com

Mine was located in '/usr/lib/python3/dist-packages'.

Now I don't get the script-ending error output, but I just get a warning saying 'Virustotal now is probably blocking our requests'
which is fine by me. Script runs fine. Anyways, hope this helps - I was about to give up on sublist3r too but gave this a try!

sublist3r

--EDIT--

When I run the program with
python3
it doesn't work and I get the same error.
I had been running it with just the command
python
to get it to work - and it does. But I had created the python command link myself.

My python command is actually linked to my python3 command which is linked to my python3.9 within my
'/usr/bin' directory.

But only
python /path/to/file/sublist3r.py -d example.com
works. Using python3 and python3.9 commands don't work even though python stems from the python3.9 executable.

I don't really know what's happening here - but python 2.7 used to be run with just the python command so I think it might
have something to do with that. Maybe there are some remnants of python2.7 still living on my distro and that is what is letting only this command work? I have a hunch that if I used 2.7 to run sublist3r that I wouldn't have any issues.

Hope someone else tries this to see if it works or if this solution is relative only to my build.