elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: (TUTORIAL) Aprende a emular Sentinel Dongle By Yapis


+  Foro de elhacker.net
|-+  Programación
| |-+  Scripting
| | |-+  [Perl] Finder Pass 0.3
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: [Perl] Finder Pass 0.3  (Leído 1,485 veces)
BigBear


Desconectado Desconectado

Mensajes: 545



Ver Perfil
[Perl] Finder Pass 0.3
« en: 31 Marzo 2012, 22:46 pm »

La nueva version de un programa que habia hecho para crackear hashes md5 mediante paginas online.

Código
  1. #!usr/bin/perl
  2. #Finder Pass 0.3
  3. #Coded By Doddy H
  4.  
  5. use LWP::UserAgent;
  6.  
  7. my $nave = LWP::UserAgent->new;
  8. $nave->agent(
  9. "Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.1.12) Gecko/20080201Firefox/2.0.0.12"
  10. );
  11. $nave->timeout(5);
  12.  
  13. menu();
  14.  
  15. sub menu {
  16.  
  17.    head();
  18.  
  19.    print "[+] Option : ";
  20.    chomp( my $op = <stdin> );
  21.  
  22.    if ( $op eq "1" ) {
  23.        print "\n\n[+] Hash : ";
  24.        chomp( my $ha = <stdin> );
  25.        if ( ver_length($ha) ) {
  26.            print "\n\n[+] Cracking Hash...\n";
  27.            my $re = crackit($ha);
  28.            unless ( $re =~ /false01/ ) {
  29.                print "\n[+] Cracked : $re\n\n";
  30.                savefile( "hashes-found.txt", $ha . ":" . $re );
  31.            }
  32.            else {
  33.                print "\n[-] Not Found\n\n";
  34.            }
  35.        }
  36.        else {
  37.            print "\n\n[-] Hash invalid\n\n";
  38.        }
  39.        print "\n[+] Finished";
  40.        <stdin>;
  41.        menu();
  42.    }
  43.    if ( $op eq "2" ) {
  44.        print "\n\n[+] Wordlist : ";
  45.        chomp( my $fi = <stdin> );
  46.        if ( -f $fi ) {
  47.            print "\n\n[+] Opening File\n";
  48.            open( WORD, $fi );
  49.            my @varios = <WORD>;
  50.            close WORD;
  51.            my @varios = repes(@varios);
  52.            print "[+] Hashes Found : " . int(@varios);
  53.            print "\n\n[+] Cracking hashes...\n\n";
  54.            for $hash (@varios) {
  55.                chomp $hash;
  56.                if ( ver_length($hash) ) {
  57.                    my $re = crackit($hash);
  58.                    unless ( $re =~ /false01/ ) {
  59.                        print "[+] $hash : $re\n";
  60.                        savefile( "hashes-found.txt", $hash . ":" . $re );
  61.                    }
  62.                }
  63.            }
  64.        }
  65.        else {
  66.            print "\n\n[-] File Not Found\n\n";
  67.        }
  68.        print "\n[+] Finished";
  69.        <stdin>;
  70.        menu();
  71.    }
  72.    if ( $op eq "3" ) {
  73.        copyright();
  74.    }
  75. }
  76.  
  77. sub crackit {
  78.  
  79.    my $target = shift;
  80.  
  81.    chomp $target;
  82.  
  83.    my %hash = (
  84.  
  85.        'http://md5.hashcracking.com/search.php?md5=' => {
  86.            'tipo'  => 'get',
  87.            'regex' => "Cleartext of $target is (.*)",
  88.        },
  89.  
  90.        'http://www.hashchecker.com/index.php?_sls=search_hash' => {
  91.            'variables' => { 'search_field' => $target, 'Submit' => 'search' },
  92.            'regex' =>
  93.              "<td><li>Your md5 hash is :<br><li>$target is <b>(.*)<\/b>",
  94.        },
  95.  
  96.        'http://md5.rednoize.com/?q=' => {
  97.            'tipo'  => 'get',
  98.            'regex' => "<div id=\"result\" >(.*)<\/div>"
  99.        },
  100.  
  101.        'http://md52.altervista.org/index.php?md5=' => {
  102.            'tipo'  => 'get',
  103.            'regex' => "<br>Password: <font color=\"Red\">(.*)<\/font><\/b>"
  104.          }
  105.  
  106.    );
  107.  
  108.    for my $data ( keys %hash ) {
  109.        if ( $hash{$data}{tipo} eq "get" ) {
  110.            $code = toma( $data . $target );
  111.            if ( $code =~ /$hash{$data}{regex}/ig ) {
  112.                my $found = $1;
  113.                unless ( $found =~ /\[Non Trovata\]/ ) {
  114.                    return $found;
  115.                    last;
  116.                }
  117.            }
  118.        }
  119.        else {
  120.            $code = tomar( $data, $hash{$data}{variables} );
  121.            if ( $code =~ /$hash{$data}{regex}/ig ) {
  122.                my $found = $1;
  123.                return $found;
  124.                last;
  125.            }
  126.        }
  127.    }
  128.    return "false01";
  129. }
  130.  
  131. sub copyright {
  132.    print "\n\n(C) Doddy Hackman 2012\n";
  133.    <stdin>;
  134.    exit(1);
  135. }
  136.  
  137. sub head {
  138.    print qq(
  139.  
  140.  
  141. ##########  #########  #########     #####   #    ###  ###
  142. #  # #  ##  #  #   #   #  # #  #     #  #   #   #  # #  #
  143. #    #  ##  #  #    #  #    #  #     #  #  # #  #    #  
  144. ###  #  # # #  #    #  ###  ###      ###   # #   ##   ##
  145. #    #  # # #  #    #  #    # #      #    #####    #    #
  146. #    #  #  ##  #   #   #  # #  #     #    #   # #  # #  #
  147. ###  ######  # #####   ########  #   ###  ### ######  ###
  148.  
  149.  
  150.  
  151.  
  152. [++] Options
  153.  
  154.  
  155. [+] 1 : Hash
  156. [+] 2 : File with hashes
  157. [+] 3 : Exit
  158.  
  159.  
  160. );
  161. }
  162.  
  163. sub savefile {
  164.    open( SAVE, ">>" . $_[0] );
  165.    print SAVE $_[1] . "\n";
  166.    close SAVE;
  167. }
  168.  
  169. sub repes {
  170.    my @limpio;
  171.    foreach $test (@_) {
  172.        push @limpio, $test unless $repe{$test}++;
  173.    }
  174.    return @limpio;
  175. }
  176.  
  177. sub ver_length {
  178.    return true if length( $_[0] ) == 32;
  179. }
  180.  
  181. sub toma {
  182.    return $nave->get( $_[0] )->content;
  183. }
  184.  
  185. sub tomar {
  186.    my ( $web, $var ) = @_;
  187.    return $nave->post( $web, [ %{$var} ] )->content;
  188. }
  189.  
  190. #The End ?
  191.  


En línea

Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
[Perl] Finder Paths
Scripting
BigBear 0 1,456 Último mensaje 14 Octubre 2011, 15:25 pm
por BigBear
[Perl Tk] Finder Pass 0.4
Scripting
BigBear 0 1,446 Último mensaje 31 Marzo 2012, 22:47 pm
por BigBear
[Perl] Finder Paths 0.6
Scripting
BigBear 0 1,308 Último mensaje 8 Abril 2012, 01:55 am
por BigBear
[Perl Tk] Finder Paths 0.7
Scripting
BigBear 0 1,415 Último mensaje 8 Abril 2012, 01:56 am
por BigBear
[Perl] Finder Text 0.2
Scripting
BigBear 0 1,349 Último mensaje 23 Junio 2012, 18:15 pm
por BigBear
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines