php - Decoding Plesk passwords -


first time question.

i have customer panel shows plesk 12.5 password. put in manually when generate password. customers change password, forget , fails. use plesk api receive password, encrypted.

$5$cngpmnfxtsfrswhh$nntntlj0klkheidk.xvwgbyv9hcae8yv/fog0c6ag17

i found out key found in /etc/psa/private/secret_key.

i tried:

$res_non = mcrypt_decrypt(mcrypt_rijndael_128, $key, $hash, 'ecb');  $decrypted = $res_non; $dec_s2 = strlen($decrypted);  $padding = ord($decrypted[$dec_s2-1]); $decrypted = substr($decrypted, 0, -$padding); 

but doesn't return password correctly.

any appreciated, thanks!

this appears sha256crypt hash, without storing number of rounds (which means it's hard-coded). if so, this isn't encrypted. hashing not encryption. hashing subtopic of cryptography, wholly separate encryption.

  • hashing: one-way transformation of infinite set of possible values value in large finite set of possible outputs. keyless.
  • encryption: reversible transformation of information, secured secret key (and/or, in algorithms, public key).

please don't confuse two.


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -