directory2wordlist is a Python tool designed for penetration testers and security professionals. It scans a specified directory and generates a custom wordlist based on the directory structure and file names. This wordlist can be used to enumerate targets by checking for the presence of directories and files on a web server or other target systems.
- Recursively list all directories and files within a specified directory.
- Output results to a file (
paths.txtby default). - Generate custom wordlists for directory and file enumeration.
-
Clone the repository:
git clone https://github.com/xonoxitron/directory2wordlist.git
-
Navigate to the project directory:
cd directory2wordlist
Note: Python 3.6 or higher is required.
-
To list the contents of a directory and save the output to
paths.txt:python directory2wordlist.py <directory>
Replace
<directory>with the path to the directory you want to list. -
The results will be saved in
paths.txtwithin the current directory. -
Example:
python directory2wordlist.py /path/to/directory
Output:
subdir1/ subdir1/file1.txt subdir2/ subdir2/file2.txt
This project is licensed under the MIT License - see the LICENSE file for details.