UNKNOWN =************************************** = Name: mandy5.pl = Description: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. = 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 values and assumes that it is the correct hash.) = =Assumes:This script is USED IN COMPLEMENT 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. Working on optimizing it to use WAY less memory, and the tables can become QUITE hard drive intensive. Larger tables are also VERY HDD intensive, as Rainbow tables are. =This code is copyrighted and has limited warranties. =Please see http://www.Planet-Source-Code.com/xq/ASP/txtCodeId.793/lngWId.6/qx/vb/scripts/ShowCode.htm =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;}