Created
February 4, 2022 22:38
-
-
Save vitalvas/1c20c0e8f994088660a479523b0d64da to your computer and use it in GitHub Desktop.
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 | |
| [ -z "${1}" ] && { | |
| echo "No Server address" | |
| exit 1 | |
| } | |
| SERVER=${1} | |
| NAMES=(authors.bind. version.bind. version.server. hostname.bind. id.server.) | |
| for name in ${NAMES[*]}; do | |
| echo -n -e "${name}: " | |
| res=$(dig +short CHAOS TXT ${name} @${SERVER}) | |
| if [ -z "${res}" ]; then | |
| echo "-" | |
| else | |
| echo "${res}" | |
| fi | |
| done | |
| echo -n -e "NSID: " | |
| dig +nsid example.com @${SERVER} | awk '$0~"NSID" {print $NF}' | tr -d '(")' | |
| echo "" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment