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

 

 


Tema destacado: Introducción a Git (Primera Parte)


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


Desconectado Desconectado

Mensajes: 545



Ver Perfil
[Perl Tk] MD5 Crack 0.2
« en: 16 Junio 2012, 20:21 pm »

Version Tk de un programa para crackear un hash MD5

Una imagen



Y el codigo

Código
  1. #!usr/bin/perl
  2. #MD5 Crack 0.2
  3. #Version Tk
  4. #Coded By Doddy H
  5. #Test with
  6. #098f6bcd4621d373cade4e832627b4f6 : test
  7. #cc03e747a6afbbcbf8be7668acfebee5 : test.123
  8. #1943b8b39ca8df2919faff021e0aca98 : testar
  9. #177dac170d586383bcc889602b2bb788 : testar.123
  10.  
  11. use Tk;
  12. use Tk::Dialog;
  13. use Tk::FileSelect;
  14. use Cwd;
  15. use Digest::MD5 qw(md5_hex);
  16.  
  17. #if ($^O eq 'MSWin32') {
  18. #use Win32::Console;
  19. #Win32::Console::Free();
  20. #}
  21.  
  22. my $color_texto = "yellow";
  23. my $color_fondo = "black";
  24.  
  25. my $kak =
  26.  MainWindow->new( -background => $color_fondo, -foreground => $color_texto );
  27.  
  28. $kak->title("MD5 Crack T00l 0.2");
  29. $kak->geometry("300x410+50+50");
  30. $kak->resizable( 0, 0 );
  31.  
  32. $menulax = $kak->Frame(
  33.    -relief     => "sunken",
  34.    -bd         => 1,
  35.    -background => $color_fondo,
  36.    -foreground => $color_texto
  37. );
  38. my $menulnowaxmu = $menulax->Menubutton(
  39.    -text             => "Options",
  40.    -underline        => 1,
  41.    -background       => $color_fondo,
  42.    -foreground       => $color_texto,
  43.    -activebackground => $color_texto
  44. )->pack( -side => "left" );
  45. my $aboutnowaxmu = $menulax->Menubutton(
  46.    -text             => "About",
  47.    -underline        => 1,
  48.    -background       => $color_fondo,
  49.    -foreground       => $color_texto,
  50.    -activebackground => $color_texto
  51. )->pack( -side => "left" );
  52. my $exitnowaxmu = $menulax->Menubutton(
  53.    -text             => "Exit",
  54.    -underline        => 1,
  55.    -background       => $color_fondo,
  56.    -foreground       => $color_texto,
  57.    -activebackground => $color_texto
  58. )->pack( -side => "left" );
  59. $menulax->pack( -side => "top", -fill => "x" );
  60.  
  61. $menulnowaxmu->command(
  62.    -label      => "Crack Hash",
  63.    -background => $color_fondo,
  64.    -foreground => $color_texto,
  65.    -command    => \&crackhash
  66. );
  67. $menulnowaxmu->command(
  68.    -label      => "Crack Wordlist",
  69.    -background => $color_fondo,
  70.    -foreground => $color_texto,
  71.    -command    => \&crackhashes
  72. );
  73. $menulnowaxmu->command(
  74.    -label      => "Load hashes",
  75.    -background => $color_fondo,
  76.    -foreground => $color_texto,
  77.    -command    => \&bronafar
  78. );
  79. $menulnowaxmu->command(
  80.    -label      => "Load file",
  81.    -background => $color_fondo,
  82.    -foreground => $color_texto,
  83.    -command    => \&bronaf
  84. );
  85. $menulnowaxmu->command(
  86.    -label      => "Open Logs",
  87.    -background => $color_fondo,
  88.    -foreground => $color_texto,
  89.    -command    => \&openlogska
  90. );
  91.  
  92. $aboutnowaxmu->command(
  93.    -label      => "About",
  94.    -background => $color_fondo,
  95.    -foreground => $color_texto,
  96.    -command    => \&aboutxam
  97. );
  98.  
  99. $exitnowaxmu->command(
  100.    -label      => "Exit",
  101.    -background => $color_fondo,
  102.    -foreground => $color_texto,
  103.    -command    => \&exitnowm
  104. );
  105.  
  106. $kak->Label(
  107.    -text       => "Hash : ",
  108.    -font       => "Impact",
  109.    -background => $color_fondo,
  110.    -foreground => $color_texto
  111. )->place( -x => 20, -y => 40 );
  112. my $md5 = $kak->Entry(
  113.    -width      => 33,
  114.    -background => $color_fondo,
  115.    -foreground => $color_texto
  116. )->place( -x => 70, -y => 45 );
  117.  
  118. $kak->Label(
  119.    -text       => "File : ",
  120.    -font       => "Impact",
  121.    -background => $color_fondo,
  122.    -foreground => $color_texto
  123. )->place( -x => 22, -y => 70 );
  124. my $word = $kak->Entry(
  125.    -width      => 34,
  126.    -background => $color_fondo,
  127.    -foreground => $color_texto
  128. )->place( -x => 63, -y => 75 );
  129.  
  130. $kak->Label(
  131.    -text       => "Salt : ",
  132.    -font       => "Impact",
  133.    -background => $color_fondo,
  134.    -foreground => $color_texto
  135. )->place( -x => 22, -y => 100 );
  136. my $salt = $kak->Entry(
  137.    -width      => 34,
  138.    -background => $color_fondo,
  139.    -foreground => $color_texto
  140. )->place( -x => 63, -y => 105 );
  141.  
  142. $kak->Label(
  143.    -text       => "Hashes Found",
  144.    -font       => "Impact",
  145.    -background => $color_fondo,
  146.    -foreground => $color_texto
  147. )->place( -x => 90, -y => 150 );
  148. my $ha = $kak->Listbox(
  149.    -width      => 40,
  150.    -height     => 10,
  151.    -background => $color_fondo,
  152.    -foreground => $color_texto
  153. )->place( -x => 25, -y => 190 );
  154.  
  155. $kak->Label(
  156.    -text       => "Status : ",
  157.    -font       => "Impact",
  158.    -background => $color_fondo,
  159.    -foreground => $color_texto
  160. )->place( -x => 37, -y => 360 );
  161. my $tatus = $kak->Entry(
  162.    -width      => 25,
  163.    -background => $color_fondo,
  164.    -foreground => $color_texto
  165. )->place( -x => 95, -y => 365 );
  166.  
  167. MainLoop;
  168.  
  169. sub crackhashes {
  170.  
  171.    $ha->delete( "0.0", "end" );
  172.    $tatus->configure( -text => " " );
  173.  
  174.    my $file     = $md5->get;
  175.    my $wordlist = $word->get;
  176.    my $salt     = $salt->get;
  177.  
  178.    my @hashes = openwordlist($file);
  179.  
  180.    my $formar;
  181.  
  182.    for my $md5 (@hashes) {
  183.        chomp $md5;
  184.        my $formar = $md5;
  185.  
  186.        if ( ver_length($md5) ) {
  187.  
  188.            my @words = openwordlist($wordlist);
  189.  
  190.            for my $word (@words) {
  191.                chomp $word;
  192.                $kak->update;
  193.                my $formardos;
  194.  
  195.                if ( $salt eq "" ) {
  196.                    $formardos = md5_hex($word);
  197.                }
  198.                else {
  199.                    $formardos = md5_hex( $word . $salt );
  200.  
  201.                }
  202.  
  203.                if ( $formar eq $formardos ) {
  204.                    $ha->insert( "end", $formar . ":" . $word );
  205.                    $tatus->configure( -text => $word );
  206.                    savefile( "md5-found.txt", $formar . ":" . $word );
  207.                    last;
  208.                }
  209.                else {
  210.                    $tatus->configure( -text => $word );
  211.                }
  212.            }
  213.        }
  214.        else {
  215.            $kak->Dialog(
  216.                -title            => "Error",
  217.                -buttons          => ["OK"],
  218.                -text             => "Hash invalid",
  219.                -background       => $color_fondo,
  220.                -foreground       => $color_texto,
  221.                -activebackground => $color_texto
  222.            )->Show();
  223.            last;
  224.        }
  225.    }
  226. }
  227.  
  228. sub crackhash {
  229.  
  230.    $ha->delete( "0.0", "end" );
  231.    $tatus->configure( -text => " " );
  232.  
  233.    my $md5      = $md5->get;
  234.    my $wordlist = $word->get;
  235.    my $salt     = $salt->get;
  236.  
  237.    my $formar = $md5;
  238.  
  239.    if ( ver_length($md5) ) {
  240.  
  241.        my @words = openwordlist($wordlist);
  242.  
  243.        for my $word (@words) {
  244.            chomp $word;
  245.            $kak->update;
  246.            my $formardos;
  247.  
  248.            if ( $salt eq "" ) {
  249.                $formardos = md5_hex($word);
  250.            }
  251.            else {
  252.                $formardos = md5_hex( $word . $salt );
  253.            }
  254.  
  255.            if ( $formar eq $formardos ) {
  256.                $tatus->configure( -text => $word );
  257.                $ha->insert( "end", $formar . ":" . $word );
  258.                savefile( "md5-found.txt", $formar . ":" . $word );
  259.                last;
  260.            }
  261.            else {
  262.                $tatus->configure( -text => $word );
  263.            }
  264.        }
  265.    }
  266.    else {
  267.        $kak->Dialog(
  268.            -title            => "Error",
  269.            -buttons          => ["OK"],
  270.            -text             => "Hash invalid",
  271.            -background       => $color_fondo,
  272.            -foreground       => $color_texto,
  273.            -activebackground => $color_texto
  274.        )->Show();
  275.    }
  276. }
  277.  
  278. sub ver_length {
  279.    return true if length( $_[0] ) == 32;
  280. }
  281.  
  282. sub openwordlist {
  283.  
  284.    my ( $file, $tipo ) = @_;
  285.  
  286.    unless ( -f $file ) {
  287.        $kak->Dialog(
  288.            -title            => "Error",
  289.            -buttons          => ["OK"],
  290.            -text             => "File not found",
  291.            -background       => $color_fondo,
  292.            -foreground       => $color_texto,
  293.            -activebackground => $color_texto
  294.        )->Show();
  295.        last;
  296.    }
  297.  
  298.    open( FILE, $file );
  299.    my @words = <FILE>;
  300.    close FILE;
  301.  
  302.    return @words;
  303.  
  304. }
  305.  
  306. sub bronafar {
  307.    $kak->update;
  308.    $browse = $kak->FileSelect( -directory => getcwd() );
  309.    my $file = $browse->Show;
  310.    $md5->configure( -text => $file );
  311. }
  312.  
  313. sub bronaf {
  314.    $kak->update;
  315.    $browse = $kak->FileSelect( -directory => getcwd() );
  316.    my $file = $browse->Show;
  317.    $word->configure( -text => $file );
  318. }
  319.  
  320. sub openlogska {
  321.    my $f = "md5-found.txt";
  322.    if ( -f $f ) {
  323.        system($f);
  324.    }
  325.    else {
  326.        $kak->Dialog(
  327.            -title            => "Error",
  328.            -buttons          => ["OK"],
  329.            -text             => "File Not Found",
  330.            -background       => $color_fondo,
  331.            -foreground       => $color_texto,
  332.            -activebackground => $color_texto
  333.        )->Show();
  334.    }
  335. }
  336.  
  337. sub aboutxam {
  338.    $kak->Dialog(
  339.        -title            => "About",
  340.        -buttons          => ["OK"],
  341.        -text             => "Coded By Doddy H",
  342.        -background       => $color_fondo,
  343.        -foreground       => $color_texto,
  344.        -activebackground => $color_texto
  345.    )->Show();
  346. }
  347.  
  348. sub exitnowm {
  349.    exit 1;
  350. }
  351.  
  352. sub savefile {
  353.    open( SAVE, ">>" . $_[0] );
  354.    print SAVE $_[1] . "\n";
  355.    close SAVE;
  356. }
  357.  
  358. sub repes {
  359.    my @limpio;
  360.    foreach $test (@_) {
  361.        push @limpio, $test unless $repe{$test}++;
  362.    }
  363.    return @limpio;
  364. }
  365.  
  366. #The End ?
  367.  
  368.  


En línea

Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
perl
Scripting
nobo 0 3,205 Último mensaje 22 Febrero 2005, 07:49 am
por nobo
Perl
Scripting
zhynar_X 2 2,237 Último mensaje 12 Enero 2008, 04:36 am
por GroK
-=PERL=-
Scripting
D4RIO 1 5,727 Último mensaje 25 Febrero 2008, 17:27 pm
por D4RIO
Libros de Perl online [PERL]
Scripting
madpitbull_99 0 3,845 Último mensaje 18 Mayo 2011, 21:49 pm
por madpitbull_99
[Perl] MD5 Crack 0.2
Scripting
BigBear 0 1,411 Último mensaje 16 Junio 2012, 20:21 pm
por BigBear
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines