The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Password encryption using vb3 md5.js
I have successfully imported all forums and moderators from my old forum to vb3.
right now tho the moderators have an empty password field. reason being: not sure how to encrypt the password for vbulletin to understand! so, in my password.php script I get the userid and password from my old database, store them in an array, and then what? Is it possible to call the vbulletin_md5.js from a .php script and use it? how do i use it? is it simply $result = md5hash($myPassword[], $resultPassword) [in the md5.js file is says "usage: md5hash(input, ouput)] but then what about the 'salt' I have no idea how to go about doing this! please help! |
#2
|
|||
|
|||
I see noone can help... give more hints maybe!
I have done this... included the md5.js file in my script, I copied in my script the function which creates the Salt in variable $Salt took the password from a user which was 'hello' (it wasnt really but lets pretend) >$oldPassword = 'hello' I then did >$password = md5 ($oldPassword . Salt); This actually seems to work, it returned something like $password = f6cdf703fa4faefd99ab85d25d5f0448 $Salt = G<) but, then i cut and paste these values in the database (password and salt field) wnd when i tried to login it gave me 'wrong username or password' error. what am I doing wrong? |
#3
|
|||
|
|||
This should work, asuming the passwords are plan text in the old database:
PHP Code:
|
#4
|
|||
|
|||
Yes it does work, thank you!
|
#5
|
|||
|
|||
Quote:
UPDATE vbuser SET salt = '000'; UPDATE vbuser SET password = MD5(CONCAT(MD5(old_cleartext_password), salt)); That will do your entire table in one shot. Obviously replace old_cleartext_password with whatever field from whatever table it is that has the passwords. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|