This tool helps you perform DNS enumeration for a given domain and discover valid subdomains from a list provided in a file named subdomains.txt
.
- DNS record enumeration for multiple types, including A, AAAA, MX, NS, TXT, and others.
- Subdomain discovery using a list from a user-provided text file.
- ASCII art and colorful CLI output for an enhanced user experience.
- Enumeration progress animation.
To run this script, you will need Python 3.x installed on your system.
It's recommended to use a virtual environment to manage the Python package dependencies and isolate them from your system's global Python environment.
To create and activate a virtual environment, follow these steps:
On macOS and Linux:
python3 -m venv venv
source venv/bin/activate
On Windows:
python -m venv venv
venv\Scripts\activate
After activating the virtual environment, install the required Python packages using the provided requirements.txt file with the following command:
pip install -r requirements.txt
This command will automatically install all the packages listed in requirements.txt
, which should contain:
dnspython==2.1.0
colorama==0.4.4
pyfiglet==0.8.post1
Run the script by passing the target domain as a command-line argument:
python3 dns_enum.py example.com
Make sure you have a file named subdomains.txt
in the same directory as the script, with one subdomain per line. The script will attempt to resolve each subdomain for the A record and print the valid ones to the console, as well as save them to an output file named <domain>_valid_subdomains.txt
.
<domain>
: The domain for which you want to perform DNS enumeration and subdomain scanning. It should be a valid domain formatted asexample.com
.
The script generates two types of output:
- Console output with the DNS enumeration results and valid subdomains highlighted in green.
- A file named
<domain>_valid_subdomains.txt
containing all valid subdomains discovered during the scan.
If you need to stop the script, use Ctrl+C
. The script will handle the interrupt and exit gracefully.
This tool is for educational and ethical testing purposes only. Users are responsible for abiding by applicable laws and regulations. The creator is not liable for misuse or any illegal activities performed with the tool.