Log in

View Full Version : question about md5()


dv6cougar
05-09-2003, 03:53 PM
ok so i know the passwords are encrypted into the database using md5()

now when pulling it uses this code


if ($user=$DB_site->query_first("SELECT userid,username,password,cookieuser FROM user WHERE username='".addslashes(htmlspecialchars($username))."'")) {
if ($user['password']!=md5($password)) { // check password
eval("standarderror(\"".gettemplate("error_wrongpassword")."\");");
exit;
}


how does it geht the variable $password ?

i need to hack in a login from somewhere else, how do in decrypt the password from the encryption?

the above came from member.php under if($action=="login") {


thanks alot :)

Xenon
05-09-2003, 04:47 PM
md5 cannot be decrypted, so you have to encrypt the value of the other loginscript and compare the md5 hashes

dv6cougar
05-10-2003, 12:00 AM
thanks xenon, i actually figured it out earlier :)