Version mejorada de este script para buscar y borrar shells.
#!usr/bin/perl
#DestroyerShells 0.4
#Coded By Doddy H
use File::Find;
my @nombres = (
"C99Shell",
"r57shell",
"DxShell",
"HiddenShell",
"~ Andr3a92 ~ Sh3ll ~",
"CShell",
"Dark Shell",
"GsC SheLL",
"N3fa5t1cA Sh3ll",
"ONBOOMSHELL",
"StAkeR ~ Shell",
"MoDDeD By KinG-InFeT",
"31337 Shel"
);
my @founds;
head();
print "\n[+] Directory : "; chomp( my $dir = <stdin> ); start($dir);
copyright();
sub start {
print "\n\n[+] Searching in directory $dir\n\n";
find( \&finder, $dir );
sub finder {
my $file = $_;
if ( -f $file ) {
if ( $file =~ /\.txt$/ or $file =~ /\.php$/ ) {
my $abrir = $File::Find::name;
my $words = join q(), <FILE>;
for my $rastro (@nombres) {
if ( $words =~ /$rastro/ig ) {
}
}
}
}
}
my @founda = repes(@founds);
print "[+] Number of files found : " . int(@founda) . "\n\n";
if ( int(@founda) ne "0" ) { for (@founda) {
print "[+] File Found : $_\n"; }
print "\n[+] Delete files y/n : "; chomp( my $op = <stdin> );
if ( $op =~ /y/ig ) {
print "\n[+] Files Deleted\n"; }
elsif ( $op =~ /n/ig ) {
print "\n[+] Good Bye\n"; }
else {
print "\n[+] Write good stupid\n"; }
}
}
sub repes {
foreach $test (@_) {
push @limpio, $test unless $repe{$test}++; }
}
sub head {
@@@@ @@@ @ @ @
@ @ @ @ @ @ @ @
@ @ @ @ @ @ @
@ @ @@@ @@ @@ @@ @@@ @ @ @@@ @@ @ @ @@ @@@ @ @ @@
@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @@@ @@ @ @ @ @ @ @ @
@ @ @@@@@ @ @ @ @ @ @ @ @@@@@ @ @ @ @ @@@@@ @ @ @
@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @
@ @ @ @ @ @ @ @ @ @ @@ @ @ @ @ @ @ @ @ @ @ @ @ @
@@@@ @@@ @@ @ @ @@@ @ @@@ @ @@@ @ @ @@@ @ @ @@
@
@@
);
}
sub copyright {
print "\n\n-- == Doddy Hackman 2012 == --\n\n"; <stdin>;
}
# The End ?