I'm building a websocket based chat room in tornado where the main site runs wordpress. I want to allow the wordpress users to login to the chat with the same username and password. Hence, I would like to query the wordpress database using python and validate the provided username and password.
What I would like to know is what wordpress uses to hash the password?
(I'm aware of XMLRPC APIs which I would like to avoid)
Wordpress uses php crypt function and can be decrypted in Python using passlib. Here is the code:
from passlib.hash import phpass
phpass.verify("password", "wordpress hash")
I've used it on Wordpress 2.8 and PHP 5.3.6 and it worked well.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With