Skip to content

πŸ” 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. πŸ›‘οΈ

License

Notifications You must be signed in to change notification settings

MrAdi46/DomFetcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ•΅οΈβ€β™‚οΈ DomFetcher - Domain Intelligence & Security Scanner

πŸš€ Overview

πŸ” 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. πŸ›‘οΈ

Key Features

  • 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

πŸ“¦ Requirements

Core dependencies are listed in requirements.txt.

Recommended Python version: 3.8+

πŸ”§ Installation

Windows (cmd.exe):

python -m venv .venv
.\.venv\Scripts\activate
pip install -r requirements.txt

Linux/macOS:

python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

Optional Dependencies

For enhanced functionality, install optional packages:

pip install python-whois aiohttp
  • python-whois: Enables WHOIS domain registration lookups
  • aiohttp: Provides faster asynchronous HTTP requests for IPInfo and Censys APIs

πŸ”‘ Environment Variables

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_KEY is optional for basic queries but recommended for higher rate limits.
  • CENSYS_API_TOKEN is optional β€” without it, Censys intelligence will be skipped.

▢️ Usage

Interactive Mode

Run the tool and follow the interactive prompt:

python -u DomFetcher.py

The tool will display a welcome banner and prompt you to:

  1. Enter target domain: Input a domain like example.com, www.example.com, or https://example.com
  2. Specify output directory: Choose where to save reports (defaults to osint_reports/)

Interactive Commands

During execution, you can use these commands:

  • help - Display usage instructions and available commands
  • exit - Exit the program gracefully
  • clear - Clear the console screen

Example Session

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...

πŸ“ Output Files

All reports are saved with timestamps in the format YYYYMMDD_HHMMSS and stored in the specified output directory (default: osint_reports/).

JSON 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)

CSV Reports (Censys Data)

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

Console Output

  • 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

Behavior & Options

  • The tool uses requests for blocking HTTP calls, with optional aiohttp for 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).

Troubleshooting

  • If WHOIS is missing, install python-whois and 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_TOKEN and optionally CENSYS_ORG_ID.

License & Author

Author: Aditya Pachghare This repository follows permissive usage for personal and educational OSINT work.

Further enhancements

  • Add WHOIS caching (in-memory TTL) to reduce repeated queries.
  • Add a non-interactive mode (CLI flags) for scripting scans.

About

πŸ” 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. πŸ›‘οΈ

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages