All source code in Perl Ask a Perl Pro Discussion Forum Categories All jobs in Perl
MD5,mandy5pl,brute,forcing,script,used,comple
   Code/Articles � |  Newest/Best � |  Community � |  Jobs � |  Other � |  Goto � | 
CategoriesSearch Newest CodeCoding ContestCode of the DayAsk A ProJobsUpload
Perl Stats

 Code: 92,430. lines
 Jobs: 57. postings

 How to support the site

 
Sponsored by:
Quick Search for:  in language:    
You are in:
 
Login





Latest postings for Perl.
There is currently no new code. Please check back soon.
Click here to put this ticker on your site!


Daily Code Email
To join the 'Code of the Day' Mailing List click here!



 
 
   

mandy5.pl

Print
Email
 
VB icon
Submitted on: 2/2/2009 9:23:50 AM
By: David Keaton 
Level: Intermediate
User Rating: Unrated
Compatibility:5.0 (all versions)

Users have accessed this code 2928 times.
 
author picture
(About the author)
 
     mandy5.pl is a MD5 brute forcing script, and is used in complement to mandymake.pl. Works by comparing tables to the current hash being bashed.
 
code:
Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!
 
Terms of Agreement:   
By using this code, you agree to the following terms...   
1) You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.   
2) You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
3) You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
4) You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.

    =**************************************
    = Name: mandy5.pl
    = Description:mandy5.pl is a MD5 brute f
    =     orcing script, and is used in complement
    =     to mandymake.pl.
    Works by comparing tables to the current hash being bashed.
    = By: David Keaton
    =
    = Inputs:2 arguments are taken
    file type (-n, -l, -u, etc.) which is explained in the readme.txt file I have on my computer, if you request it I will post it. But there is also a mini instruction man if no arguments are filled when you try to execute.
    =
    = Returns:returns the MD5 hash (32 char 
    =     hex) word written in ASCII. (Compares va
    =     lues and assumes that it is the correct 
    =     hash.)
    =
    = Assumes:This script is USED IN COMPLEM
    =     ENT WITH mandymake.pl
    Needed to make the tables for this script to compare values to against the hash being bashed.
    Previous (well tested) version IS available on my HDD, but this version is superior. This version increases reliability by using temp arrays, less memory usage, better inputs instead of file name fields (except for text containing hash, that won't change).
    as this is a perl script, you will not need to install anything EXCEPT a perl interpreter if you are a Windows user.
    =
    = Side Effects:VERY memory intensive if 
    =     you try to make tables ~6 or higher. Wor
    =     king on optimizing it to use WAY less me
    =     mory, and the tables can become QUITE ha
    =     rd drive intensive. Larger tables are al
    =     so VERY HDD intensive, as Rainbow tables
    =     are.
    =
    =This code is copyrighted and has    = limited warranties.Please see http://w
    =     ww.Planet-Source-Code.com/vb/scripts/Sho
    =     wCode.asp?txtCodeId=793&lngWId=6    =for details.    =**************************************
    
    #!usr/bin/perl
    #this is an MD5 bruteforcer, it first makes a table of generated MD5, then test the MD5 with the input.
    use Time::HiRes qw(gettimeofday);
    use Switch;
    if (@ARGV < 2){info();}
    #this input will be the file that we bruteforce and the tables we will use.
    $MD5set = shift(@ARGV);
    $file = shift(@ARGV);
    #setting the filehandle to our hash file. set timer.
    if ($MD5set !~ m/^-[l|u|m|n]/){
    die "Flag must be a do-able flag!\n";
    }
    switch($MD5set){
    case "-l" {$MD5file = "MD5cmpLower.txt";}
    case "-u" {$MD5file = "MD5cmpUpper.txt";}
    case "-m" {$MD5file = "MD5cmpMulti.txt";}
    case "-n" {$MD5file = "MD5cmpNumber.txt";}
    }
    Start:
    open(FILEZ, "<$file");
    $t1 = gettimeofday();
    if ($file !~ m/.+?\.txt/){
    die "This file must be in a valid .txt format!\n\n";
    }
    while(<FILEZ>){
    $line = $_;
    chomp($line);
    $line =~ m/^.+:(.+)?$/;
    $hash = $1;
    }
    close(FILEZ);
    #we closed FILEZ and stored both the user and the hash to their according variables. We now open the table to compare them.
    open(MD5, "<$MD5file") || die "Unable to find MD5cmp.txt! Make sure you ran mandymake.pl prior to running this program!\n\n";
    $y = 0;
    while(<MD5>){
    my ($cashew) = $_;
    chomp($cashew);
    if ($cashew !~ /\n/){
    $cashew =~ m/(.+)?:(.+)?$/;
    $letter = $1;
    $hash_right = $2;
    @array_l[$y] = $letter;
    @array_h[$y] = $hash_right;
    $y++;
    }
    }
    print "\n" x 50;
    print "Analyzing..\n\n";
    for ($z = 0; $z < $y; $z++){
    if(@hash_array[$z] =~ $hash){
    print "@array_l[$z] || @array_h[$z]\n";
    print "Please redraw tables and rematch for consistency, although this\nis more than likely it.";
    $t2 = gettimeofday();
    $time_of_crack = $t2 - $t1;
    print "\nCrack took $time_of_crack" . "s" . " " . "to complete\n";
    $bool = 1;
    }
    delete @array_l[$z];
    delete @array_h[$z];
    }
    if ($bool != 1){
    $t3 = gettimeofday();
    $time_of_crack = $t3 - $t1;
    print "\nTime taken to finish: " . "$time_of_crack" . "s". "\n";
    print "Sorry, could not find hash in table, please redraw size or type.\n";
    print "'perl mandymake.pl /type/ /size/'\n\n";
    }
    sub info{
    print q(
    You must enter the MD5 file you want to brute,
    and the flag referencing to the file you want to brute with.
    Example: 'perl mandy5.pl -X xxx.txt'
    where xxx.txt is the name of the file that 
    contains the hash, and -X is the flag referencing
    the type of hash table.
    );
    return 0;}


Other 1 submission(s) by this author

 

 
 Report Bad Submission
Use this form to notify us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:
 
Your Vote!

What do you think of this code(in the Intermediate category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor See Voting Log
 
Other User Comments

 There are no comments on this submission.
 
Add Your Feedback!
Note:Not only will your feedback be posted, but an email will be sent to the code's author from the email account you registered on the site, so you can correspond directly.

NOTICE: The author of this code has been kind enough to share it with you.  If you have a criticism, please state it politely or it will be deleted.

For feedback not related to this particular code, please click here.
 
To post feedback, first please login.


 

Categories | Articles and Tutorials | Advanced Search | Recommended Reading | Upload | Newest Code | Code of the Month | Code of the Day | All Time Hall of Fame | Coding Contest | Search for a job | Post a Job | Ask a Pro Discussion Forum | Live Chat | Games | Feedback | Customize | Perl Home | Site Home | Other Sites | Open Letter from Moderators | About the Site | Feedback | Link to the Site | Awards | Advertising | Privacy

Copyright� 1997-2010 by Exhedra Solutions, Inc. All Rights Reserved.  By using this site you agree to its Terms and Conditions.   Planet Source Code (tm) and the phrase "Dream It. Code It" (tm) are trademarks of Exhedra Solutions, Inc.