I am newbie in Laravel and PHP.
I have admin access to FTP, admin access to hosting panel and admin access to DB(Maria DB).
The question is - How to obtain admin access to site admin panel (/admin/login)?
I see the users table in DB, but all passwords are encrypted. I tried to change them by Password('newpassword')
but as I see in the table - there was another encryption method applied, and it was not helpful.
All passwords in DB had prefixes "$2a$12$" and "$2a$10$"
Resolved by myself.
Laravel uses PHP hash for storing passwords.
So I run the following code to get Hash and put it in DB
<?php
$plaintext_password = "newPassword";
$hash = password_hash($plaintext_password,
PASSWORD_DEFAULT);
echo "Generated hash: ".$hash;
?>
You can run it on OneCompiler