Voir les contributions

Cette section vous permet de consulter les contributions (messages, sujets et fichiers joints) d'un utilisateur. Vous ne pourrez voir que les contributions des zones auxquelles vous avez accès.

Messages - Skullfox

Pages: [1]
Développeurs / Developers / Re : [Bridge][SMF][wip]
« le: 08 mars 2017, 14:18:59 »
Work in progress


PHP Deprecated:  Function mcrypt_get_iv_size() is deprecated
PHP Deprecated:  Function mcrypt_create_iv() is deprecated
PHP Deprecated:  Function mcrypt_decrypt() is deprecated

These commands will be mostly removed in the next PHP 7.2 update, if i have no time to update the class, someone only need to modify the decryptMush() function.

Développeurs / Developers / [Bridge][SMF][wip]
« le: 07 mars 2017, 08:42:05 »
im almost finished my SMF2MUSH class.


How SMF generates the hash:

$hash = sha1(strtolower($user) . $pw);
Im decrypting the mushraider pw like showed in the example:
$iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_ECB);
$iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);
$pwd = mcrypt_decrypt(MCRYPT_RIJNDAEL_128, $salt, stripslashes($_POST['pwd']), MCRYPT_MODE_ECB, $iv);

Now the following happens,

Login: dev1
PW: dev1

What i expect:
sha1(strtolower("dev1") . "dev1");returns
Thats the correct one.

$pwd = mcrypt_decrypt(MCRYPT_RIJNDAEL_128, ....$pwd contains now "dev1" as string but if i do:

$hash = sha1(strtolower( $_POST["login"] ) . $pwd);
I got:
The $pwd var causes the error.

Any ideas ?


Found the solution, facepalm....

$hash = sha1(strtolower( $_POST["login"] ) . trim($pwd) );
fixed it.

Gonna publish the class on github when im home.

Cya Phil

Pages: [1]