This site uses cookies own and third. If you continue to browse consider to accept the use of cookies. OK More Info.

[Perl Tk] Destroyer Shells 0.4

  • 0 Replies
  • 1900 Views

0 Members and 1 Guest are viewing this topic.

Offline BigBear

  • *
  • Underc0der
  • Posts: 543
  • Actividad:
    0%
  • Reputación 3
    • View Profile

[Perl Tk] Destroyer Shells 0.4

  • on: June 29, 2012, 08:35:42 pm
Version Tk de un script para buscar y borrar phpshells.

Una imagen



El codigo

Code: (perl) You are not allowed to view links. Register or Login
#!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);
        unlink($ruta);
    }
    $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 );

                open( FILE, $abrir );
                my $words = join q(), <FILE>;
                close(FILE);

                for my $rastro (@nombres) {
                    $newdaxz->update;
                    chomp $rastro;
                    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 {
    exit 1;
}

#The End ?