By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,601 Members | 989 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,601 IT Pros & Developers. It's quick & easy.

md5 crypting in vbulletin

abdoelmasry
100+
P: 104
Hi men
im trying to develop script for vbulletin

i will ask the user to enter his password im forum

i should validate password from database

i know that vbulletin use md5() to crypt passwords but
i need to know it do that

ex:

i tryed to check the password 123456 but this way:


[PHP]$gtdata=mysql_query("select password from user where username='abdoelmasry'");
$cdata=mysql_fetch_row($gtdata);

if(md5($cdata[0])=="123456"){
echo "Ok Go";
}
else{
echo "Invalid Password";
}[/PHP]
im sure that the password is 123456

why i cann't check it by md5() ??
Jun 2 '07 #1
Share this Question
Share on Google+
2 Replies


P: 43
I am not sure what you are asking, but let me try to help. If vbulletin has the password stored as an md5, then you will want to check the password by creating the md5 of the password you are checking. So I would try:

[PHP]$gtdata=mysql_query("select password from user where username='abdoelmasry'");
$cdata=mysql_fetch_row($gtdata);

if($cdata[0]==md5("123456")){
echo "Ok Go";
}
else{
echo "Invalid Password";
}[/PHP]
Jun 2 '07 #2

abdoelmasry
100+
P: 104
hi johnhjohn

i got it

vbulletin use this way to code userpasswords

[PHP]$md5_password=md5(md5('123456').$user['salt']);[/PHP]

Abdo Elmasry
Jun 3 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.