IP2ASN takes a list of domains and resolves their ASN information using Team Cymru's IP to ASN Mapping Service
This implementation uses the WHOIS interface which is not mean for large numbers of individual queries.
This application take a newline separated list of domains
From a file
./ip2asn input.txt
From STDIN
cat input.txt | ./ip2asn
To CSV
./ip2asn -o output.csv input.txt
In order to build, you must have a properly installed and configured installation of Go 1.4 or greater
git clone https://github.firehost.co/chinkley/ip2asn.git
cd ip2asn
go get "github.com/codegangsta/cli"
go build && go install
IPs that are seen abusing the whois server with large numbers of individual queries instead of using the bulk netcat interface will be null routed. If at all possible you should consider using the DNS based query interface since it is much more efficient for individual queries. The netcat interface should be used for large groups of IP lists at a time in one single TCP query.