Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl -w
- # a lot of years ago... recovered
- use Geo::IP2Location;
- if ($#ARGV != 1 ) {
- print "usage: nixval-checkip <fichero.bin.ip> <ip>\n";
- exit;
- }
- $fichero=$ARGV[0];
- $IP=$ARGV[1];
- $obj = Geo::IP2Location->open($fichero);
- my ($countryshort, $countrylong, $region, $city, $latitude, $longitude, $zipcode, $timezone, $isp, $domain, $netspeed) = $obj->get_all($IP);
- print "\nhash: $obj\n";
- print "isp: $isp\n";
- print "ciudad: $city\n";
- print "pais: $countrylong\n";
- print "\n";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement