Follow us on Twitter!
Become the change you seek in the world. - Gandhi
Monday, April 21, 2014
Navigation
Home
HellBoundHackers Main:
HellBoundHackers Find:
HellBoundHackers Information:
Learn
Communicate
Submit
Shop
Challenges
HellBoundHackers Exploit:
HellBoundHackers Programming:
HellBoundHackers Think:
HellBoundHackers Track:
HellBoundHackers Patch:
HellBoundHackers Other:
HellBoundHackers Need Help?
Other
Members Online
Total Online: 30
Guests Online: 29
Members Online: 1

Registered Members: 82851
Newest Member: darthvador
Latest Articles
View Thread

HellBound Hackers | Computer General | Webmasters Lounge

Page 1 of 2 1 2 >
Author

PHP Md4 Hasher?


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 28-04-08 01:13
Well, my MD5 and SHA1 hasher work but I can't seem to find a way to make it work for MD4, or SHA2. I tried doing this :
Code
<?php
$encrypted = md4("$unencrypted");
?>


and
Code
<?php
$encrypted = sha2("$unencrypted");
?>


but that just doesn't seem to work, any idea guys?
Author

RE: PHP Md4 Hasher?


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 28-04-08 01:22
A quick google search uncovered this:

http://us2.php.net/hash

where they seem to use this:

Code
$MD4Hash=bin2hex(mhash(MHASH_MD4,$Input));




To make an MD4 hash. What's wrong with MD5 and SHA1 though?




Edited by on 28-04-08 01:22
Author

RE: PHP Md4 Hasher?


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 28-04-08 01:25
Nothing is wrong with them, i'm just saying that I got those to work, and not the sha2 or md4.

How would I add this to a form? A lot different so it's hard...Any idea?

Edited by on 28-04-08 01:28
Author

RE: PHP Md4 Hasher?


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 28-04-08 01:28
hefty wrote:
Nothing is wrong with them, i'm just saying that I got those to work, and not the sha2 or md4.



I was unaware really that PHP even had functions built in to handle MD4 and SHA2.


Author

RE: PHP Md4 Hasher?


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 28-04-08 01:29
Yah, well any idea how to get this into a form?
Code
$MD4Hash=bin2hex(mhash(MHASH_MD4,$Input));


Author

RE: PHP Md4 Hasher?


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 28-04-08 01:31
hefty wrote:
Yah, well any idea how to get this into a form?
Code
$MD4Hash=bin2hex(mhash(MHASH_MD4,$Input));





Lol what do you mean? You could make it into a function like this:

Code

Function MD4($input) {
$MD4Hash=bin2hex(mhash(MHASH_MD4,$Input));
}




And use it regularly (md4($hash);) like you would MD5. Of course you should also sanitize your strings too, I didn't include anything from a security perspective though.




Edited by on 28-04-08 01:32
Author

RE: PHP Md4 Hasher?


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 28-04-08 01:34
I'm trying to make it work like this:
Code
<form name="hasher" method="post" action="">
    Text to Hash: <input type="text" name="mhash"><p/>
    <input type="submit" name="Submit" value="Submit">
</form><p />
<?php
$MD4Hash=bin2hex(mhash(MHASH_MD4,$Input))
?>
Your origional text: <?php echo "$unencrypted"; ?><p />
Your MD4 hashed text: <?php echo "$MD4Hash"; ?><p />




EDIT: Just can't seem to make it work with our input.

Edited by on 28-04-08 01:35
Author

RE: PHP Md4 Hasher?


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 28-04-08 01:39
This should work though untested so:

Code

<?php
Function MD4($input) {
$MD4Hash=bin2hex(mhash(MHASH_MD4,$Input));
}
echo <<<THIS
<form name="hasher" method="post" action="">
Text to Hash: <input type="text" name="mhash"><p/>
<input type="submit" name="Submit" value="Submit">
</form><p />
THIS;
if ($_POST['mhash'])
{
$info=md4($input);
echo($info);
}
else
die();
?>






Author

RE: PHP Md4 Hasher?


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 28-04-08 01:42
Sadly it doesn't.
Author

RE: PHP Md4 Hasher?


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 28-04-08 01:44
hefty wrote:
Sadly it doesn't.



You need the mhash plugin, and yeah I know it still doesn't work. I'll do some troubleshooting I'm kinda interested now Pfft


Author

RE: PHP Md4 Hasher?


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 28-04-08 01:45
Haha, yah working on a site with all these tools. I'll try to make it work, if you get it to work reply back =)
Author

RE: PHP Md4 Hasher?


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 28-04-08 01:50
in php 5.2+ you can use hash

hash("md5","password"Wink

http://www.php.net/manual/en/function.hash.php


Author

RE: PHP Md4 Hasher?


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 28-04-08 01:52
Too bad my server only has 4
Author

RE: PHP Md4 Hasher?


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 28-04-08 01:57
^oh lol Shock damn I think I had this shit figured out too.

only_samurai wrote:
in php 5.2+ you can use hash

hash("md5","password"Wink

http://www.php.net/manual/en/function.hash.php



He's right lol and it works with MD4. Gj I was unaware of this function B)




Edited by on 28-04-08 01:57
Author

RE: PHP Md4 Hasher?


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 28-04-08 01:59
Code

<?php
Function MD4($input) {
return $MD4Hash=bin2hex(mhash(MHASH_MD4,$Input));
}
echo <<<THIS
<form name="hasher" method="post" action="">
Text to Hash: <input type="text" name="mhash"><p/>
<input type="submit" name="Submit" value="Submit">
</form><p />
THIS;
if (isset($_POST['mhash']))
{
$newhash = md4($_POST['mhash']);
echo $newhash;
die();
}
else
die();
?>






Here you go, a working MD4 hasher for your version. Cheers m8 B) BUT YOU NEED THE MHASH MODULE INSTALLED AND ENABLED. ;)




Edited by on 28-04-08 02:00
Author

RE: PHP Md4 Hasher?


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 28-04-08 02:01
Works, but for some reason it makes my bottom image on my page dieapear when you click submit. http://elitecs.info/tools/md4.php
Author

RE: PHP Md4 Hasher?


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 28-04-08 02:02
hefty wrote:
Works, but for some reason it makes my bottom image on my page dieapear when you click submit. http://elitecs.info/tools/md4.php



Nah, it doesn't for me but that's not the problem. My problem is no matter what you hash with it it returns the same hash. I have no fucking clue why sorry mate I guess I can't really help you here Sad


Author

RE: PHP Md4 Hasher?


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 28-04-08 02:05
Yah, who knows.
Author

RE: PHP Md4 Hasher?


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 28-04-08 02:07
I'm still not giving up yet AngrySmile hang on I'll figure it out.


Author

RE: PHP Md4 Hasher?


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 28-04-08 02:24
K lol I give, but I have it pretty much nailed to one area:

Code

<?php
Function md4(&$input) {
$input=bin2hex(mhash(MHASH_MD4,$Input));
}
echo <<<THIS
<form name="hasher" method="post" action="">
Text to Hash: <input type="text" name="mhash"><p/>
<input type="submit" name="Submit" value="Submit">
</form><p />
THIS;
if (isset($_POST['mhash']))
{
md4($_POST['mhash']);
echo $_POST['mhash'];
}
else
die();
?>





It HAS to be somewhere in the MD4 function where it's hashing a string in MD4 and it's not $input and outputting that string, not your input. You could try and crack the md4 hash it outputs to try and figure out what the function is hashing and fix it that way though.


Page 1 of 2 1 2 >