# Perform A record lookup for a single domain
dnsx -d example.com -a# Perform A record lookup for multiple domains
dnsx -d example.com,hackerone.com -a# Perform A record lookup from a list of domains
dnsx -l domains.txt -a# Perform A record lookup from STDINcat domains.txt|dnsx -a
# Use specific DNS resolvers
dnsx -l domains.txt -a-resolver1.1.1.1,8.8.8.8
# Use resolvers from a file
dnsx -l domains.txt -a -resolver-file resolvers.txt
# Use system resolvers
dnsx -l domains.txt -a -system-resolver
# Filter by response containing specific string
dnsx -l domains.txt -a -resp-only -resp"1.2.3.4"# Filter by response matching regex
dnsx -l domains.txt -a -resp-only -resp-regex "^1\.2\.[0-9]+\.[0-9]+$"
# Find subdomains and resolve them
subfinder -d example.com -silent|dnsx -a-silent# Find subdomains and check for specific record types
subfinder -d example.com -silent|dnsx -a-cname-silent
# Resolve domains and probe for HTTP services
dnsx -l domains.txt -a -silent|httpx -silent# Resolve domains, filter by IP, and probe for HTTP services
dnsx -l domains.txt -a-silent-resp"1.2.3.4"|httpx -silent
# Resolve domains and scan for open ports
dnsx -l domains.txt -a -silent|naabu -silent# Resolve domains, filter by IP, and scan for open ports
dnsx -l domains.txt -a-silent-resp"1.2.3.4"|naabu -silent
# Output only domain and IP
dnsx -l domains.txt -a -resp-only
# Output with additional information
dnsx -l domains.txt -a-json# Count unique IPs
dnsx -l domains.txt -a -resp-only|sort -u|wc-l# Sort output by IP
dnsx -l domains.txt -a -resp-only|sort-t' '-k2
# Filter by IP
dnsx -l domains.txt -a -resp-only|grep"1.2.3.4"# Filter by domain
dnsx -l domains.txt -a -resp-only|grep"example.com"# Find unique IPs
dnsx -l domains.txt -a -resp-only|awk'\\\\{print $2\\\\}'|sort-u
# Filter by specific IP
dnsx -l domains.txt -a -resp-only -resp"1.2.3.4"# Filter by IP range
dnsx -l domains.txt -a -resp-only -resp-regex "^1\.2\.3\.[0-9]+$"
# Set DNSx configuration via environment variablesexportDNSX_CONCURRENCY=100exportDNSX_RATE_LIMIT=100exportDNSX_RETRIES=3exportDNSX_TIMEOUT=5000exportDNSX_RESOLVERS=1.1.1.1,8.8.8.8