Created
April 13, 2015 06:28
-
-
Save rahul286/4be2ba7aaa4e8a066783 to your computer and use it in GitHub Desktop.
wildcard DNS record checker
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/sh | |
| # Usage: bash wild.sh <example.com> | |
| # Repalce <example.com> with domain you want to check | |
| # Random word loginc from http://www.unixcl.com/2008/05/generate-random-words-in-linux.html | |
| WORDFILE="/usr/share/dict/words" | |
| NUMWORDS=10 | |
| #Number of lines in $WORDFILE | |
| tL=`awk 'NF!=0 {++c} END {print c}' $WORDFILE` | |
| for i in `seq $NUMWORDS` | |
| do | |
| rnum=$((RANDOM%$tL+1)) | |
| line=$(sed -n "$rnum p" $WORDFILE) | |
| # try random work as subdomian for given domain name | |
| host $line.$1 | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment