A simple and powerful command-line utility to query various DNS record types for any domain.
- Query multiple DNS record types (A, AAAA, MX, TXT, NS, CNAME, SOA, PTR)
- Colorful output for better readability
- Support for custom DNS servers
- Simple and intuitive command-line interface
-
Install the required package:
# For Ubuntu/Debian sudo apt-get install python3-dnspython # For other systems using pip pip install dnspython
-
Clone this repository:
git clone https://github.com/quantumvortex369/dnslookup.git cd dnslookup
# Basic usage
python3 dnslookup.py example.com
# Query specific record type (A, AAAA, MX, TXT, NS, CNAME, SOA)
python3 dnslookup.py example.com -t MX
# Use a specific DNS server
python3 dnslookup.py example.com -n 8.8.8.8
# Perform reverse DNS lookup (PTR)
python3 dnslookup.py -r 8.8.8.8# Get all DNS records for google.com
python3 dnslookup.py google.com
# Get only MX records for microsoft.com
python3 dnslookup.py microsoft.com -t MX
# Use Google's public DNS server
python3 dnslookup.py github.com -n 8.8.8.8- Python 3.6+
- dnspython library (installed automatically if using pip)
Feel free to submit issues and enhancement requests.