Menu

#36 RIPE ASN Lookup

open
nobody
None
5
2011-11-08
2011-11-08
Anonymous
No

If you do an IP lookup via a ripe server, the handler performs correctly.

However, if you do an ASN lookup, the returned results will return the "main" block, instead of returning the "" block. The "main" block is defaulted to RIPE's information, so the abuse email and contact information will be RIPE's instead of the ASN owner.

In the RIPE handler(whois.ip.ripe.php) line #53 I added this to get it to function properly:
/* kcmerrill - kcmerrill@gmail.com - 10.20.2011
* Ripe Handler when using ASN's appears to be putting their main info first.
* So we need to get rid of their information(which was consistently 100 lines over quite a few ASN's)
*/
$blocks = generic_parser_a_blocks($data_str,$translate,$disclaimer);
if(isset($blocks["main"]["org"]) && $blocks["main"]["org"] == "ORG-NCC1-RIPE"){}
//array_splice($data_str, 0, 101);
//We don't need blocks right now.
unset($blocks);

I've attached the handler file in it's entirety. Hopefully somebody might find this useful.
-kc

Discussion

  • Nobody/Anonymous

     
  • David Saez

    David Saez - 2012-03-29

    could you please provide a real ASN for testing ?

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.