Initial commit
This commit is contained in:
34
iwla_convert.pl
Executable file
34
iwla_convert.pl
Executable file
@@ -0,0 +1,34 @@
|
||||
#!/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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user