Software: Apache/2.0.54 (Unix) mod_perl/1.99_09 Perl/v5.8.0 mod_ssl/2.0.54 OpenSSL/0.9.7l DAV/2 FrontPage/5.0.2.2635 PHP/4.4.0 mod_gzip/2.0.26.1a uname -a: Linux snow.he.net 4.4.276-v2-mono-1 #1 SMP Wed Jul 21 11:21:17 PDT 2021 i686 uid=99(nobody) gid=98(nobody) groups=98(nobody) Safe-mode: OFF (not secure) /usr/local/counter/ drwxr-xr-x | |
| Viewing file: Select action/file-type: #!/usr/bin/perl
use File::Find ();
use vars qw/*name *dir *prune/;
*name = *File::Find::name;
*dir = *File::Find::dir;
*prune = *File::Find::prune;
sub wanted;
sub doexec ($@);
File::Find::find({wanted => \&wanted}, '/home');
exit;
sub wanted {
/^\.htaccess\z/s &&
doexec(0, 'ls','{}');
}
sub doexec ($@) {
shift;
shift;
@command = @_;
for my $word (@command) { $word =~ s#{}#$name#g }
$hta = "@command";
&htaccess_check;
return !$?;
}
sub htaccess_check {
open(HTA,"$hta");
$count = 0;
while(<HTA>) {
$htaccess[$count] = "$_";
$count++;
if ( $_ =~ /x-server-parsed-html \.htm/ ) {
$match = 1;
}
}
close(HTA);
if($match) {
print "Fixed: $hta\n";
open(HTA,">$hta");
$size = @htaccess;
for ($count = 0; $count < $size; $count++ ) {
if ( $htaccess[$count] !~ /x-server-parsed-html \.htm/ &&
$htaccess[$count] !~ /^Options \+Includes$/ ) {
print HTA "$htaccess[$count]";
}
}
print HTA "\nOptions +Includes\n";
print HTA "AddOutputFilter Includes html htm shtml\n";
close(HTA);
}
undef @htaccess;
undef $match;
}
|
:: Command execute :: | |
--[ c99shell v. 1.0 pre-release build #13 powered by Captain Crunch Security Team | http://ccteam.ru | Generation time: 0.019 ]-- |