https://iptoasn.com/ https://pypi.python.org/pypi/pyasn
I've been working on tweaking pyasn a bit and building a service around that.
https://iptoasn.com/ https://pypi.python.org/pypi/pyasn
I've been working on tweaking pyasn a bit and building a service around that.
$ curl ipinfo.io/8.8.8.8
{
"ip": "8.8.8.8",
"hostname": "google-public-dns-a.google.com",
"city": "Mountain View",
"region": "California",
"country": "US",
"loc": "37.3860,-122.0840",
"org": "AS15169 Google Inc.",
"postal": "94035",
"phone": "650"
}
$ curl ipinfo.io/8.8.8.8/org
AS15169 Google Inc.
And ASN details are available on the web, eg https://ipinfo.io/AS15169Also, it's not clear what they're (ipinfo.io) using as their source for the ASN. Are they simply reporting the ASN as provided by ARIN, etc., or are they actually running BGP and reporting the origin ASN as they see it in announcements. My money would be on the former, in which case any prefix hijacking would not affect the data reported by ipinfo.io.
Regardless, if you want it, that data is available from the RIRs. Go crazy.
There's often a disconnect between something like that which works for one address, and something I could actually use to do bulk lookups on 5,000,000 addresses to generate reports.