I have a program in PHP
that encrypts a password with the crypt
method:
$crypt = '$1$/E0xe3/3$yPzJElk.aVSd5JoQTopDZ/';
if($crypt == crypt($_POST['key'],$crypt))
And with that I generate the following hash of this password:
*$1$Mmd/1SKE$bE44ZNJgYXDjm10rUHC5L1*
I wanted to do the same hash
in Python
, but I do not know how.
The command:
*cat /etc/login.defs | grep ^ENCRYPT_METHOD*
Returns (*ENCRYPT_METHOD SHA512*)