Join us at IRC!
Hacking isn't just Computers & Exploits. It's a Philosophy. - Mr_Cheese
Friday, May 25, 2012
Navigation
Members Online
Total Online: 31
Web Spiders: 15
Guests Online: 30
Members Online: 1

Registered Members: 70208
Newest Member: andresuran
Latest Articles
View Thread

HellBound Hackers | Computer General | Webmasters Lounge

Page 1 of 2 1 2 >
Author

PHP Md4 Hasher?

hefty
Member

Posts: 40
Location:
Joined: 01.01.08
Rank:
Apprentice
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 :
<?php
$encrypted = md4("$unencrypted");
?>
and
<?php
$encrypted = sha2("$unencrypted");
?>
but that just doesn't seem to work, any idea guys?
Author

RE: PHP Md4 Hasher?

slpctrl
Member

Posts: 945
Location: 2147483647
Joined: 19.04.07
Rank:
God
Posted on 28-04-08 01:22
A quick google search uncovered this:

http://us2.php.net/hash

where they seem to use this:

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


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




Edited by slpctrl on 28-04-08 01:22
http://www.totse.com
Author

RE: PHP Md4 Hasher?

hefty
Member

Posts: 40
Location:
Joined: 01.01.08
Rank:
Apprentice
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 hefty on 28-04-08 01:28
Author

RE: PHP Md4 Hasher?

slpctrl
Member

Posts: 945
Location: 2147483647
Joined: 19.04.07
Rank:
God
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.


http://www.totse.com
Author

RE: PHP Md4 Hasher?

hefty
Member

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

RE: PHP Md4 Hasher?

slpctrl
Member

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



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


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 slpctrl on 28-04-08 01:32
http://www.totse.com
Author

RE: PHP Md4 Hasher?

hefty
Member

Posts: 40
Location:
Joined: 01.01.08
Rank:
Apprentice
Posted on 28-04-08 01:34
I'm trying to make it work like 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 />
<?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 hefty on 28-04-08 01:35
Author

RE: PHP Md4 Hasher?

slpctrl
Member

Posts: 945
Location: 2147483647
Joined: 19.04.07
Rank:
God
Posted on 28-04-08 01:39
This should work though untested so:


<?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();
?>



http://www.totse.com
Author

RE: PHP Md4 Hasher?

hefty
Member

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

RE: PHP Md4 Hasher?

slpctrl
Member

Posts: 945
Location: 2147483647
Joined: 19.04.07
Rank:
God
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 :p


http://www.totse.com
Author

RE: PHP Md4 Hasher?

hefty
Member

Posts: 40
Location:
Joined: 01.01.08
Rank:
Apprentice
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?

only_samurai
[IRC Rockstar]

Posts: 984
Location: idling in some random irc channel
Joined: 18.08.06
Rank:
.|unranked|.
Posted on 28-04-08 01:50
in php 5.2+ you can use hash

hash("md5","password";)

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


The problem with a fool-proof system, is eliminating the fool.

"His name is Cereal Killer...Like Fruitloops."
If you cut me, I bleed binary.

http://blog.psych0tik.net/
http://blog.psych0tik.net
Author

RE: PHP Md4 Hasher?

hefty
Member

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

RE: PHP Md4 Hasher?

slpctrl
Member

Posts: 945
Location: 2147483647
Joined: 19.04.07
Rank:
God
Posted on 28-04-08 01:57
^oh lol :o damn I think I had this shit figured out too.

only_samurai wrote:
in php 5.2+ you can use hash

hash("md5","password";)

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 slpctrl on 28-04-08 01:57
http://www.totse.com
Author

RE: PHP Md4 Hasher?

slpctrl
Member

Posts: 945
Location: 2147483647
Joined: 19.04.07
Rank:
God
Posted on 28-04-08 01:59

<?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 slpctrl on 28-04-08 02:00
http://www.totse.com
Author

RE: PHP Md4 Hasher?

hefty
Member

Posts: 40
Location:
Joined: 01.01.08
Rank:
Apprentice
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?

slpctrl
Member

Posts: 945
Location: 2147483647
Joined: 19.04.07
Rank:
God
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 :(


http://www.totse.com
Author

RE: PHP Md4 Hasher?

hefty
Member

Posts: 40
Location:
Joined: 01.01.08
Rank:
Apprentice
Posted on 28-04-08 02:05
Yah, who knows.
Author

RE: PHP Md4 Hasher?

slpctrl
Member

Posts: 945
Location: 2147483647
Joined: 19.04.07
Rank:
God
Posted on 28-04-08 02:07
I'm still not giving up yet :@:) hang on I'll figure it out.


http://www.totse.com
Author

RE: PHP Md4 Hasher?

slpctrl
Member

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


<?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.


http://www.totse.com
Page 1 of 2 1 2 >
Guest
Username

Password

Remember Me


Bookmark This Page
Affiliates
Adverts

 

 

Links
By using, viewing or obtaining any information contained on this site, you agree to the disclaimer.

© HellBound Hackers 2008- 2009. Since 3rd December 2004.