π DomFetcher is an asynchronous OSINT tool for domain intelligence and security scanning. It collects data from WHOIS, DNS, IP geolocation (IPInfo), and Censys APIs. Features concurrent API calls, JSON/CSV exports, colorized CLI output, and robust error handling. Ideal for cybersecurity reconnaissance. π‘οΈ
- Domain Resolution: Resolves domains to IP addresses with multiple fallback methods
- WHOIS Intelligence: Fetches domain registration details (registrant, creation/expiration dates, name servers)
- DNS Analysis: Performs A record lookups and reverse DNS (PTR) resolution
- IP Geolocation: Retrieves location, ISP, and network information via IPInfo API
- Censys Infrastructure Intelligence: Queries Censys v3 API for detailed host information including:
- Open ports and services
- SSL/TLS certificates and SANs
- Autonomous System (ASN) details
- Geographic coordinates
- Asynchronous Operations: Concurrent API calls for faster scanning
- Comprehensive Reporting: Exports all data to JSON and structured CSV files
- Interactive CLI: User-friendly interface with help, clear, and exit commands
- Colorized Output: Enhanced readability with colorama
- Error Handling: Robust error handling with retries and fallbacks
Core dependencies are listed in requirements.txt.
Recommended Python version: 3.8+
python -m venv .venv
.\.venv\Scripts\activate
pip install -r requirements.txtpython3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtFor enhanced functionality, install optional packages:
pip install python-whois aiohttppython-whois: Enables WHOIS domain registration lookupsaiohttp: Provides faster asynchronous HTTP requests for IPInfo and Censys APIs
DomFetcher reads API keys from a .env file located in the same directory as DomFetcher.py.
Create a file named .env with the following keys (replace placeholders with real tokens).
You can use the provided .env.example as a template β copy it to .env and fill in your real keys.
On Windows (cmd.exe):
copy .env.example .env
On PowerShell / POSIX shells:
cp .env.example .env
IPINFO_API_KEY=your_ipinfo_token_here
CENSYS_API_TOKEN=your_censys_api_token_here
CENSYS_ORG_ID=optional_org_id_here
Notes:
IPINFO_API_KEYis optional for basic queries but recommended for higher rate limits.CENSYS_API_TOKENis optional β without it, Censys intelligence will be skipped.
Run the tool and follow the interactive prompt:
python -u DomFetcher.pyThe tool will display a welcome banner and prompt you to:
- Enter target domain: Input a domain like
example.com,www.example.com, orhttps://example.com - Specify output directory: Choose where to save reports (defaults to
osint_reports/)
During execution, you can use these commands:
help- Display usage instructions and available commandsexit- Exit the program gracefullyclear- Clear the console screen
Welcome to Domain Fetcher
Author: Aditya Pachghare
Type 'help' for usage instructions, 'exit' to quit
Enter target domain: example.com
Where do you want to save the OSINT reports?
Press ENTER to use default directory: ./osint_reports
[+] Starting scan for: example.com
[i] Resolving domain and gathering intelligence...
All reports are saved with timestamps in the format YYYYMMDD_HHMMSS and stored in the specified output directory (default: osint_reports/).
{domain}_{timestamp}.json: Unified report containing all collected OSINT data including metadata, WHOIS, DNS, and Censys information{domain}_censys_{timestamp}.json: Raw Censys API response data (when Censys scanning is successful)
When Censys data is available, multiple CSV files are generated:
{domain}_censys_summary_{timestamp}.csv: High-level host information (IP, location, ASN, organization){domain}_censys_services_{timestamp}.csv: Open ports, protocols, HTTP status codes, and server information{domain}_censys_certificates_{timestamp}.csv: SSL/TLS certificate details (subject, issuer, validity dates, fingerprints){domain}_censys_sans_{timestamp}.csv: Subject Alternative Names (SANs) from certificates
- Colorized display: Real-time results with colorama for enhanced readability
- Structured sections: Organized output with headers for Domain Info, DNS, Geolocation, and Censys Intelligence
- Progress indicators: Status messages during scanning operations
- Error handling: Clear error messages with fallback information
- The tool uses
requestsfor blocking HTTP calls, with optionalaiohttpfor async calls if installed. - WHOIS support requires
python-whois; if not installed, WHOIS sections will be skipped with a friendly warning. - DNS resolution uses
dnspython. - Clearing the console uses
subprocess.run()(works on Windows and POSIX shells).
- If WHOIS is missing, install
python-whoisand re-run. - If DNS lookups fail, ensure your network/OS resolver is working and the domain is valid.
- If Censys returns authentication errors, verify
CENSYS_API_TOKENand optionallyCENSYS_ORG_ID.
Author: Aditya Pachghare This repository follows permissive usage for personal and educational OSINT work.
- Add WHOIS caching (in-memory TTL) to reduce repeated queries.
- Add a non-interactive mode (CLI flags) for scripting scans.