Subdir is a Python script for enumerating subdomains using the SecurityTrails API. It allows users to quickly discover subdomains associated with a given domain by leveraging the SecurityTrails API.
-
Prerequisites: Ensure you have Python installed on your system.
-
Permission and Installation:
-
Make the script executable:
chmod +x subdir
-
Move the script to the bin directory (optional, for global usage):
sudo mv subdir /usr/local/bin/subdir
-
-
Usage:
- To enumerate subdomains for a domain and save them to a file:
subdir spaceX.com subdomains.txt
- To enumerate subdomains for a domain and save them to a file:
-
Configuration Directory:
- Upon running the script, a folder named
.subdirconfig
will be created in your home directory. This folder contains a file namedconfig
where users can store their SecurityTrails API key for authentication.
- Upon running the script, a folder named
- For authentication, users need to provide their SecurityTrails API key. The key can be obtained from the SecurityTrails website.
- The script periodically checks the usage of the SecurityTrails API and displays the usage information after every 5 hours.