Forums
(@cdevidal)
6 years, 11 months ago
Confirmed, passlib works.
from passlib.hash import phpass if phpass.verify("Password", "Hash from WP DB"): print("Good password.")
Oh. My Google foo wasn’t up to par. I searched again and found this. I could make that a standalone CLI that Python could call. https://wordpress.stackexchange.com/questions/32004/how-to-validate-wordpress-generated-password-in-db-using-php
I noticed here that he is indeed importing phpass, which would be even easier: https://codereview.stackexchange.com/questions/66961/automatic-password-security-test-for-wordpress
And I found there is a phpass module in the up-to-date Python module Passlib: https://passlib.readthedocs.io/en/stable/lib/passlib.hash.phpass.html
I’ll test it and try to remember to let you all know how it went. I’m not quite ready yet to test.