Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Topic started by: topkurs1 on October 11, 2018, 06:16:05 PM

Title: Login after converting
Post by: topkurs1 on October 11, 2018, 06:16:05 PM
Hello everybody! Nice to meet you :)
I have a problem after converting my board from ipb2 to smf 2.0.
I have used converter from this topic - https://www.simplemachines.org/community/index.php?topic=149092.0
Everything had converted +- normal, only with little problems.

SMF have builed in ipb2-like pass-hash support. When, after convert made, member login to forum, he had to login with it's old password. In DB there is old ipb2-like hash-salt. And with first login, that entry changes to smf-like hash. So that password had converted with first member login.

But now I have such task. I need to change all members hash'es to SMF format. How can I do this? How can I convert in DB all ipb2-like hash-salt to smf-style without member login?
Title: Re: Login after converting
Post by: vbgamer45 on October 11, 2018, 06:17:47 PM
You can't it occurs on login. The user enters their correct password. It then rehashes it with the SMF format which is used going forward.
Title: Re: Login after converting
Post by: topkurs1 on October 11, 2018, 06:24:43 PM
Okay, and if I have non-hashed passwords (e-mail and password), how can I login with all members? Something, like bruteforce to my login page with e-mail+pass one by one?

* I have non-hashed passwords
* I need to convert it to smf-style in DB
Title: Re: Login after converting
Post by: Kindred on October 11, 2018, 07:31:03 PM
why can you just not wait for users to log in on their own and update the password the correct way?
Title: Re: Login after converting
Post by: vbgamer45 on October 11, 2018, 07:34:45 PM
You can do  for each user

sha1(strtolower($username) . $password)