UNKNOWN =************************************** = Name: mandymake.pl = Description:mandymake.pl (used with mandy5.pl) is a MD5 Hash making script which creates .txt files that contain tables based on user input as to which type (lowercase, uppercase, numbers only, multiple fields) and the length of the table (if 16 is entered for maximum character length it will generate EVERY possible combination of character type possible.) = By: David Keaton = = = Inputs:two inputs, which are shifted through program call. ex: perl mandymake.pl -n 16 will create a 16 character long number table. (Command reflected in Linux console commands) = = Returns:The returns are tables created through the specification of inputs. There is no console returns other than the notification that the table is done, what type of table it is, and max character length. = =Assumes:Main thing, if you do NOT have a perl interpreter (Linux should be distributed with one, and Windows is more than likely not going to have one), you will have to download it and install it. Otherwise, this script needs no installation, and will run on the fly through a cmd/console command. This current code is under testing, and the multi field is a basic compilation. Currently working on converting Multi field into a field that generates lowercase, uppercase, and numbers. If you do not know what to enter, leave all arguments blank and execute, their should be an up-to-date-quickie-manual describing basic functions of the script. = =Side Effects:This program is VERY HDD intensive, a 10 character max number table (this generates EVERY possible number up to 10 characters. 0-9999999999) and their appropriate hash (32 char hex) will take up &gt;40 gigs. This is intensive just as Rainbow tables would be. Currently working on a way to optimize the size of these files. =This code is copyrighted and has limited warranties. =Please see http://www.Planet-Source-Code.com/xq/ASP/txtCodeId.794/lngWId.6/qx/vb/scripts/ShowCode.htm =for details. =************************************** #!usr/bin/perl #this is the table maker for Mandy5 use Digest::MD5; use Switch; if (@ARGV < 2){info();} #using shift(@ARGV) to get paramaters for how long of a string we reach until we stop the tablemake. #using shift@ARGV) to get first parameter of what kinds of tables will be made. $state = shift(@ARGV); $max = shift(@ARGV); $max++; #regexp's to check and see if the arguments are what they need to be. if ($state !~ m/^-[l|u|m|n|a]/){ die "\nYou must enter a valid type for flags!\n"; } if ($state =~ m/.{3,}/){ die "\nYou must enter a valid type for flags!\n"; } if ($max !~ m/\d+/){ die "\nYou must enter a digit for character length!\n"; } #next lines of code make the MD5 codesets in lowercase. switch($state){ case "-l" {goto lower;} case "-u" {goto upper;} case "-m" {goto multi;} case "-n" {goto number;} case "-a" {goto lower;} case default {info();} } lower: $lc_let = a; #debug info: at this point both variables (lc_let + trans) are being made properly. $eax = 0; open(MAKELOW,">MD5cmpLower.txt"); close(MAKELOW); while($eax < $max){ open(MAKELOWER, ">>MD5cmpLower.txt"); use Digest::MD5 qw(md5_hex); $trans = md5_hex($lc_let); print MAKELOWER "$lc_let" . ":" . "$trans"; print MAKELOWER "\n\n"; $lc_let++; close(MAKELOWER); $eax = length($lc_let); } exit unless ($state == "-a"); #next lines of code make the MD5 Codeset in uppercase... upper: $up_let = A; $eax = 0; open(MAKEHIGH, ">MD5cmpUpper.txt"); close(MAKEHIGH); while($eax < $max){ open(MAKEUPPER, ">>MD5cmpUpper.txt"); use Digest::MD5 qw(md5_hex); $trans = md5_hex($up_let); print MAKEUPPER "$up_let" . ":" . "$trans"; print MAKEUPPER "\n\n"; $up_let++; close(MAKEUPPER); $eax = length($up_let); } exit unless ($state == "-a"); #next lines of code will make the MD5 Codeset in lowercase with numbers... multi: $lc_let = a; $eax = 0; $x = 0; open(MAKEMULTI, ">MD5cmpMulti.txt"); close(MAKEMULTI); while($eax < $max){ open(MAKEMULTI, ">>MD5cmpMulti.txt"); use Digest::MD5 qw(md5_hex); $total = "$lc_let" . "$x"; $trans = md5_hex($total); print MAKEMULTI "$lc_let" . "$x" . ":" . "$trans"; print MAKEMULTI "\n\n"; if ($x == 9){ $x = 0; $lc_let++; goto pass;} $x++; pass: close(MAKEMULTI); $total = "$lc_let" . "$x"; $eax = length($total); } exit unless ($state == "-a"); #next lines of code will make the MD5 Codeset in numbers. number: $num = 0; $eax = 0; open(MAKENUMBER, ">MD5cmpNumber.txt"); close(MAKENUMBER); while($eax < $max){ open(MAKENUMBER, ">>MD5cmpNumber.txt"); use Digest::MD5 qw(md5_hex); $trans = md5_hex($num); print MAKENUMBER "$num" . ":" . "$trans"; print MAKENUMBER "\n\n"; $num++; close(MAKENUMBER); $eax = length($num); } exit unless ($state == "-a"); print "\n"; print "\n\nDONE!\n\n"; $max--; print "$max character table made in mode $state =]\n"; close(MAKELOWER); close(MAKEUPPER); close(MAKEMULTI); close(MAKENUMBER); sub info{ print "\nex: 'perl mandymake.pl a 16' (use for 16 characters using all"; print "\nmethods)"; print "\nex: 'perl mandymake.pl n 10' (use only numbers for a 10 character"; print "\n:table)"; print "\nflags:"; print "\n-l -- make table with only lowercase"; print "\n-u -- make table with only uppercase"; print "\n-m -- make table with a mixture of alphanumeric"; print "\n (last character is number, rest are alpha)"; print "\n-n -- make table with only numbers"; print "\n-a -- make table with all types (takes the longest)"; exit;} #for use with first case capital, rest lower. #need to put this above the iterator -1 EIP #open (TEMP, ">temp.txt"); #print TEMP "$up_let"; #while (<TEMP>){ #$regexp =~ m/^.+?:/; #} #$total = length($regexp); #close(TEMP); #NOTES: #need to make with Capitalization with and without numbers