iwla/iwla_convert.pl
2014-11-18 20:18:53 +01:00

35 lines
687 B
Perl
Executable File

#!/usr/bin/perl
my $awstats_lib_root = '/usr/share/awstats/lib/';
my @awstats_libs = ('browsers.pm', 'browsers_phone.pm', 'mime.pm', 'referer_spam.pm', 'search_engines.pm', 'operating_systems.pm', 'robots.pm', 'worms.pm');
foreach $lib (@awstats_libs) {require $awstats_lib_root . $lib;}
open($FIC,">", "robots.py") or die $!;
print $FIC "awstats_robots = [";
$first = 0;
foreach $r (@RobotsSearchIDOrder_list1)
{
$r =~ s/\'/\\\'/g;
if ($first != 0)
{
print $FIC ", ";
}
else
{
$first = 1;
}
print $FIC "'.*$r.*'";
}
foreach $r (@RobotsSearchIDOrder_list2)
{
$r =~ s/\'/\\\'/g;
print $FIC ", '.*$r.*'";
}
print $FIC "]\n\n";
close($FIC);