0
I have a program in PHP
that encrypts a password with the method crypt
:
$crypt = '$1$/E0xe3/3$yPzJElk.aVSd5JoQTopDZ/';
if($crypt == crypt($_POST['key'],$crypt))
And with that I get the following hash of that password:
*$1$Mmd/1SKE$bE44ZNJgYXDjm10rUHC5L1*
I wanted to generate the same hash
in Python
, but I don’t know how.
The command:
*cat /etc/login.defs | grep ^ENCRYPT_METHOD*
Returns (*ENCRYPT_METHOD SHA512*)
You can use the lib hashlib to generate hashs of the type he exemplified.
– Tuxpilgrim
I was able to solve the problem by defining salt with crypt.crypt
– JOG