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

 

 


Tema destacado: Guía rápida para descarga de herramientas gratuitas de seguridad y desinfección


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


Desconectado Desconectado

Mensajes: 545



Ver Perfil
[Perl Tk] Finder Pass 0.4
« en: 31 Marzo 2012, 22:47 pm »

La version Tk de este programa que eh hecho para crackear hashes md5 de forma online

Una imagen seria


El codigo

Código
  1. #!usr/bin/perl
  2. #Finder Pass 0.4
  3. #Version Tk
  4. #Coded By Doddy H
  5.  
  6. use Tk;
  7. use Tk::ListBox;
  8. use Tk::Dialog;
  9. use Tk::FileSelect;
  10. use Cwd;
  11. use LWP::UserAgent;
  12.  
  13. my $nave = LWP::UserAgent->new;
  14. $nave->agent(
  15. "Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.1.12) Gecko/20080201Firefox/2.0.0.12"
  16. );
  17. $nave->timeout(5);
  18.  
  19. if ( $^O eq 'MSWin32' ) {
  20.    use Win32::Console;
  21.    Win32::Console::Free();
  22. }
  23.  
  24. my $color_fondo = "black";
  25. my $color_texto = "red";
  26.  
  27. my $ta =
  28.  MainWindow->new( -background => $color_fondo, -foreground => $color_texto );
  29. $ta->title("Finder Pass 0.4 (C) Doddy Hackman 2012");
  30. $ta->geometry("600x400+20+20");
  31. $ta->resizable( 0, 0 );
  32.  
  33. $d = $ta->Frame(
  34.    -relief     => "sunken",
  35.    -bd         => 1,
  36.    -background => $color_fondo,
  37.    -foreground => $color_texto
  38. );
  39. my $max = $d->Menubutton(
  40.    -text             => "Options",
  41.    -underline        => 1,
  42.    -background       => $color_fondo,
  43.    -foreground       => $color_texto,
  44.    -activebackground => $color_texto
  45. )->pack( -side => "left" );
  46. my $aba = $d->Menubutton(
  47.    -text             => "About",
  48.    -underline        => 1,
  49.    -background       => $color_fondo,
  50.    -foreground       => $color_texto,
  51.    -activebackground => $color_texto
  52. )->pack( -side => "left" );
  53. my $exa = $d->Menubutton(
  54.    -text             => "Exit",
  55.    -underline        => 1,
  56.    -background       => $color_fondo,
  57.    -foreground       => $color_texto,
  58.    -activebackground => $color_texto
  59. )->pack( -side => "left" );
  60. $d->pack( -side => "top", -fill => "x" );
  61.  
  62. $max->command(
  63.    -label      => "Crack",
  64.    -background => $color_fondo,
  65.    -foreground => $color_texto,
  66.    -command    => \&cracknow
  67. );
  68. $max->command(
  69.    -label      => "Add Hash",
  70.    -background => $color_fondo,
  71.    -foreground => $color_texto,
  72.    -command    => \&addhash
  73. );
  74. $max->command(
  75.    -label      => "Add File with hashes",
  76.    -background => $color_fondo,
  77.    -foreground => $color_texto,
  78.    -command    => \&addfilea
  79. );
  80. $max->command(
  81.    -label      => "Clean List",
  82.    -background => $color_fondo,
  83.    -foreground => $color_texto,
  84.    -command    => \&cleanow
  85. );
  86.  
  87. $aba->command(
  88.    -label      => "About",
  89.    -background => $color_fondo,
  90.    -foreground => $color_texto,
  91.    -command    => \&about
  92. );
  93.  
  94. $exa->command(
  95.    -label      => "Exit",
  96.    -background => $color_fondo,
  97.    -foreground => $color_texto,
  98.    -command    => \&salir
  99. );
  100.  
  101. $ta->Label(
  102.    -text       => "Hashes",
  103.    -background => $color_fondo,
  104.    -foreground => $color_texto,
  105.    -font       => "Impact"
  106. )->place( -x => 110, -y => 50 );
  107. my $had = my $has = $ta->Listbox(
  108.    -width      => 36,
  109.    -height     => 15,
  110.    -background => $color_fondo,
  111.    -foreground => $color_texto
  112. )->place( -x => 32, -y => 100 );
  113.  
  114. $ta->Label(
  115.    -text       => "Results",
  116.    -background => $color_fondo,
  117.    -foreground => $color_texto,
  118.    -font       => "Impact"
  119. )->place( -x => 380, -y => 50 );
  120. my $red = my $res = $ta->Listbox(
  121.    -width      => 36,
  122.    -height     => 15,
  123.    -background => $color_fondo,
  124.    -foreground => $color_texto
  125. )->place( -x => 300, -y => 100 );
  126.  
  127. my $status = $ta->Label(
  128.    -text       => "Status : <None>",
  129.    -background => $color_fondo,
  130.    -foreground => $color_texto,
  131.    -font       => "Impact1"
  132. )->place( -x => 220, -y => 350 );
  133.  
  134. MainLoop;
  135.  
  136. sub cracknow {
  137.  
  138.    my @hashes = $had->get( "0.0", "end" );
  139.    my @hashes = repes(@hashes);
  140.  
  141.    for my $ha (@hashes) {
  142.        $status->configure( -text => "[+] Searching .." );
  143.        $ta->update;
  144.        my $re = crackit($ha);
  145.        if ( $re =~ /false01/ig ) {
  146.            $red->insert( "end", "Not Found" );
  147.        }
  148.        else {
  149.            $red->insert( "end", $re );
  150.            savefile( "hashes-found.txt", $ha . ":" . $re );
  151.        }
  152.    }
  153.    $status->configure( -text => "Status : <None>" );
  154. }
  155.  
  156. sub addfilea {
  157.  
  158.    my $mediox = MainWindow->new(
  159.        -background => $color_fondo,
  160.        -foreground => $color_texto
  161.    );
  162.    $mediox->geometry("390x90+20+20");
  163.    $mediox->resizable( 0, 0 );
  164.    $mediox->title("Add File");
  165.  
  166.    $mediox->Label(
  167.        -text       => "File : ",
  168.        -background => $color_fondo,
  169.        -foreground => $color_texto,
  170.        -font       => "Impact1"
  171.    )->place( -x => 10, -y => 30 );
  172.    my $enafa = $mediox->Entry(
  173.        -background => $color_fondo,
  174.        -foreground => $color_texto,
  175.        -width      => 33
  176.    )->place( -y => 33, -x => 55 );
  177.    $mediox->Button(
  178.        -text             => "Browse",
  179.        -background       => $color_fondo,
  180.        -foreground       => $color_texto,
  181.        -width            => 7,
  182.        -activebackground => $color_texto,
  183.        -command          => \&bronax
  184.    )->place( -y => 33, -x => 265 );
  185.    $mediox->Button(
  186.        -text             => "Load",
  187.        -background       => $color_fondo,
  188.        -foreground       => $color_texto,
  189.        -width            => 7,
  190.        -activebackground => $color_texto,
  191.        -command          => \&bronaxx
  192.    )->place( -y => 33, -x => 320 );
  193.  
  194.    sub bronax {
  195.        $browse = $mediox->FileSelect( -directory => getcwd() );
  196.        my $fileax = $browse->Show;
  197.        $enafa->configure( -text => $fileax );
  198.    }
  199.  
  200.    sub bronaxx {
  201.        open( OPEN, $enafa->get );
  202.        my @ve = <OPEN>;
  203.        close OPEN;
  204.        for my $no (@ve) {
  205.            chomp $no;
  206.            if ( ver_length($no) ) {
  207.                $had->insert( "end", $no );
  208.            }
  209.        }
  210.    }
  211. }
  212.  
  213. sub addhash {
  214.  
  215.    my $plac = MainWindow->new(
  216.        -background => $color_fondo,
  217.        -foreground => $color_texto
  218.    );
  219.    $plac->geometry("350x90+20+20");
  220.    $plac->resizable( 0, 0 );
  221.    $plac->title("Add Hash");
  222.  
  223.    $plac->Label(
  224.        -text       => "Hash : ",
  225.        -background => $color_fondo,
  226.        -foreground => $color_texto,
  227.        -font       => "Impact1"
  228.    )->place( -x => 10, -y => 30 );
  229.    my $ewa = $plac->Entry(
  230.        -background => $color_fondo,
  231.        -foreground => $color_texto,
  232.        -width      => 33
  233.    )->place( -y => 33, -x => 60 );
  234.    $plac->Button(
  235.        -text             => "Add",
  236.        -background       => $color_fondo,
  237.        -activebackground => $color_texto,
  238.        -foreground       => $color_texto,
  239.        -width            => 7,
  240.        -command          => \&addnowa
  241.    )->place( -y => 33, -x => 275 );
  242.  
  243.    sub addnowa {
  244.        if ( ver_length( $ewa->get ) ) {
  245.            $had->insert( "end", $ewa->get );
  246.        }
  247.        else {
  248.            $ta->Dialog(
  249.                -title            => "Error",
  250.                -buttons          => ["OK"],
  251.                -text             => "Hash invalid",
  252.                -background       => $color_fondo,
  253.                -foreground       => $color_texto,
  254.                -activebackground => $color_texto
  255.            )->Show();
  256.        }
  257.    }
  258. }
  259.  
  260. sub cleanow {
  261.    $had->delete( 0.0, "end" );
  262.    $red->delete( 0.0, "end" );
  263. }
  264.  
  265. sub about {
  266.    $ta->Dialog(
  267.        -title            => "About",
  268.        -buttons          => ["OK"],
  269.        -text             => "This program was coded by Doddy Hackman in 2012",
  270.        -background       => $color_fondo,
  271.        -foreground       => $color_texto,
  272.        -activebackground => $color_text
  273.    )->Show();
  274. }
  275.  
  276. sub salir {
  277.    exit(1);
  278. }
  279.  
  280. sub crackit {
  281.  
  282.    my $target = shift;
  283.  
  284.    chomp $target;
  285.  
  286.    my %hash = (
  287.  
  288.        'http://md5.hashcracking.com/search.php?md5=' => {
  289.            'tipo'  => 'get',
  290.            'regex' => "Cleartext of $target is (.*)",
  291.        },
  292.  
  293.        'http://www.hashchecker.com/index.php?_sls=search_hash' => {
  294.            'variables' => { 'search_field' => $target, 'Submit' => 'search' },
  295.            'regex' =>
  296.              "<td><li>Your md5 hash is :<br><li>$target is <b>(.*)<\/b>",
  297.        },
  298.  
  299.        'http://md5.rednoize.com/?q=' => {
  300.            'tipo'  => 'get',
  301.            'regex' => "<div id=\"result\" >(.*)<\/div>"
  302.        },
  303.  
  304.        'http://md52.altervista.org/index.php?md5=' => {
  305.            'tipo'  => 'get',
  306.            'regex' => "<br>Password: <font color=\"Red\">(.*)<\/font><\/b>"
  307.          }
  308.  
  309.    );
  310.  
  311.    for my $data ( keys %hash ) {
  312.        $ta->update;
  313.        if ( $hash{$data}{tipo} eq "get" ) {
  314.            $code = toma( $data . $target );
  315.            if ( $code =~ /$hash{$data}{regex}/ig ) {
  316.                my $found = $1;
  317.                unless ( $found =~ /\[Non Trovata\]/ ) {
  318.                    return $found;
  319.                    last;
  320.                }
  321.            }
  322.        }
  323.        else {
  324.            $code = tomar( $data, $hash{$data}{variables} );
  325.            if ( $code =~ /$hash{$data}{regex}/ig ) {
  326.                my $found = $1;
  327.                return $found;
  328.                last;
  329.            }
  330.        }
  331.    }
  332.    return "false01";
  333. }
  334.  
  335. sub savefile {
  336.    open( SAVE, ">>" . $_[0] );
  337.    print SAVE $_[1] . "\n";
  338.    close SAVE;
  339. }
  340.  
  341. sub repes {
  342.    my @limpio;
  343.    foreach $test (@_) {
  344.        push @limpio, $test unless $repe{$test}++;
  345.    }
  346.    return @limpio;
  347. }
  348.  
  349. sub ver_length {
  350.    return true if length( $_[0] ) == 32;
  351. }
  352.  
  353. sub toma {
  354.    return $nave->get( $_[0] )->content;
  355. }
  356.  
  357. sub tomar {
  358.    my ( $web, $var ) = @_;
  359.    return $nave->post( $web, [ %{$var} ] )->content;
  360. }
  361.  
  362. #The End ?
  363.  


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,474 Último mensaje 14 Octubre 2011, 15:25 pm
por BigBear
[Perl] Finder Pass 0.3
Scripting
BigBear 0 1,496 Último mensaje 31 Marzo 2012, 22:46 pm
por BigBear
[Perl] Finder Paths 0.6
Scripting
BigBear 0 1,324 Último mensaje 8 Abril 2012, 01:55 am
por BigBear
[Perl Tk] Finder Paths 0.7
Scripting
BigBear 0 1,429 Último mensaje 8 Abril 2012, 01:56 am
por BigBear
[Perl] Finder Text 0.2
Scripting
BigBear 0 1,363 Último mensaje 23 Junio 2012, 18:15 pm
por BigBear
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines