PDA

View Full Version : md5



dreamerp
May 2nd, 2005, 10:07 PM
If you md5 a string, such as
md5($password) is it possible to submit that to a database, but still type in the regular $password to login? Let's say $password = testing . Then you md5($password) and submit it to the database, would it be possible to still type in testing as a password?

ahmed
May 2nd, 2005, 11:06 PM
If you md5 a string, such as
md5($password) is it possible to submit that to a database, but still type in the regular $password to login? Let's say $password = testing . Then you md5($password) and submit it to the database, would it be possible to still type in testing as a password?Yes you can.

If you're using mysql, and assuming you have a table with three fields; id, username, and password, here's how you do it:

<?php

$username= "dreamerp";
$password = "1337p4ssw0rd";

// to insert password into database

$query = "INSERT INTO my_table VALUES ( '', $username, MD5( $password ) );";


// to login

$query = "SELECT * FROM my_table WHERE username = $username AND password = MD5( $password );";

So basically what I'm trying to say, MD5 is also a function built into mysql, and you can use it within your queries.

hl
May 3rd, 2005, 12:19 AM
yep, basically... just make it so when submitted, it's md5ed... in simpler terms.

MTsoul
May 3rd, 2005, 12:38 AM
Haha, I hacked a version of vBulletin once so that all the md5 functions are gone. The list of passwords in the database was readable to the human eyes :lol:

andr.in
May 3rd, 2005, 12:44 AM
Haha, I hacked a version of vBulletin once so that all the md5 functions are gone. The list of passwords in the database was readable to the human eyes :lol:
haahahhahhehehe hilraious I can't stop laughing :P

... no really :-/ ;)

hl
May 3rd, 2005, 03:09 PM
Haha, I hacked a version of vBulletin once so that all the md5 functions are gone. The list of passwords in the database was readable to the human eyes :lol:
i don't stoop down to trying to steal peoples passwords ;).

ahmed
May 3rd, 2005, 04:55 PM
Haha, I hacked a version of vBulletin once so that all the md5 functions are gone. The list of passwords in the database was readable to the human eyes :lol:right?

teiz77
May 4th, 2005, 03:08 AM
Haha, I hacked a version of vBulletin once so that all the md5 functions are gone. The list of passwords in the database was readable to the human eyes :lol:

Why would you want to do that?.. That's not very nice.