Hello There, Guest! Login Register
Logo
Dismiss this notice
MaDLeeTs is not responsible for any attacks that are carried out on networks, websites or servers.
MaDLeeTs staff members cannot be held responsible.
All information on this forum is for educational purposes only.


[Perl]Simple MD5 Brute-Force ( directory )

  • 0 Vote(s) - 0 Average


08-22-2014, 09:43 AM #1
Marck Offline Junior Member **
Registered
Posts:7 Threads:3 Joined:Aug 2014 Reputation: 1
Mood: Coffee
Hi guy, this is a simple script written in Perl to perform brute-force attacks against an MD5 hash.
( My first thread Biggrinsmiley )

use: $ perl ./script.pl <word-list> <hash>

Code:
#!/usr/bin/perl
#Developed by Marck ( @7mm5l )
#           _____
#         </  U  \>
#        </ _ . _ \>
#       <[|( )~( )|]>
#        <\.| | |./>
#         <|_____|>
#          __|.|__
#         |_______|

use Digest::MD5  qw(md5_hex);

if ($^O =~/Win32/ig) { system("cls"); }else{ system("clear"); }
print ".  ..__ ._,   .__        ,         .___            
|\\/||  \\|_    [__)._.. .-+- _  ___ [__  _ ._. _. _
|  ||__/._)   [__)[  (_| | (/,     |   (_)[  (_.(/,
use: $0 <wordlist> <hash>
";
if (length($ARGV[0])==0 or length($ARGV[1])==0){ exit(); }
if (length($ARGV[1])<32 or length($ARGV[1])>32){ print "\n[~]This hash is not MD5!\n"; exit(); }
print "\n\n[!] For best performance, only the final result will be shown!\n";
open(Word, $ARGV[0]) or die ("\n[!] Unable to open your Word-List!\n");  
while(<Word>) {
my $pass = $_;
chomp $pass;
$codi = md5_hex($pass);
if ($codi eq $ARGV[1]){
print "\n\n[!]Found: $pass\n\n";
exit();
}
}
print "\n\n[~] String not found!\n\n";

08-22-2014, 08:22 PM #2
yhi Offline MadLeets Vip ******
V.I.P
Posts:392 Threads:40 Joined:Mar 2013 Reputation: 14
Mood: Irritated
lol

if u r using a wordlist to crack md5
then its a directory attack not bruteforce attack
edit ur post wink

08-23-2014, 03:05 AM #3
Marck Offline Junior Member **
Registered
Posts:7 Threads:3 Joined:Aug 2014 Reputation: 1
Mood: Coffee
Ops Worriedsmiley
Thanks for letting me hehe Biggrinsmiley

08-23-2014, 07:21 AM #4
T3N38R15 Offline ? lawless-coder *****
Moderators
Posts:790 Threads:48 Joined:Jan 2014 Reputation: 126
Mood: Fine
great share,
ps the line 20 at
Code:
if (length($ARGV[0])=="0" or length($ARGV[1])=="0"){ exit(); }
the return from length is a integer so you just need 0 and not "0" Smiley1

[Image: xodhvlpa.jpg]
[Image: test.php]

08-23-2014, 12:12 PM #5
Marck Offline Junior Member **
Registered
Posts:7 Threads:3 Joined:Aug 2014 Reputation: 1
Mood: Coffee
I put the 0 in quotes because in my computer was giving error and that was the only geito to make it work Worriedsmiley
Thanks for the warning (or remember hehe), already edited the topic Biggrinsmiley






Forum Jump:


Users browsing this thread:1 Guest(s)