cowboy me, 2.0: jose nazario beauty and the street

yet another hack

hot on the heels of my previous hack i submitted to oreilly (cligoogle), i was thinking about sending in my "origin" tool. basically i punch in an IP address and out comes one line, the owner of the netblock and their autonomous system number.

here you go, it's a handy tool if you're doing internet work:

#!/bin/sh echo $1 | nc 43 | awk '{ if ($0 ~/descr:/) {$1 = ""; printf("%s ", $0)} if ($0 ~/^origin:/) {print $2} }'

as an example, take your globally unique IPv4 address (ie the one you NAT to) and punch it in. enjoy.



| archives

Last modified: Thursday, Jun 12, 2003 @ 10:14pm
Weblog Commenting and Trackback by

Your Ad Here

copyright © 2002-2015 jose nazario, all rights reserved.