Created
September 21, 2020 12:44
-
-
Save h4sh5/27a3d11f10878bbd7ff2cb054daba213 to your computer and use it in GitHub Desktop.
query all DNS records
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
| #!/bin/bash | |
| if (( $# != 1 )); then | |
| echo "Usage: $0 <host> [ns server]" | |
| exit 1 | |
| fi | |
| HOST=$1 | |
| types=(A AAAA AFSDB APL CAA CDNSKEY CDS CERT CNAME CSYNC DHCID DLV DNAME DNSKEY DS EUI48 EUI64 HINFO HIP IPSECKEY KEY KX LOC MX NAPTR NS NSEC NSEC3 NSEC3PARAM OPENPGPKEY PTR RRSIG RP SIG SMIMEA SOA SRV SSHFP TA TKEY TLSA TSIG TXT URI) | |
| for t in "${types[@]}"; do host -t $t $1 $2 | grep -v "has no .* record"; done | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment