Page 1 of 1

Decrypt MariaDB password for use in Python Script

Posted: Sat Jul 22, 2017 11:51 pm
by cscuilla
In PHP, I am using the following to store an encrypted password to a MariaDB (MySql)

Code: Select all

$pass = $_POST['pass'];
$passH = password_hash($pass, PASSWORD_DEFAULT);
$query=$con->prepare("UPDATE user SET pw=? WHERE id=?");
$query->execute([$passH,$userid]);
I'm trying to use that password in plain text from a python script. I know how to connect and run queries via python,
but I can't figure out how to decrypt the password.

Re: Decrypt MariaDB password for use in Python Script

Posted: Sun Jul 23, 2017 6:47 pm
by DougieLawson
password_hash() is a one-way function. There's no way, without using the NSA or GCHQ super computer to decrypt it.