It looks like you're new here. If you want to get involved, click one of these buttons!
#!/usr/local/bin/perl
use LWP::Simple;
use Digest::MD5;
use Digest::SHA1;
my $option = $ARGV[0];
my $hash = $ARGV[1];
my $file = $ARGV[2];
if($option eq \"-o\"){
if($hash){
$check_online = get('http://md5.hashcracking.com/search.php?md5='.$hash.'');
if($check_online =~ \"\n\nCleartext of \".$hash.\" is password\"){
print \"\n\n\".$check_online.\"\n\n\";
}
}
}elsif($option eq \"-d\"){
if($file){
if($hash){
if(length($hash) == 32){
open(PASS, \"+< $file\");
my @possible_passwords = ();
while(<PASS>){
push (@possible_passwords, $_);
}
foreach(@possible_passwords){
$md5_compare = Digest::MD5->new;
$md5_compare->add($_);
$finnished_hash = $md5_compare->hexdigest;
if($finnished_hash eq $hash){
print \"\n\nCleartext of \".$hash.\" is \".$_.\"\n\n\";
$score = 1;
break;
}
}
}elsif(length($hash) == 40){
open(PASS, \"+< $file\");
my @possible_passwords = ();
while(<PASS>){
push (@possible_passwords, $_);
}
foreach(@possible_passwords){
$sha1_compare = Digest::SHA1->new;
$sha1_compare->add($_);
$finnished_sha1hash = $sha1_compare->hexdigest;
if($finnished_sha1hash eq $hash){
print \"\n\nCleartext of \".$hash.\" is \".$_.\"\n\n\";
$score = 1;
break;
}
}
}
if($score < 1){
print \"\n\nPassword Not found...\n\n\";
}
close(PASS);
}
}
}else{
print \"MD5/SHA1 Cracker Made By Mr. P-teo \nPerl 5 Version 14 - 2012\n\n\n\";
print \"-o => Online Cracker (only for MD5)\n\";
print \"+ Example: md5cracker.pl -o 5f4dcc3b5aa765d61d8327deb882cf99\n\";
print \"-d => Dictionary Attack\n\";
print \"+ Example: md5cracker.pl -d 5f4dcc3b5aa765d61d8327deb882cf99 passwordlist.txt\n\";
}
}