Skip to content

Instantly share code, notes, and snippets.

@JoyGhoshs
Created September 30, 2021 15:23
Show Gist options
  • Save JoyGhoshs/80543553f7442271fbc1092a9de08385 to your computer and use it in GitHub Desktop.
Save JoyGhoshs/80543553f7442271fbc1092a9de08385 to your computer and use it in GitHub Desktop.
#!/usr/bin/bash
domain=$1
email=$(whois $domain | grep "Registrant Email" | egrep -ho "[[:graph:]]+@[[:graph:]]+")
curl -s -A "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.85 Safari/537.36" "https://viewdns.info/reversewhois/?q=$email" | html2text | grep -Po "[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)" | tail -n +4 | head -n -1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment