hadiasghari / pyasn

Python IP address to Autonomous System Number lookup module. (Supports fast local lookups, and historical lookups using archived BGP dumps.)
Other
294 stars 72 forks source link

is the project still alive? #56

Closed randomgambit closed 6 years ago

randomgambit commented 6 years ago

Hello and thanks for this really promising package!

I just wonder if the project is still alive/maintained? Some of the links on the readme do not work anymore. Also, the historical dumps seem to stop in 2015. Could you please let me know?

Thanks!

hadiasghari commented 6 years ago

Hi @randomgambit, the module works fine. I haven't contributed code for a while for some of the requests made but they don't affect core functionality (and I am always happy to accept PRs).

You can download the latest dumps with the pyasn_util_download script included. Regarding the readme, I fixed the pipi link; are there other links that need fixing?

If all is in order please close this comment. Otherwise I'd be happy to help.

randomgambit commented 6 years ago

@hadiasghari thank you this is great!

the issue is that I cannot use the util_download because my firewall does not allow connections within a program. Is there a ftp or a website where I get these historical IP-ASN tables?

However, this raises the question of how reliable this historical mapping is. Is the data even public? On a side note the link Delft University of Technology (http://econsec.tbm.tudlft.nl ) does not work as well

Thanks!!

randomgambit commented 6 years ago

@hadiasghari essentially what I am trying to do using pyasn is the following

I have a dataframe of ip addresses collected at various points in the past (2012, 2015, etc) and I want to map them to their corresponding asn number and asn organization name.

I am a little bit confused how to do so with pyasn without an internet connection from within python

hadiasghari commented 6 years ago

@randomgambit if you look inside the download script you will find the URL for the BGP/MRT-RIB dumps. (These are indeed public and capture the internet's routing state at that point in time):

http://archive.routeviews.org/bgpdata/

Once you download an RIB file, convert it to the IP-ASN table using the pyasn_util_convert script.

randomgambit commented 6 years ago

@hadiasghari really cool, thanks! but do these dumps also contain the company name associated with the asn (say, Apple Inc.) ? if you only know that the asn is 1000, this is not very helpful (at least in my case). Can the mighty pyasn recover that information as well?

Thanks for helping again. Amazing package really!

hadiasghari commented 6 years ago

pyasn downloads the current AS names with pyasn_util_asnames... . For historical names you might have a look at Maxmind's offerings (e.g. https://www.maxmind.com/en/geoip2-isp-database or https://www.maxmind.com/en/geoip2-precision-insights), I've seen some colleagues use that.