[Perl] Destroyer Shells 0.4

Iniciado por BigBear, Junio 29, 2012, 08:35:16 PM

Tema anterior - Siguiente tema

0 Miembros y 1 Visitante están viendo este tema.

Version mejorada de este script para buscar y borrar shells.

Código: perl

#!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 {
    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;
}

sub head {
    print qq(


@@@@                                             @@@   @           @ @     
@   @              @                            @   @  @           @ @     
@    @             @                            @      @           @ @     
@    @   @@@   @@  @@ @@  @@@  @  @  @@@  @@    @      @ @@   @@@  @ @  @@
@    @  @   @ @  @ @  @  @   @ @  @ @   @ @      @@@   @@  @ @   @ @ @ @  @
@    @  @@@@@  @   @  @  @   @ @  @ @@@@@ @         @  @   @ @@@@@ @ @  @ 
@    @  @       @  @  @  @   @ @  @ @     @         @  @   @ @     @ @   @
@   @   @   @ @  @ @  @  @   @  @@  @   @ @     @   @  @   @ @   @ @ @ @  @
@@@@     @@@   @@   @ @   @@@   @    @@@  @      @@@   @   @  @@@  @ @  @@
                                 @                                         
                               @@                                           



);
}

sub copyright {
    print "\n\n-- == Doddy Hackman 2012 == --\n\n";
    <stdin>;
    exit(1);
}

# The End ?