I haven't seen one of these around, so I wrote one. My comments from the top of the proggie speak for themselves. #!/usr/local/bin/perl #getasn, version .5, June 1999, by N.Weidenbacher (nikw@martnet.com) #getasn is available from http://www.martnet.com/~nikw/getasn #The purpose of this software is to find the originating AS of the route #containing a given IP address or hostname, and to do so in a fun and #exciting way! That is, you type "getasn www.cisco.com" and you get #the ASN-CISCO record from the ARIN registry. Needless to say, this #software is not well-tested at all. #This software requires the perl Expect module, obtainable from CPAN #(ftp://ftp.cdrom.com/pub/perl/CPAN), or more specifically, #ftp://ftp.cdrom.com/pub/perl/CPAN/modules/by-module/Expect. Expect, in #turn, requires IO::Stty, available from #ftp://ftp.cdrom.com/pub/perl/CPAN/modules/by-module/IO #getasn requires an internet connection for three reason. #1) It may need to do a DNS lookup if you supply a name #2) It needs to telnet to route-views to get a BGP4 route #3) It needs to whois to rs.arin.net to look up the ASN. #getasn has only been tested on Solaris 2.7, but it should work pretty well #on most unixes whose "host" command produces output similar to Solaris's #"host". This is a direct result of my lameness. -nikw
participants (1)
-
nikw@martnet.com