A simple, command-line DNS lookup tool that performs various DNS queries with clean, intuitive output.
- Multiple DNS record types (A, AAAA, MX, CNAME, NS, TXT, SOA)
- Single domain or bulk domain processing
- Clean formatted output (table/JSON options)
- Performance timing
- Custom DNS server support
- Error handling with meaningful messages
git clone https://github.com/0x-Decrypt/dns-lookup
cd dns-lookup
pip install -r requirements.txt
# Basic A record lookup
python dns_lookup.py google.com
# Specific record type
python dns_lookup.py google.com --type MX
# Multiple domains
python dns_lookup.py google.com facebook.com --type A
# Bulk processing from file
python dns_lookup.py --file domains.txt --output json
# Custom DNS server
python dns_lookup.py google.com --server 8.8.8.8
dns-lookup/
├── src/
│ ├── dns_resolver.py # Core DNS resolution logic
│ ├── output_formatter.py # Display formatting
│ ├── file_handler.py # File I/O operations
│ └── cli.py # Command-line interface
├── tests/
├── README.md
├── requirements.txt
└── dns_lookup.py # Main entry point
python -m pytest tests/
MIT License - see LICENSE file for details.