Crew-Portal Posted November 10, 2007 Share Posted November 10, 2007 Everyone in the PHP world knows its impossible to decrypt MD5 and SHA1 But A site has done it! But how? Can anyone help me understand how they did this? http://md5encryption.com/?mod=decrypt Quote Link to comment Share on other sites More sharing options...
rajivgonsalves Posted November 10, 2007 Share Posted November 10, 2007 Well it just takes the input key say "test" get the md5 for that "098f6bcd4621d373cade4e832627b4f6" then stores it in the database say keyword | md5 test | 098f6bcd4621d373cade4e832627b4f6 then when you search the md5 098f6bcd4621d373cade4e832627b4f6 it will search the database and give you the result (atleast thats my understanding) Quote Link to comment Share on other sites More sharing options...
Crew-Portal Posted November 10, 2007 Author Share Posted November 10, 2007 Every Word in the world is in that database! Holy **** Thats a lots or records! Guess theres no-one else responding to my question so you must be right. Thanx Quote Link to comment Share on other sites More sharing options...
Crew-Portal Posted November 10, 2007 Author Share Posted November 10, 2007 Hahahaha! I figured it out! <?php function md5_encrypt($plain_text, $password, $iv_len = 16) { $plain_text .= "\x13"; $n = strlen($plain_text); if ($n % 16) $plain_text .= str_repeat("\0", 16 - ($n % 16)); $i = 0; $enc_text = get_rnd_iv($iv_len); $iv = substr($password ^ $enc_text, 0, 512); while ($i < $n) { $block = substr($plain_text, $i, 16) ^ pack('H*', md5($iv)); $enc_text .= $block; $iv = substr($block . $iv, 0, 512) ^ $password; $i += 16; } return base64_encode($enc_text); } function md5_decrypt($enc_text, $password, $iv_len = 16) { $enc_text = base64_decode($enc_text); $n = strlen($enc_text); $i = $iv_len; $plain_text = ''; $iv = substr($password ^ substr($enc_text, 0, $iv_len), 0, 512); while ($i < $n) { $block = substr($enc_text, $i, 16); $plain_text .= $block ^ pack('H*', md5($iv)); $iv = substr($block . $iv, 0, 512) ^ $password; $i += 16; } return preg_replace('/\\x13\\x00*$/', '', $plain_text); } ?> Quote Link to comment Share on other sites More sharing options...
rajivgonsalves Posted November 10, 2007 Share Posted November 10, 2007 well actually its mentioned on the site "Or enter a MD5 hash or SHA1 hash and we will look into our database and try to decrypt MD5 or decrypt SHA1" Quote Link to comment Share on other sites More sharing options...
Crew-Portal Posted November 10, 2007 Author Share Posted November 10, 2007 Ohh... That makes sense. I think my way would be faster than searching a whole database though. That is if the code above even works? Quote Link to comment Share on other sites More sharing options...
Crew-Portal Posted November 10, 2007 Author Share Posted November 10, 2007 Oh well. Whatever. Off to bed Goodnight everyone thanx for the help especially you Rajivgonsalves, Cya all tommorrow. If anyone finds another way to decrypt MD5 Hash please post it! Cya night bye! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.