Open In App

How to Find Hidden Web Directories with Dirsearch

Last Updated : 28 Jul, 2021
Improve
Improve
Like Article
Like
Save
Share
Report

Dirsearch tool is a Python language-based tool, which is command-line only. Dirsearch lights when it comes to recursive scanning, so for every directory it identifies, it will go back through and crawl the directory for some additional directories. Dirsearch tool is an advanced command-line tool designed to brute-force directories and files in web servers or web path scanners. As Dirsearch is an advanced tool, it allows hackers to perform a complex web directories discovery,  with a customized wordlist, impressive performance, speed, high accuracy, advanced correction, and modern brute-force techniques with relevant outputs.

Features of Dirsearch Tool:

  1. Dirsearch perform Recursive brute forcing
  2. Dirsearch perform Target enumeration from an IP range
  3. Dirsearch perform Sub-directories brute forcing
  4. Dirsearch is Easy and simple to use
  5. Dirsearch is Multithreading
  6. Dirsearch has Support for every HTTP method
  7. Dirsearch has Quiet mode
  8. Dirsearch has Debug mode

Note: Make Sure You have Python Installed on your System, as this is python-based tool.

Installation of Dirsearch Tool in Kali Linux:

Step 1: Fire up your Kali Linux terminal and move to Desktop using the following command.

cd Desktop

Step 2:  You are on Desktop now create a new directory called Dirsearch using the following command. In this directory, we will complete the installation of the Dirsearch tool.

mkdir Dirsearch
cd Dirsearch

Step 3: Now you have to install the tool. You have to clone the tool from Github.

git clone https://github.com/maurosoria/dirsearch.git

Step 4: The tool has been downloaded successfully in the dirsearch directory. Now list out the contents of the tool by using the below command.

ls

Step 5: You can observe that there is a new directory created of the dirsearch tool that has been generated while we were installing the tool.Now move to that directory using the below command:

cd dirsearch

Step 6: Download the required packages for running the tool, use the following command.

pip3 install -r requirements.txt

Step 7: Now we are done with our installation, Use the below command to view the help (gives better understanding of tool) index of the tool.

python3 dirsearch.py --help

Working with Dirsearch Tool:

Example 1: Simple Usage 

python3 dirsearch.py -u https://example.com

Extensions (php,html,js):

python3 dirsearch.py -e php,html,js -u https://example.com

Using Wordlist:

python3 dirsearch.py -e php,html,js -u https://example.com -w /usr/share/wordlists/dirb/common.txt

Example 2: Recursive Scanning

Simple Recursive Scan:

python3 dirsearch.py -e php,html,js -u https://geeksforgeeks.org -r

Max Recursion Depth:

python3 dirsearch.py -e php,html,js -u https://geeksforgeeks.org -r -R 3

Example 3: Threads

Using Threads:

python3 dirsearch.py -e php,htm,js,bak,zip,tgz,txt -u https://geeksforgeeks.org -t 30

Example 4: Prefixes / Suffixes

Prefixes:

python3 dirsearch.py -e php -u https://geeksforgeeks.org –prefixes .,admin,_,~

Suffixes:

python3 dirsearch.py -e php -u https://geeksforgeeks.org –suffixes ~,/

Example 5: Exclude extensions

Excluding Extensions:

python3 dirsearch.py -e asp,aspx,htm,js -u https://geeksforgeeks.org -X php,jsp,jspx

Example 6: Filters

python3 dirsearch.py -e php,html,js -u https://geeksforgeeks.org -i 200,204,400,403 -x 500,502,429

Example 7: Scan sub-directories

python3 dirsearch.py -e php,html,js -u https://geeksforgeeks.org –subdirs admin/,folder/,/

Example 8:  Using Proxy Server.

python3 dirsearch.py -e php,html,js -u https://geeksforgeeks.org –proxy 127.0.0.1:8080

Example 9: Saving Results

python3 dirsearch.py -e php -u https://geeksforgeeks.org -o report.txt



Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads