Skip to content

Instantly share code, notes, and snippets.

@subfission
Created October 2, 2018 22:10
Show Gist options
  • Select an option

  • Save subfission/16f8d1bb9bab7e378c6bdee716f49fe3 to your computer and use it in GitHub Desktop.

Select an option

Save subfission/16f8d1bb9bab7e378c6bdee716f49fe3 to your computer and use it in GitHub Desktop.
You must go deeper...
#!/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