Created
April 15, 2015 21:06
-
-
Save petertoi/8f7e42b867cbb85ec47b to your computer and use it in GitHub Desktop.
List all DNS records in a domain using dig
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/sh | |
# | |
# Author: Peter Toi | |
# Source: https://gist.github.com/petertoi/8f7e42b867cbb85ec47b | |
# | |
# Usage 1: $ digall.sh # No argument will prompt for domain | |
# Usage 2: $ digall.sh domain # Skip the prompts by including the domain as an argument | |
if [ "$#" -eq 1 ] | |
then | |
domain=$1 | |
else | |
echo "Domain (Ex: google.com): " | |
read domain | |
fi | |
dig +nocmd $domain any +multiline +noall +answer |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment