SubFinder
SubFinder is a script and a Python module that is used to find the directories of a website with wordlists.
SubFinder has two main functions one for listing directories of a website on Windows that does not have an anonymous mode and one for listing directories of a website on Linux that has an anonymous mode.
The modules in the requirements file must be installed
You can install them with this command : pip install -r requirements.txt
Linux version
To use the linux version you must install tor with the following command
sudo apt-get install tor
Configuration
tor --hash-password yourpassword
- Copy the result
- With linux terminal run this command
sudo python3 subfinder.py -tp -p yourpassword -h yourhashedpassword
Terminal commands
python3 subfinder.py -find -u
https://github.com/
-w dl.txt [-f] [-e .php]
--> List the directories of a website with method full
python3 subfinder.py -scan -i 0.0.0.0 [-r 1-9000] [-t 0.2] [-tn 20]
--> List the open ports between 1 and 9000 on host 0.0.0.0 with a timeout of 0.2 and 20 threads
python3 subfinder.py -ip -u google.com
--> Get the server ip of the web page
python3 subfinder.py -dns -u
https://google.com/
-w dl.txt [-f]
--> List the subdomains of a website with method full
SubFinder Python Module
First step import the module
import subfinder
or from subfinder import SubFinder
Windows commands
Anonymous mode : No
Linux commands
Anonymous mode : Yes
The 'full' method is used to display all requests.
Host discovery
Ports scan
Use this command to scan the ports of a machine
SubFinder.scan_ports('ip', 'search_range', timeout, thread_number)
Ex : SubFinder.scan_ports('0.0.0.0.0', '1-8000', 1, 20)
Get ip
Use this command to retrieve the server ip of a link :
SubFinder.get_host_ip('mysite.com')
Specials commands
The special commands are used to retrieve the list of valid site directories without displaying them.
Specials commands for Windows
Anonymous mode : No
r = SubFinder.windows_search_NP('https://mysite.com', 'mylist.txt', 0.5, '.log')
print(r) #This line will display the list of valid directories once the search is complete
Specials commands for Linux
Anonymous mode : Yes
r = SubFinder.linux_search_NP('https://mysite.com', 'mylist.txt', 0.5, '.log')
print(r) #This line will display the list of valid directories once the search is complete