Created
January 9, 2012 12:28
-
-
Save bollovan/1582737 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
###################################################### | |
# SHA512 Hash Bruter v1.0 by Exor # | |
###################################################### | |
$ver = "01"; | |
$dbgtmr = "1"; #Intervall of showing the current speed + lastpassword in seconds. | |
if ($dbgtmr<=0){ die "Set dbgtmr to a value >=1 !\n";}; | |
use Digest::SHA("\x73\x68\x61\x35\x31\x32\x5f\x68\x65\x78"); | |
use Time::HiRes("\x67\x65\x74\x74\x69\x6d\x65\x6f\x66\x64\x61\x79"); | |
### You can change the variables at the variable you want , e.g if u think that there should be ¦ in the hash then add it to the "d" section . $alpha = $alpha. "!\"\$%&/()=?-.:\\*'-_:.;,¦" | |
if ($ARGV[0]=~"a") { | |
$alpha = "abcdefghijklmnopqrstuvwxyz";} | |
if ($ARGV[0]=~"b") { | |
$alpha = $alpha. "ABCDEFGHIJKLMNOPQRSTUVWXYZ";} | |
if ($ARGV[0]=~"c") { | |
$alpha = $alpha."1234567890";} | |
if ($ARGV[0]=~"d") { | |
$alpha = $alpha. "!\"\$%&/()=?-.:\\*'-_:.;,";} | |
if ($alpha eq "" or $ARGV[3] eq "") {usage();}; | |
print "\n"; | |
if(length($ARGV[3])!=128){die "\x4e\x6f\x74\x20\x56\x61\x6c\x69\x64\x20\x4d\x64\x35\x2c\x20\x70\x6c\x65\x61\x73\x65\x20\x63\x68\x65\x63\x6b\x20\x79\x6f\x75\x72\x20\x4d\x44\x35\x20\x48\x61\x73\x68\x20\x61\x6e\x64\x20\x46\x69\x78\x20\x69\x74\x21\x0a";}; | |
print "Selected Charset: '$alpha\'\n"; | |
print "Going to Crack '$ARGV[3]'...\n"; | |
for (my $t=$ARGV[1];$t<=$ARGV[2];$t++){ | |
crack ($t); | |
} | |
sub usage{ | |
print "############################################# \n"; | |
print "\x4d\x44\x35\x20\x48\x61\x73\x68\x20\x42\x72\x75\x74\x65\x72\x20\x76\x31\x2e\x30\x20\x62\x79\x20\x45\x78\x6f\x72\x0a"; | |
print "############################################# \n"; | |
print "\x0a"; | |
print "\x55\x73\x65\x3a\x20\x2a\x2e\x70\x6c\x20\x5b\x63\x68\x61\x72\x73\x65\x74\x5d\x20\x5b\x6d\x69\x6e\x63\x6f\x75\x6e\x74\x5d\x20\x5b\x6d\x61\x78\x63\x6f\x75\x6e\x74\x5d\x20\x5b\x53\x48\x41\x35\x31\x32\x5d\x0a";print "\x59\x6f\x75\x20\x43\x61\x6e\x20\x41\x6c\x73\x6f\x20\x4d\x69\x78\x20\x43\x68\x61\x72\x73\x65\x74\x20\x6c\x69\x6b\x65\x3a\x20\x61\x63\x2e\x2e\x0a";print "\x0a";print "\x20\x61\x20\x3d\x20\x61\x62\x63\x64\x65\x66\x67\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7a\x0a";print "\x20\x62\x20\x3d\x20\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5a\x0a";print "\x20\x63\x20\x3d\x20\x31\x32\x33\x34\x35\x36\x37\x38\x39\x30\x0a";print "\x20\x64\x20\x3d\x20\x53\x70\x65\x63\x69\x61\x6c\x20\x43\x68\x61\x72\x73\x0a";print "\x20\x0a";print "\x45\x58\x41\x4d\x50\x4c\x45\x3a\x20\x2e\x2f\x2a\x2e\x70\x6c\x20\x61\x20\x33\x20\x36\x20\x61\x61\x39\x31\x61\x37\x30\x36\x36\x62\x38\x35\x66\x33\x39\x64\x32\x32\x32\x34\x37\x37\x31\x64\x32\x36\x36\x30\x66\x32\x30\x32\x62\x38\x64\x31\x32\x33\x65\x39\x64\x62\x62\x64\x63\x32\x32\x63\x36\x36\x36\x33\x38\x63\x61\x39\x63\x61\x36\x32\x35\x62\x30\x64\x65\x39\x36\x63\x36\x37\x38\x61\x32\x61\x32\x33\x35\x66\x62\x62\x64\x30\x35\x33\x31\x33\x35\x39\x66\x31\x30\x34\x62\x37\x65\x39\x64\x65\x63\x37\x32\x36\x30\x39\x34\x64\x37\x30\x34\x66\x62\x33\x39\x33\x36\x30\x35\x36\x33\x65\x66\x38\x61\x30\x63\x64\x66\x64\x0a";die "\x0a";} | |
sub crack{ | |
$CharSet = shift; | |
@RawString = (); | |
for (my $i =0;$i<$CharSet;$i++){ $RawString[i] = 0;} | |
$Start = gettimeofday(); | |
do{ | |
for (my $i =0;$i<$CharSet;$i++){ | |
if ($RawString[$i] > length($alpha)-1){ | |
if ($i==$CharSet-1){ | |
print "No Results $CharSet Char.\n"; | |
$cnt=0; | |
return false; | |
} | |
$RawString[$i+1]++; | |
$RawString[$i]=0; | |
} | |
} | |
################################################### | |
$ret = ""; | |
for (my $i =0;$i<$CharSet;$i++){ $ret = $ret . substr($alpha,$RawString[$i],1);} | |
$hash = sha512_hex($ret); | |
$cnt++; | |
$Stop = gettimeofday(); | |
if ($Stop-$Start>$dbgtmr){ | |
$cnt = int($cnt/$dbgtmr); | |
print "$cnt hashes\\second.\tLast Pass '$ret\'\n"; | |
$cnt=0; | |
$Start = gettimeofday(); | |
} | |
print "$ARGV[3] -> $hash ($ret)\n"; | |
if ($ARGV[3] eq $hash){ | |
print "\n"; | |
print " #########################################\n"; | |
print "\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x50\x61\x73\x73\x77\x6f\x72\x64\x3a\x20$ret\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a"; | |
print " #########################################\n"; | |
die "\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x50\x61\x73\x73\x77\x6f\x72\x64\x20\x46\x6f\x75\x6e\x64\x2c\x20\x4d\x69\x73\x73\x69\x6f\x6e\x20\x43\x6f\x6d\x70\x6c\x65\x74\x65\x2e\x20\x28\x45\x78\x6f\x72\x53\x6f\x66\x74\x29\x0a"; | |
} | |
################################################### | |
#checkhash($CharSet)."\n"; | |
$RawString[0]++; | |
}while($RawString[$CharSet-1]<length($alpha)); | |
} | |
sub OO00O{$OOOO=shift;$OO0O="";for(my $OO0000=0;$OO0000<$OOOO;$OO0000++){$OO0O=$OO0O . substr($alpha,$RawString[$OO0000],1);}$hash=md5_hex($OO0O);$OO0O0++;$OO=gettimeofday();if($OO-$OOO>$OO000){$OO0O0=int($OO0O0/$OO000);print "$OO0O0\x20\x68\x61\x73\x68\x65\x73\x5c\x73\x65\x63\x6f\x6e\x64\x2e\x09\x4c\x61\x73\x74\x20\x50\x61\x73\x73\x20\x27$OO0O\x5c\x27\x0a";$OO0O0=0;$OOO=gettimeofday();} | |
if ($ARGV[3] eq $hash){ | |
die "\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x50\x61\x73\x73\x77\x6f\x72\x64\x20\x46\x6f\x75\x6e\x64\x2c\x20\x4d\x69\x73\x73\x69\x6f\x6e\x20\x43\x6f\x6d\x70\x6c\x65\x74\x65\x2e\x20\x20\x20\x20\x20\x50\x57\x3d\x20$ret\x0a"; | |
} | |
} |
32112332
commented
Aug 26, 2018
- var freeze = 70; // f (freeze)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment