Subdomain Fetcher is a Python tool designed to fetch and save all subdomains of a given domain using the SecurityTrails API. The first time the script is run, it prompts the user to enter their SecurityTrails API key, which is then saved for future use. The tool is easy to use and provides a clear and concise output of all subdomains related to the specified domain.
- Prompts the user for the SecurityTrails API key if not already provided.
- Fetches all subdomains of a given domain, including inactive ones.
- Saves the list of subdomains to a text file.
- Python 3.x
requests
library
-
Clone the repository or download the script directly.
-
Ensure you have Python 3.x installed on your machine.
-
Install the
requests
library if you haven't already:pip install requests
-
Save the script as
subdomain_fetcher.py
. -
Run the script using the following command:
python subdomain_fetcher.py
-
The first time you run the script, you will be prompted to enter your SecurityTrails API key. This key will be saved in a file named
securitytrails_api_key.txt
for future use. -
Enter the domain name for which you want to fetch subdomains.
-
The script will fetch the subdomains and save them to a file named
<domain>_subdomains.txt
.
$ python subdomain_fetcher.py