aboul3la / Sublist3r

Fast subdomains enumeration tool for penetration testers
GNU General Public License v2.0
9.73k stars 2.1k forks source link

Sublist3r.py end with error #281

Open jaswantprotech opened 3 years ago

jaswantprotech commented 3 years ago

Dear all,

Please help me to resolve below error, i tried lost of things around permission and two time rebuild the server but this issue comes in some time. please let me help to get permanent solution for below error while running sublist3r.py

Traceback (most recent call last): File "/usr/lib/python3.8/multiprocessing/process.py", line 315, in _bootstrap self.run() File "/usr/lib/python3.8/multiprocessing/process.py", line 108, in run self._target(*self._args, **self._kwargs) File "/usr/lib/python3.8/multiprocessing/managers.py", line 608, in _run_server server = cls._Server(registry, address, authkey, serializer) File "/usr/lib/python3.8/multiprocessing/managers.py", line 154, in init self.listener = Listener(address=address, backlog=16) File "/usr/lib/python3.8/multiprocessing/connection.py", line 448, in init self._listener = SocketListener(address, family, backlog) File "/usr/lib/python3.8/multiprocessing/connection.py", line 591, in init self._socket.bind(address) PermissionError: [Errno 13] Permission denied

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/lib/python3.8/multiprocessing/util.py", line 300, in _run_finalizers finalizer() File "/usr/lib/python3.8/multiprocessing/util.py", line 224, in call res = self._callback(*self._args, *self._kwargs) File "/usr/lib/python3.8/multiprocessing/util.py", line 133, in _remove_temp_dir rmtree(tempdir) File "/usr/lib/python3.8/shutil.py", line 711, in rmtree onerror(os.lstat, path, sys.exc_info()) File "/usr/lib/python3.8/shutil.py", line 709, in rmtree fd = os.open(path, os.O_RDONLY) PermissionError: [Errno 13] Permission denied: '/tmp/pymp-bc3d5yz6' Process SyncManager-1: Traceback (most recent call last): File "/usr/lib/python3.8/multiprocessing/process.py", line 315, in _bootstrap self.run() File "/usr/lib/python3.8/multiprocessing/process.py", line 108, in run self._target(self._args, **self._kwargs) File "/usr/lib/python3.8/multiprocessing/managers.py", line 608, in _run_server server = cls._Server(registry, address, authkey, serializer) File "/usr/lib/python3.8/multiprocessing/managers.py", line 154, in init self.listener = Listener(address=address, backlog=16) File "/usr/lib/python3.8/multiprocessing/connection.py", line 448, in init self._listener = SocketListener(address, family, backlog) File "/usr/lib/python3.8/multiprocessing/connection.py", line 591, in init self._socket.bind(address) PermissionError: [Errno 13] Permission denied Traceback (most recent call last): File "sublist3r.py", line 1031, in res = main(domain, threads, savefile, ports, silent=False, verbose=verbose, enable_bruteforce=enable_bruteforce, engines=engines, find_ip=find_ip) File "sublist3r.py", line 902, in main subdomains_queue = multiprocessing.Manager().list() File "/usr/lib/python3.8/multiprocessing/context.py", line 57, in Manager m.start() File "/usr/lib/python3.8/multiprocessing/managers.py", line 583, in start self._address = reader.recv() File "/usr/lib/python3.8/multiprocessing/connection.py", line 250, in recv buf = self._recv_bytes() File "/usr/lib/python3.8/multiprocessing/connection.py", line 414, in _recv_bytes buf = self._recv(4) File "/usr/lib/python3.8/multiprocessing/connection.py", line 383, in _recv raise EOFError EOFError

RoninNakomoto commented 3 years ago

@jaswantprotech

Hello. You are receiving these types of errors because you are not running the tool properly under python. Please follow the below guide:

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.