Created
October 2, 2018 22:10
-
-
Save subfission/16f8d1bb9bab7e378c6bdee716f49fe3 to your computer and use it in GitHub Desktop.
You must go deeper...
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 | |
| # Perform a deeper whois to get the actual registrant data | |
| if [ -z "$1" ]; then | |
| printf "[!] Error: missing domain in argument\n\n" | |
| printf "usage: whois2 domain\n\n" | |
| printf " domain\tThe domain to look up\n\n" | |
| exit 1 | |
| fi | |
| WISSERVER=$( whois $1 | egrep '^Registrar WHOIS Server:' | cut -f2- -d: 2>/dev/null |head -1 2>/dev/null ) | |
| [ -z "$WISSERVER" ] && echo "[!] Error: Host not found!" || whois -h $WISSERVER $1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment