PDA

View Full Version : Need passwords in MD5 not MD5 Salted, possible?


Sovereign123
01-26-2012, 12:03 PM
Hallo, I'm making a forum for an MMO conversion of Skyrim, and they currently have people access the game via players Wordpress usernames/passwords. These are in MD5, and the game currently only recognizes MD5.

In order to unify everything so that players don't need a separate Wordpress and forum account, I need to import the Wordpress users into vBulletin, and have new users passwords only be in MD5.

I messed around with functions_login.php, but couldn't get much to work.

Anyone have the knowhow?

kh99
01-26-2012, 12:26 PM
The passwords save in the database are produced using :

md5(md5(password) . salt)


so if you're saying that the passwords stored by wordpress are just md5(password), then you should be able to do md5(wp_md5password . salt) and save it in the vb database (the salt is a user-specific value that you can get from the user table).

Sovereign123
01-29-2012, 03:16 AM
Well I actually want vBulletin to switch to simple MD5 encryption. Yes I know it's less secure, but the game only recognizes MD5 hashes, so there's not much I can do about that

kh99
01-30-2012, 12:50 AM
Unfortunately I don't think there's any mod or one place to change this. The check of the password when you log in is in function verify_authentication() in includes/functions_login.php, and there's a hook there for if it fails, which you could use to create a plugin to do a different password check. But I believe "Remember Me" works by keeping the encrypted password in a cookie, and of course you'd also have to modify the code where the password is changed or set. I'm also not sure if the admicp login uses the same function to check the password. I don't know if it can all be done in plugins.

Searching the code for "md5(md5(" might be a good way to start.