Version Tk de un script para buscar y borrar phpshells.
Una imagen
(http://doddyhackman.webcindario.com/images/destroyer.jpg)
El codigo
#!usr/bin/perl
#DestroyerShells 0.4
#Version Tk
#Coded By Doddy H
use Tk;
use Tk::Dialog;
use LWP::UserAgent;
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;
#if ($^O eq 'MSWin32') {
#use Win32::Console;
#Win32::Console::Free();
#}
my $color_texto = "orange";
my $color_fondo = "black";
my $newdaxz =
MainWindow->new( -background => $color_fondo, -foreground => $color_texto );
$newdaxz->title("DestroyerShells 0.4 || Coded By Doddy H");
$newdaxz->geometry("345x350+50+50");
$newdaxz->resizable( 0, 0 );
$menula = $newdaxz->Frame(
-relief => "sunken",
-bd => 1,
-background => $color_fondo,
-foreground => $color_texto
);
my $menulnowaxm = $menula->Menubutton(
-text => "Options",
-underline => 1,
-background => $color_fondo,
-foreground => $color_texto,
-activebackground => $color_texto
)->pack( -side => "left" );
my $aboutnowaxm = $menula->Menubutton(
-text => "About",
-underline => 1,
-background => $color_fondo,
-foreground => $color_texto,
-activebackground => $color_texto
)->pack( -side => "left" );
my $exitnowaxm = $menula->Menubutton(
-text => "Exit",
-underline => 1,
-background => $color_fondo,
-foreground => $color_texto,
-activebackground => $color_texto
)->pack( -side => "left" );
$menula->pack( -side => "top", -fill => "x" );
$menulnowaxm->command(
-label => "Scan",
-background => $color_fondo,
-foreground => $color_texto,
-command => \&scan
);
$menulnowaxm->command(
-label => "Delete Shells",
-background => $color_fondo,
-foreground => $color_texto,
-command => \&delnow
);
$aboutnowaxm->command(
-label => "About",
-background => $color_fondo,
-foreground => $color_texto,
-command => \&aboutxa
);
$exitnowaxm->command(
-label => "Exit",
-background => $color_fondo,
-foreground => $color_texto,
-command => \&exitnow
);
$newdaxz->Label(
-text => "Directory : ",
-font => "Impact",
-background => $color_fondo,
-foreground => $color_texto
)->place( -x
=> 20, -y => 40 ); my $dir = $newdaxz->Entry(
-text => "C:/xampp/htdocs",
-width => 37,
-background => $color_fondo,
-foreground => $color_texto
)->place( -x
=> 95, -y => 45 );
$newdaxz->Label(
-text => "Shells Founds",
-font => "Impact",
-background => $color_fondo,
-foreground => $color_texto
)->place( -x
=> 120, -y => 80 ); my $files = $newdaxz->Listbox(
-width => 40,
-height => 10,
-background => $color_fondo,
-foreground => $color_texto
)->place( -x
=> 50, -y => 130 );
$newdaxz->Label(
-text => "Status : ",
-font => "Impact",
-background => $color_fondo,
-foreground => $color_texto
)->place( -x
=> 63, -y => 300 ); my $tatus = $newdaxz->Entry(
-width => 25,
-background => $color_fondo,
-foreground => $color_texto
)->place( -x
=> 120, -y => 305 );
MainLoop;
sub delnow {
my $total = $files->size - 1;
for my $number ( 0 .. $total ) {
my $ruta = $files->get($number);
}
$files->delete( "0.0", "end" );
}
sub scan {
$files->delete( "0.0", "end" );
my $dir = $dir->get;
find( \&finder, $dir );
sub finder {
my $file = $_;
if ( -f $file ) {
if ( $file =~ /\.txt$/ or $file =~ /\.php$/ ) {
my $abrir = $File::Find::name;
$tatus->configure( -text => $abrir );
my $words = join q(), <FILE>;
for my $rastro (@nombres) {
$newdaxz->update;
if ( $words =~ /$rastro/ig ) {
$files->insert( "end", $abrir );
}
}
}
}
}
$tatus->configure( -text => " " );
}
sub aboutxa {
$newdaxz->Dialog(
-title => "About",
-buttons => ["OK"],
-text => "Coded By Doddy H",
-background => $color_fondo,
-foreground => $color_texto,
-activebackground => $color_texto
)->Show();
}
sub exitnow {
}
#The End ?