DirFuzz is a powerful and flexible tool designed for directory brute-forcing on web servers. It helps you discover hidden files and directories by utilizing customizable wordlists and various HTTP request options.
- Asynchronous Requests: Efficiently handles multiple requests using
aiohttp. - Customizable Wordlists: Load multiple wordlists and specify file extensions to test.
- Flexible HTTP Options: Choose between GET and POST methods, set custom headers, and manage request timeouts.
- Content Validation: Check response content for specific keywords and filter by content type.
- Result Output: Save results in JSON, CSV, or plain text formats.
- Progress Tracking: Visual feedback on progress using
tqdm.
To use DirFuzz, ensure you have Python 3.7 or higher installed. You can install the required dependencies using pip:
pip install aiohttp beautifulsoup4 tqdm chardet | Else you can install them by `setup.py` fileTo get started with DirFuzz, you can clone the repository to your local machine using the following command:
git clone https://github.com/CYBER-4RMY/DIR-Fuzz.git
cd DIR-FuzzTo run DirFuzz, use the following command structure:
python3 DIR-Fuzz.py <target> <wordlists> [options]<target>: The target URL (e.g.,https://example.com).<wordlists>: One or more paths to the wordlist file(s) (space-separated).
-t,--threads: Number of concurrent threads (default: 10).-o,--output: Output file to save results (supports.json,.csv, or plain text).-H,--header: Custom HTTP headers (e.g.,User-Agent: my-agent).-T,--timeout: Request timeout in seconds (default: 5).-e,--extensions: File extensions to append (e.g.,php,html).-r,--follow-redirects: Follow HTTP redirects.-d,--delay: Delay between requests in seconds (default: 0).-s,--status-codes: HTTP status codes to filter (e.g.,200,301) (default:[200, 301, 302]).-c,--check-content: Check response content for specific keywords.-k,--keywords: Keywords to check in the response content (e.g.,Welcome,Index of).-C,--content-type: Content-Type to filter responses (e.g.,text/html).--min-size: Minimum response size to consider (in bytes).--max-size: Maximum response size to consider (in bytes).-m,--method: HTTP method to use for requests (GETorPOST, default:GET).
Here are a few examples of how to run the tool:
-
Basic Usage:
python3 dirfuzz.py https://example.com wordlist.txt
-
Using Multiple Wordlists:
python3 dirfuzz.py https://example.com wordlist1.txt wordlist2.txt
-
Specifying Output Format:
python3 dirfuzz.py https://example.com wordlist.txt -o results.json
-
Using Custom Headers:
python3 dirfuzz.py https://example.com wordlist.txt -H "User-Agent: Mozilla/5.0" -H "Accept: text/html"
-
Setting Extensions and Status Codes:
python3 dirfuzz.py https://example.com wordlist.txt -e php -e html -s 200 -s 403
-
Adding Delay Between Requests:
python3 dirfuzz.py https://example.com wordlist.txt -d 1
The results will be saved in the specified output file (if provided) or printed to the console. The output will include the found URLs, their HTTP status codes, content lengths, and any other specified details.
This command will scan https://example.com using wordlist.txt, appending .php and .html extensions, checking for the keyword "Welcome" in responses, and filtering for text/html content type. Results will be saved in results.json.
DirFuzz logs its activity to dirfuzz.log. You can monitor this file for detailed information about the scanning process, including found URLs and any errors encountered.
Contributions are welcome! If you have suggestions for improvements or new features, feel free to open an issue or submit a pull request. Please ensure your code adheres to the project's coding standards.
This project is licensed under the MIT License. See the LICENSE file for details.
- aiohttp for asynchronous HTTP requests.
- BeautifulSoup for parsing HTML.
- tqdm for progress bar functionality.
- chardet for character encoding detection.
