Change Password Php And Reculper


I’m new here in the forum and only understand Portuguese Brazil.

peopl helps everyone.

if someone can get me a PHP script to change and reculper password?

My emulator is trinitycore revision 13/02/2012 +1146.

if someone could help me I thank you!

Whats a reculpter?

function wow_sha1($username,$pass) {
return sha1(strtoupper($username . “:” . $pass));

// fill the variables like it should be
$new_pass = wow_sha1(“acc_name”,“new_pass”);
$sql = “UPDATE auth.account SET sha_pass_hash = ‘$new_pass’ WHERE username = ‘acc_name’”;

// now just run the $sql via pdo or somethin’, alltho update should be done by id not username

I think he meant recover, and your PHP is incomplete, any time you change the password you also have to set sessionkey, v, and s, to 0, otherwise, TC will continue to use the old, cached password.

Good to know that, so its SQL which is incomplete not php :wink:

$sql = "UPDATE `auth.account` SET `sha_pass_hash` = '$new_pass' WHERE username = 'acc_name'";

I dont think you can recover easily something that was hashed, unless you can read it from the cache mentioned above.

Most reasonable thing to do with forgot passwords is to generate new ones, for eg

$new_pass_string = substr(md5(microtime))0,8);

“UPDATE auth.account SET sha_pass_hash = ‘$new_pass’, v = 0, s = 0, sessionkey = 0 WHERE username = ‘acc_name’”