Last Updated: February 25, 2016
· barnettjw

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