GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   MySQL and PHP guru's help needed (https://gfy.com/showthread.php?t=224250)

acctman 01-22-2004 12:44 AM

MySQL and PHP guru's help needed
 
is there a piece of coding that will convert MySQL password() to PHP MD5() ? i have a database of users on one board and i need to move there account to a new one but the password encrytion is different.

is there a way to de-crypt MySQL passwoard() and then re-encrypt with PHP MD5() ?

JDog 01-22-2004 12:47 AM

Quote:

Originally posted by acctman
is there a piece of coding that will convert MySQL password() to PHP MD5() ? i have a database of users on one board and i need to move there account to a new one but the password encrytion is different.

is there a way to de-crypt MySQL passwoard() and then re-encrypt with PHP MD5() ?

In my experience there is no way to decrypt MySQL password function!

jDoG

SilverTab 01-22-2004 12:58 AM

From the MySQL manual... PASSWORD(str) Calculates a password string from the plaintext password str. This is the function that is used for encrypting MySQL passwords for storage in the Password column of the user grant table. mysql> select PASSWORD('badpwd'); -> '7f84554057dd964b' PASSWORD() encryption is non-reversible. PASSWORD() does not perform password encryption in the same way that Unix passwords are encrypted. You should not assume that if your Unix password and your MySQL password are the same, PASSWORD() will result in the same encrypted value as is stored in the Unix password file. See ENCRYPT(). If you could decrypt this, you might be able to decrypt user passwords from the mysql db.

venturi 01-22-2004 01:01 AM

OY. Never even considered this one. There *should* be a way but I've never seen anything. Have you checked out mysql.org to see if they have anything there? If/when you figure out how to decrypt you can basically do anything with them.

Another option - not exactly an eloquent one - would be to send out a bulk mail to all your members that autogenerates new passwords for them and they just have to confirm the email. Messy, yes, but it would also allow you to notify them that you're changing the board script so they can re-bookmark you. Just an idea - and for every problem facing humanity there is a simple and eloquent, and equally WRONG solution. :1orglaugh

acctman 01-22-2004 03:47 AM

hmm i think i found something http://www.php.net/manual/en/function.md5.php what do you think?

Claude 01-22-2004 03:52 AM

Quote:

Originally posted by venturi
Another option - not exactly an eloquent one - would be to send out a bulk mail to all your members that autogenerates new passwords for them and they just have to confirm the email. Messy, yes, but it would also allow you to notify them that you're changing the board script so they can re-bookmark you. Just an idea - and for every problem facing humanity there is a simple and eloquent, and equally WRONG solution. :1orglaugh
Just do it like that, this way you might also get some older inactive members to renew interest for your board. Sure, itīs not pretty, but if it works why spend time with encryption. You might even benefit from emailing everybody....

woj 01-22-2004 07:02 AM

Quote:

Originally posted by acctman
is there a piece of coding that will convert MySQL password() to PHP MD5() ? i have a database of users on one board and i need to move there account to a new one but the password encrytion is different.

is there a way to de-crypt MySQL passwoard() and then re-encrypt with PHP MD5() ?

You can also tweak the code of the new board a little, so the hashing schemes are the same in both.


All times are GMT -7. The time now is 06:37 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123