Skip to content

Instantly share code, notes, and snippets.

@GXTX
Created March 3, 2016 15:11
Show Gist options
  • Save GXTX/2e01257db71c4b83f151 to your computer and use it in GitHub Desktop.
Save GXTX/2e01257db71c4b83f151 to your computer and use it in GitHub Desktop.
<?php
print "What is your private key?: ";
$input = fopen ("php://stdin","r");
$key = trim(fgets($input));
print "What part are we doing? (1 or 2): ";
$input = fopen ("php://stdin","r");
$part = trim(fgets($input));
$i = 1;
while(true){
$hash = md5($key.$i);
$truncatedHash = substr($hash, 0, ($part == 1 ? -27 : -26));
if(str_replace(($part == 1 ? 00000 : 000000), "", $truncatedHash) == "")
die(print "Found: ".$i."\n");
$i++;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment