This Python script queries various DNS record types for a given domain individually, as the standard dig <domain> ANY
often fails. It provides a structured, color-coded output in the terminal, making DNS information easy to read.
- Queries common DNS records: A, AAAA, MX, NS, TXT, CNAME, SOA, CAA, SRV.
- Performs PTR (reverse DNS) lookup for the main IPv4 address.
- Presents output with colors for better readability.
- Provides clean and formatted results.
-
Python 3
-
dig
utility: Installdnsutils
(Debian/Ubuntu) orbind-utils
(CentOS/RHEL).- Debian/Ubuntu:
sudo apt install dnsutils
- CentOS/RHEL:
sudo yum install bind-utils
orsudo dnf install bind-utils
- Debian/Ubuntu:
- Save the script: Copy the Python code into a file, e.g.,
digany.py
. - Make it executable:
chmod +x digany.py
Run the script with the domain as an argument:
./digany.py example.com
Made by thesw0rd