[Dshield] IP Address --> Country Script

Brian Jameson bjameson at cix.co.uk
Tue Dec 16 10:49:51 GMT 2003

Allan Liska wrote


>Does anyone have a script that will identify the country of origin of
>an IP Address (realizing, of course, that this is not an exact
>science).  I would prefer something that can be run from the command
>line, so I can enter in large numbers of IP Addresses -- or even
>better -- something that can query a file.
>Thank you for your time.
>- --
>Allan Liska
>allan at allan.org

	You could try Bill Weinman's whois perl script from http://whois.bw.org. I
was thinking of using this in an anti SPAM routine and The test results look
good. combine it with grep and voila! e.g. whois | grep
"ountry:" returns Country:    US. NB the grep "ountry:" is deliberate as
Bill Weinmans's script return Country: or country depending on the neck of
the woods being investigated.

More information about the list mailing list