The Directory and Subdomain Scanner is a versatile Python tool designed to facilitate the discovery of subdomains and directories within a given target domain. By leveraging custom or predefined wordlists, this tool enables more focused and efficient scanning. It features a user-friendly menu interface for easy interaction and provides detailed results.
- Subdomain Scanning: Identify subdomains of a specified target domain using either predefined or custom wordlists.
- Directory Scanning: Explore directories within discovered subdomains to find hidden resources.
- Custom Wordlists: Use your own wordlists for scanning subdomains and directories by specifying file paths.
- Python 3.x
requestslibrary
-
Clone the Repository
Begin by cloning the repository to your local machine:
git clone https://github.com/AbdullahZeynel/Subdomain-Directory-Scanner_Python.git cd Subdomain-Directory-Scanner_Python -
Set Up a Virtual Environment (Optional but Recommended)
Create and activate a virtual environment to manage dependencies:
python -m venv myEnv source myEnv/bin/activate # On Windows use `myEnv\Scripts\activate`
-
Install Dependencies
Install the required Python packages:
pip install -r requirements.txt
-
Prepare Your Wordlists
The tool uses two primary wordlists:
subdomains10000.txt: A list of potential subdomains.common.txt: A list of common directories.
You can use these default wordlists or provide your own by placing them in the same directory as the script or specifying their full paths.
-
Run the Scanner
Execute the script using:
python subdomain_directory_scanner.py
-
Interact with the Menu
The script displays a menu with the following options:
- 1: Scan a target domain for subdomains and directories.
- 2: Customize wordlists (provide paths to your own subdomain and directory wordlists).
- 3: Exit the tool.
Follow the prompts to perform your desired actions.
Here’s a brief example of using the tool:
- Choose option 1 from the main menu to start scanning a domain.
- Enter a target domain, such as
example.com. - The tool will first scan for subdomains using the
subdomains10000.txtlist. - Discovered subdomains will then be checked for directories using the
common.txtlist. - Results are saved in
founded_subs.txt(subdomains) andfound_urls.txt(directories).
- Changing Wordlists: Choose option 2 from the main menu to provide paths to your custom subdomain and directory wordlists. Ensure the file paths are valid and end with
.txt. - File Path Validity: The tool verifies that provided paths exist and are text files.
Contributions are welcome! If you have suggestions or improvements, please fork the repository and submit a pull request with your changes.
- The
requestslibrary for handling HTTP requests. - GitHub for hosting the repository.
- The creators of the wordlists: