#!usr/bin/perl
#MD5 Crack 0.2
#Version Tk
#Coded By Doddy H
#Test with
#098f6bcd4621d373cade4e832627b4f6 : test
#cc03e747a6afbbcbf8be7668acfebee5 : test.123
#1943b8b39ca8df2919faff021e0aca98 : testar
#177dac170d586383bcc889602b2bb788 : testar.123
use Tk;
use Tk::Dialog;
use Tk::FileSelect;
use Cwd;
use Digest
::MD5 qw(md5_hex
);
#if ($^O eq 'MSWin32') {
#use Win32::Console;
#Win32::Console::Free();
#}
my $color_texto = "yellow";
my $color_fondo = "black";
my $kak =
MainWindow->new( -background => $color_fondo, -foreground => $color_texto );
$kak->title("MD5 Crack T00l 0.2");
$kak->geometry("300x410+50+50");
$kak->resizable( 0, 0 );
$menulax = $kak->Frame(
-relief => "sunken",
-bd => 1,
-background => $color_fondo,
-foreground => $color_texto
);
my $menulnowaxmu = $menulax->Menubutton(
-text => "Options",
-underline => 1,
-background => $color_fondo,
-foreground => $color_texto,
-activebackground => $color_texto
)->pack( -side => "left" );
my $aboutnowaxmu = $menulax->Menubutton(
-text => "About",
-underline => 1,
-background => $color_fondo,
-foreground => $color_texto,
-activebackground => $color_texto
)->pack( -side => "left" );
my $exitnowaxmu = $menulax->Menubutton(
-text => "Exit",
-underline => 1,
-background => $color_fondo,
-foreground => $color_texto,
-activebackground => $color_texto
)->pack( -side => "left" );
$menulax->pack( -side => "top", -fill => "x" );
$menulnowaxmu->command(
-label => "Crack Hash",
-background => $color_fondo,
-foreground => $color_texto,
-command => \&crackhash
);
$menulnowaxmu->command(
-label => "Crack Wordlist",
-background => $color_fondo,
-foreground => $color_texto,
-command => \&crackhashes
);
$menulnowaxmu->command(
-label => "Load hashes",
-background => $color_fondo,
-foreground => $color_texto,
-command => \&bronafar
);
$menulnowaxmu->command(
-label => "Load file",
-background => $color_fondo,
-foreground => $color_texto,
-command => \&bronaf
);
$menulnowaxmu->command(
-label => "Open Logs",
-background => $color_fondo,
-foreground => $color_texto,
-command => \&openlogska
);
$aboutnowaxmu->command(
-label => "About",
-background => $color_fondo,
-foreground => $color_texto,
-command => \&aboutxam
);
$exitnowaxmu->command(
-label => "Exit",
-background => $color_fondo,
-foreground => $color_texto,
-command => \&exitnowm
);
$kak->Label(
-text => "Hash : ",
-font => "Impact",
-background => $color_fondo,
-foreground => $color_texto
)->place( -x
=> 20, -y => 40 ); my $md5 = $kak->Entry(
-width => 33,
-background => $color_fondo,
-foreground => $color_texto
)->place( -x
=> 70, -y => 45 );
$kak->Label(
-text => "File : ",
-font => "Impact",
-background => $color_fondo,
-foreground => $color_texto
)->place( -x
=> 22, -y => 70 ); my $word = $kak->Entry(
-width => 34,
-background => $color_fondo,
-foreground => $color_texto
)->place( -x
=> 63, -y => 75 );
$kak->Label(
-text => "Salt : ",
-font => "Impact",
-background => $color_fondo,
-foreground => $color_texto
)->place( -x
=> 22, -y => 100 ); my $salt = $kak->Entry(
-width => 34,
-background => $color_fondo,
-foreground => $color_texto
)->place( -x
=> 63, -y => 105 );
$kak->Label(
-text => "Hashes Found",
-font => "Impact",
-background => $color_fondo,
-foreground => $color_texto
)->place( -x
=> 90, -y => 150 ); my $ha = $kak->Listbox(
-width => 40,
-height => 10,
-background => $color_fondo,
-foreground => $color_texto
)->place( -x
=> 25, -y => 190 );
$kak->Label(
-text => "Status : ",
-font => "Impact",
-background => $color_fondo,
-foreground => $color_texto
)->place( -x
=> 37, -y => 360 ); my $tatus = $kak->Entry(
-width => 25,
-background => $color_fondo,
-foreground => $color_texto
)->place( -x
=> 95, -y => 365 );
MainLoop;
sub crackhashes {
$ha->delete( "0.0", "end" );
$tatus->configure( -text => " " );
my $file = $md5->get;
my $wordlist = $word->get;
my $salt = $salt->get;
my @hashes = openwordlist($file);
my $formar;
for my $md5 (@hashes) {
my $formar = $md5;
if ( ver_length($md5) ) {
my @words = openwordlist($wordlist);
for my $word (@words) {
$kak->update;
my $formardos;
if ( $salt eq "" ) {
$formardos = md5_hex($word);
}
else {
$formardos = md5_hex( $word . $salt );
}
if ( $formar eq $formardos ) {
$ha->insert( "end", $formar . ":" . $word );
$tatus->configure( -text => $word );
savefile( "md5-found.txt", $formar . ":" . $word );
last;
}
else {
$tatus->configure( -text => $word );
}
}
}
else {
$kak->Dialog(
-title => "Error",
-buttons => ["OK"],
-text => "Hash invalid",
-background => $color_fondo,
-foreground => $color_texto,
-activebackground => $color_texto
)->Show();
last;
}
}
}
sub crackhash {
$ha->delete( "0.0", "end" );
$tatus->configure( -text => " " );
my $md5 = $md5->get;
my $wordlist = $word->get;
my $salt = $salt->get;
my $formar = $md5;
if ( ver_length($md5) ) {
my @words = openwordlist($wordlist);
for my $word (@words) {
$kak->update;
my $formardos;
if ( $salt eq "" ) {
$formardos = md5_hex($word);
}
else {
$formardos = md5_hex( $word . $salt );
}
if ( $formar eq $formardos ) {
$tatus->configure( -text => $word );
$ha->insert( "end", $formar . ":" . $word );
savefile( "md5-found.txt", $formar . ":" . $word );
last;
}
else {
$tatus->configure( -text => $word );
}
}
}
else {
$kak->Dialog(
-title => "Error",
-buttons => ["OK"],
-text => "Hash invalid",
-background => $color_fondo,
-foreground => $color_texto,
-activebackground => $color_texto
)->Show();
}
}
sub ver_length {
}
sub openwordlist {
my ( $file, $tipo ) = @_;
unless ( -f $file ) {
$kak->Dialog(
-title => "Error",
-buttons => ["OK"],
-text => "File not found",
-background => $color_fondo,
-foreground => $color_texto,
-activebackground => $color_texto
)->Show();
last;
}
my @words = <FILE>;
}
sub bronafar {
$kak->update;
$browse = $kak->FileSelect( -directory => getcwd() );
my $file = $browse->Show;
$md5->configure( -text => $file );
}
sub bronaf {
$kak->update;
$browse = $kak->FileSelect( -directory => getcwd() );
my $file = $browse->Show;
$word->configure( -text => $file );
}
sub openlogska {
my $f = "md5-found.txt";
if ( -f $f ) {
}
else {
$kak->Dialog(
-title => "Error",
-buttons => ["OK"],
-text => "File Not Found",
-background => $color_fondo,
-foreground => $color_texto,
-activebackground => $color_texto
)->Show();
}
}
sub aboutxam {
$kak->Dialog(
-title => "About",
-buttons => ["OK"],
-text => "Coded By Doddy H",
-background => $color_fondo,
-foreground => $color_texto,
-activebackground => $color_texto
)->Show();
}
sub exitnowm {
}
sub savefile {
open( SAVE
, ">>" . $_[0] ); }
sub repes {
my @limpio;
foreach $test (@_) {
push @limpio, $test unless $repe{$test}++; }
}
#The End ?