Un programa para buscar phpshells en nuestra computadora y poder borrarlas si nos molesta
#!usr/bin/perl
#DestroyerShells 0.3
#Writtten 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;
print "\n-- == DestroyerShells 0.3 == --\n";
unless($ARGV[0]) {
print "\n[+] sintax : $0 <dir>\n";
} else {
start($ARGV[0]);
}
print "\n\n[+] Written By Doddy H\n\n";
sub start {
my $dir = shift;
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;
open(FILE,$abrir);
my $words = join q(),<FILE>;
close(FILE);
for my $rastro(@nombres) {
chomp $rastro;
if ($words=~/$rastro/ig) {
push(@founds,$abrir);
}}}}}
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) {
for(@founda) { unlink($_);}
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}++;
}
return @limpio;
}
# The End ?