Sublist3r icon indicating copy to clipboard operation
Sublist3r copied to clipboard

i have this error when i use sublist3r.py

Open rnarendranath opened this issue 4 years ago • 11 comments

Traceback (most recent call last): File "sublist3r.py", line 21, in from subbrute import subbrute File "/home/kali/Downloads/Sublist3r-master/subbrute/subbrute.py", line 18, in import dns.resolver ImportError: No module named dns.resolver

rnarendranath avatar Oct 06 '20 17:10 rnarendranath

Try using python 3. Also, ensure prerequisites are installed via pip as shown in the install instructions.

jr1221 avatar Oct 06 '20 17:10 jr1221

I have the same issue and I am using python3 latest release can someone resolve that issue?

parvbarot avatar Oct 08 '20 12:10 parvbarot

Same issue with me 🙁

mrhydra-np avatar Oct 17 '20 10:10 mrhydra-np

Try using python 3. Also, ensure prerequisites are installed via pip as shown in the install instructions.

How can i switch between python versions to run knock🙂 Just a newbie sorry 😐

mrhydra-np avatar Oct 17 '20 10:10 mrhydra-np

Use the command python3 rather than python.

jr1221 avatar Oct 17 '20 12:10 jr1221

well you will get this error because dns.resolver is located probably in "/lib/python3/dist-packages" and while running sublist3er you are using python 2.7 version. You can try "python3 sublist3r.py -d example.com" . If it doesn't work you may have to switch to python version 3 . You can do below to switch : To change a python version you simply create an alias within user's home directory. Open ~/.bashrc file and add new alias to change your default python executable: alias python='/usr/bin/python3.4' Once you make the above change, save the file and re-login or source your .bashrc file: $ . ~/.bashrc

charlieromeo avatar Oct 25 '20 16:10 charlieromeo

@charlieromeo It did work. But i would request you explain better about that aspect of dns.resolver is located in /lib/python3/dist-packages and how the python 3 and python 2.7 bring that error.

DANSHORTIE avatar Dec 29 '20 18:12 DANSHORTIE

@DANSHORTIE

Under linux, use a python3 virtual environment specific to sublist3r. It should be a default action that you do for each and every single Python script.

You will be running the tool within this virtual python environment and not the system wide python installation. All python commands you run once the virtual environment is activated are specific to the virtual environment. Changes you make to a virtual environment, including installing dependencies only affect the virtual environment and do not affect the system wide installation of Python which usually ends up breaking python.

Assuming you are going to keep your python virtual environments in a directory called environments under your home directory, please proceed as follows:

1- $ python3 -m venv ~/environments/sublist3r      // create a python version 3 virtual environment for sublist3r
2- $ source ~/environments/sublist3r/bin/activate  // activate sublist3r python environment. 
3- $ python -m pip install --upgrade pip              // update pip inside virtual env.
4- $ cd ~/sublist3r/                                         // switch to your sublist3r folder.
5- $ pip install -r requirements.txt                    // install sublist3r script dependencies.
6- $ python sublist3r.py -d domain.com               // run sublist3r.py from within activated environment
7- $ deactivate                                            // deactivate environment once done the script run.

note: do not use sudo.

Repeat steps 2,6 and 7 every time you wish to run sublist3r.

This should solve this specific issue.

RoninNakomoto avatar Jan 24 '21 14:01 RoninNakomoto

This single command solves it for me:

pip3 install dnspython==1.15.0

Enjoy Huntin

AbdulConsole avatar Mar 27 '21 17:03 AbdulConsole

you can also try : python3 ./sublist3r.py

Tanjib-Rafi avatar Dec 27 '21 13:12 Tanjib-Rafi

thanks a lot brother

Mrchand09 avatar Aug 13 '22 05:08 Mrchand09