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]
1
Développeurs / Developers / Re : [Bridge][SMF][wip]
« le: 08 mars 2017, 14:18:59 »
Work in progress

https://github.com/Skullfox/smf2mush

Info:
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.

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

#Edit
https://github.com/Skullfox/smf2mush

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
2410765d412f626d0818926a1e50def5c7f6f6c2
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:
f502db2d58871225893deec88650330b822474a2
The $pwd var causes the error.

Any ideas ?


EDIT

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]