Last active
October 28, 2020 11:57
-
-
Save TomK/0af679986733938115f4f1b6d5bee73f to your computer and use it in GitHub Desktop.
bash script to get records from domain authority
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 | |
# get authoritiy | |
AUTHORITY=$(dig +noall +trace $1 NS | grep '\tNS\t' | tail -n1 | awk '{print $5}') | |
echo "AUTHORITY: $AUTHORITY" | |
Q=$1 | |
shift | |
dig @$AUTHORITY ${@:-ANY} +noall +answer $Q |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment