So, please someone _Code it better_
Actualy it works but it's a bit slow :\
The folowing code loads all md5 hashes from the txt file and try to find for each hash the correct md5 word, the salt is used too.
This kind of passwords are used for exemple by a program named serv-u from Rhino Software.
Actualy they use a random 2 alphanumeric chars plus the md5 of that same 2 chars+word
Exemple:
satl=me
password=crack
The result would be:
medc4779c4c383c77eac29d76f00112c54
salt=me
md5hash=dc4779c4c383c77eac29d76f00112c54
md5hash plaintext is mecrack
#!/usr/bin/perl -w
use Digest::MD5 'md5_hex';
open( PASSWORD, "words00.txt");
open( HASHES, "hashes.txt");
$a="";
$count=0;
$numHashes=0;
while(defined($a=<HASHES>)) {
$hashes.=$a;
$numHashes++;
}
print "Num Hashes: ", $numHashes . "\n";
close(HASHES);
@hashes=split(/\n/, $hashes);
while($input = <PASSWORD>) {
chomp($words = $input);
$hashpos=0;
foreach $saltedHash (@hashes) {
if ($saltedHash ne NULL) {
$myhash = substr($saltedHash, 2, 32);
$mysalt = substr($saltedHash, 0, 2);
my ($m) = md5_hex("$mysalt$words");
if ($m =~ /$myhash/i) {
print "Hash: $myhash salt:$mysalt passwd:$words\n";
$hashes[$hashpos]=NULL;
$count++;
}
}
$hashpos++;
if ($numHashes == $count) {exit;}
}
}
#EOF

Sign In
Register
Help
MultiQuote
