Convert wordpress password to BCrypt-based - mysql

I have an old project which is using Wordpress, currently we create a new project and need to migrate the user's data into the new database (also Mysql).
The new database is using Bcrypt for encoding password for users. The old encode type in wordpress is like:
$P$BdsGKKQnnH6mi9hznpibst1jl/6G4z1
I think it might be MD5-based or not. I looked this link: http://stackoverflow.com/questions/1045988/what-type-of-hash-does-wordpress-use
I want to find a way to convert this type of password to Bcrypt-based. Maybe mysql script could help me convert? Can anyone give me some suggestions? Thanks.

I dont know if you can login to the admin panel or not. Chances are that you cant, but if you can somehow reset the password field with a known bCrypt hash for the admin. Then you can use this plugin to change the encryption from md5 to bcrypt for all your passwords.
https://wordpress.org/plugins/wp-bcrypt/

Related

How to add an administrator with bcrypt password encryption in phpmyadmin or edit existing admin user bcrypt encrypted password?

I have encountered a problem in my sql script. I bought an sql script online and I'm trying to work around the script but I can't add another admin to the database and I can't edit the admin password as well because it's encrypted with bcrypt. Hope you understand me up to this point?
Below is the code in the script that generates the bcrypt upon registration but unfortunately, the php script has no admin registration page.
'acct_password' => password_hash((string)$acct_password, PASSWORD_BCRYPT)
I tried editing the password from the sql database but the plaintext is not working because when I try to login the login fails. I have done everything I can but I guess I have no idea working around bcrypt. Please can any help me solve this problem? Please if you don't understand me, kindly ask and I will explain further.
Can you create a little CLI Script like this
<?php
$plain_text_pwd = 'EnterYourNewPaswordHere';
echo password_hash($plain_text_pwd, PASSWORD_BCRYPT);
It will output a string like
$2y$10$joZ9wTiOxd2WiYlr6XMJouHD5J.D6mwmhhJEBUPoak4ZfjB74Dx6e
Then you just copy that into a simple query that will UPDATE the password column for this user account on your db.
Just guessing here
UPDATE user
SET acct_password = '$2y$10$joZ9wTiOxd2WiYlr6XMJouHD5J.D6mwmhhJEBUPoak4ZfjB74Dx6e'
WHERE id = 1;
Now the password you enter will be whatever YOU put in $plain_text_pwd in the above code

Migration User Data From Wordpress Table to Laravel MySQL User Table

I am trying to migrate data from wordpress WP_Users table to Laravel MySQL Table. The problem is the Password field in WP_USERS use MD5 encryption whereas Laravel uses hash to store password. Is there a way/ tool to convert MD5 to Hash so that I can seamlessly migrate data from my old Wordpress app to New Laravel App? I am using Laravel Breeze
No - You will need to change the login function to check the insecure md5, then as people log in, save it as an encrypted password in Laravel.
Add a field on the user table called old_insecure_password where you store the old WordPress password.
Change the login function first to check login using the Laravel encryption. If it fails, it should check if the password matches the old_insecure_password using the same md5 from WordPress. If it does, it should take that password and encrypt it into the password field, clear out the old_insecure_password, and continue to log in.
Or migrate it and force everyone to reset their password.
Feel free to edit your question as you get stuck on something concrete when trying out this process, and ping me here if you have any additional questions.

Flask SQLAlchemy login with postgresql

So I have already created a database using the pgadmin3 in postgresql. I have a set of email-ids and passwords. The passwords which I have stored are hashed, i.e. by using pwd_context.hash(password) from the pass.libs.
I have stored them as shown below in the database. Now I have to create another login form in html to authenticate. I am new to flask, but I have seen something called as flask-login. How to compare the password entered in cleartext with the hashed password in database.
Flask-login provides a set of functions... for user login,logout and so on. More information on Flask-login can be found at https://flask-login.readthedocs.io/en/latest/.
For creating and checking a password hash: When working with Flask often werkzeug security is used to create/hash and check passwords. A snippet in which this is demonstrated can be found here : http://flask.pocoo.org/snippets/54/
Finally an internet search (I have not used any of these tutorial/pages before) retrieved following page: https://blog.miguelgrinberg.com/post/two-factor-authentication-with-flask with a quick browse of the page I found an example of using flask-login and werkzeug for user-login/logout under the title 'The First Factor: Password Authentication'. A quick pointer when using this tutorial is that there have been some changes in naming since the page has come online. For example flask.ext.login has been renamed to flask_login. The tutorial http://blog.sampingchuang.com/setup-user-authentication-in-flask/ also provides more information on flask-login and werkzeug. The pointer on renaming is also valid for this one.

Password for database in chinese

I would like to migrate the data from a MS-Access database to another software but the database is protected with password. I have used Access Password Unlocker to explore the password but I get chinese (or other languaje) characters as you can see in the image.
How can I write this characters??
Thanks in advance
The current version of Access Password Unlocker seems to allow you to copy the retrieved password, any chance you could use it?
偊佈久埼
Is this it? If you can post a higher resolution image of the Chinese characters, I can try again.

Decrypt and move rc4 encrypted password to Wordpress wp_user table?

I have RC4 encrypted data stored in a MySQL table that I need to move to the wp_user table and store as a Wordpress encrypted password. These are passwords so I'd prefer to move them securely, but I'm open to any suggestion.
This data was originally stored from a custom built Wordpress user management plugin that we've lost the developers for. Now we are attempting to move the users over to a Wishlist Member solution which stores them as regular wordpress users. I want to be able to change out the system without having to ask all the users to reset their passwords.
The old user data is encrypted as a hashed password concatenated with the encryption key. Below is the code sample that decrypts the secure data. I have the encryption key,
$secure_data = unserialize(
rc4crypt::decrypt(
$this->data->password . OLD::ENCRYPT_KEY,
$this->data->secure_data)
);
Any suggestions on how can I move this data into user_pass of wp_users?