Created
June 5, 2019 16:15
-
-
Save FHRNet/60760f8d982fbc26dc0c7669cb7e0631 to your computer and use it in GitHub Desktop.
DNS Dig ANY
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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