Skip to content

Instantly share code, notes, and snippets.

@FHRNet
Created June 5, 2019 16:15
Show Gist options
  • Save FHRNet/60760f8d982fbc26dc0c7669cb7e0631 to your computer and use it in GitHub Desktop.
Save FHRNet/60760f8d982fbc26dc0c7669cb7e0631 to your computer and use it in GitHub Desktop.
DNS Dig ANY
#!/bin/bash
#
# Tired of the nonsensical "ANY" deprecation pushed and forced by CloudFlare?
# Here's a tool to simulate ANY queries.
query_types=(SOA NS A AAAA MX CAA TXT SRV HINFO PTR RRSIG DNSKEY DS NSEC NSEC3 NAPTR)
if [[ -z ${1} ]]; then
echo "Usage: ${0} <domainname> [recursor]"
exit 1
fi
for type in "${query_types[@]}"; do
echo [${type}]
if [[ -z ${2} ]]; then
dig +noall +answer ${1} ${type}
else
dig +noall +answer ${1} ${type} @${2}
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment