Last active
November 26, 2015 19:18
-
-
Save n-johnson/da4b2256b7c584a56ed3 to your computer and use it in GitHub Desktop.
Replacement for dig -t any since cloudflare now refuses to answer the query with the response: 'Please stop asking for ANY" "See draft-jabley-dnsop-refuse-any"'
This file contains hidden or 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
| _dig() { | |
| local domain=$1; | |
| local type=$2; | |
| dig "$domain" -t "$type" \ | |
| | sed -n '/;; ANSWER SECTION/,/^$/p' \ | |
| | sed '1d' \ | |
| | sed '/^$/d'; | |
| } | |
| adig() { | |
| local domain=$1; | |
| local types; | |
| types=(soa ns a aaaa cname ds dnskey rrsig nsec txt mx); | |
| for t in "${types[@]}"; do | |
| _dig "$domain" "$t" | |
| done | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment