| Server IP : 186.64.123.29 / Your IP : 216.73.217.94 Web Server : LiteSpeed System : Linux house.hostinglat.cl 5.15.0-185-generic #195-Ubuntu SMP Fri Jun 19 17:11:50 UTC 2026 x86_64 User : tuemp9827 ( 1016) PHP Version : 8.1.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /lib/geoip/ |
Upload File : |
#!/usr/bin/perl
use warnings;
use strict;
# Script from Boris Zentner (Maxmind)
# This script converts the IPv4 csv database to the same
# format as the IPv6 database.
sub _x {
sprintf("%02x%02x:%02x%02x", split(/\./, $_[0]));
}
while(<STDIN>){
chomp;
my($f, $t, $tail) = split /,/, $_, 3;
for($t, $f){
s/^"//;
s/"$//;
}
my $xxxxf = _x($f);
my $xxxxt = _x($t);
print <<__OUT__;
"::$f", "::$t", $tail
"::ffff:$f", "::ffff:$t", $tail
"2002:${xxxxf}::", "2002:${xxxxt}:ffff:ffff:ffff:ffff:ffff", $tail
__OUT__
}
exit(0);