Mole is a powerful Python tool for passive subdomain enumeration. It aggregates results from multiple public and commercial sources, supports batch and filtered queries, and offers flexible output options for automation and reporting.
- Queries multiple sources: crt.sh, AlienVault OTX, SecurityTrails, certspotter, hackertarget, threatcrowd, wayback machine, bufferover.run, virustotal
- Batch mode: Read domains from stdin for bulk enumeration
- Filtering: Regex or wildcard filtering of subdomains (
--filter) - Output: Save results to file, print to stdout, or output as JSON (
--json) - Verbose mode for debugging and progress
- Timeout control for HTTP requests
- Summary report after execution
- Robust error handling
- Python 3.7+
requestslibrary
-
Clone the repository:
git clone https://github.com/Av7danger/mole.git cd mole -
Install dependencies:
pip install -r requirements.txt
python subenum.py example.comtype domains.txt | python subenum.py --stdinpython subenum.py example.com -o results.txtpython subenum.py example.com --jsonpython subenum.py example.com --filter 'dev*'
python subenum.py example.com --filter '.*test.*'Set environment variables or use CLI flags:
SECURITYTRAILS_KEYfor SecurityTrailsVT_API_KEYfor VirusTotal
Example:
python subenum.py example.com --securitytrails-key YOUR_KEY --virustotal-key YOUR_KEYpython subenum.py example.com --verboseMIT
Av7danger