Skip to content

Instantly share code, notes, and snippets.

@snerpton
Created March 29, 2016 15:11
Show Gist options
  • Save snerpton/e7c587e7e270a7afa7e5 to your computer and use it in GitHub Desktop.
Save snerpton/e7c587e7e270a7afa7e5 to your computer and use it in GitHub Desktop.
Do a whois on a list of IP addresses
while read ip; do org=$(whois $ip | grep Organization); netname=$(whois $ip | grep netname); amey=$(whois $ip | grep -i amey); ent=$(whois $ip | grep -i enterprise); echo "$ip: $org -- $netname -- $amey -- $ent"; done < ipaddress.txt
#ipaddress.txt is a list of IP addresses to check
#
#
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment