d5-vfa
Last Updated: February 25, 2016
·
695
· barnettjw
43ea08b4fc547e8a5da87c207bea2123

Get an abuse contact email on the command line

I found a neat RESTful WHOIS service which returns WHOIS data for an IP formatted as JSON.

Add in a little command line tool called jq, which let's you awk and grep JSON and you are all set to grab the abuse contact email address for any given IP address.

curl -s http://adam.kahtava.com/services/whois.json?query=<IP>| jq '.RegistryData.AbuseContact.Email'

To use jq all you have to do is to download the jq binary no install necessary.

Say Thanks
Respond