Jump to content
  • 0

RabinGrings

Question

Posted

Hello guys.

I am creating a Mangos One server. But I can not implement the creation of characters. I looked at realmd.account table but only found the name of the character and a hash with password encryption.

Where can I find the script that makes this encryption to create my char?

GM if I put my question in a wrong location, please move it to right...

Thx everyone.

4 answers to this question

Recommended Posts

Posted

I don't seem to understand, did you mean you want to create an account? If so the syntax is : account create login pass [optional the content, where you can choose 0 for classic, 1 for TBC and 2 for WoTLK), type this on the mangosd console...

Or you mean you need to find the code that encrypts the pass, If so look on the source but I guess you will not find a way to easily change it...

Posted

The `sha_pass_hash` is nothing else but the SHA1 hash of "USERNAME:PASSWORD", the upper-case username, a ":" and the upper-case password.

As the new password-field now contains the username, you cant just change the username in the `account` table anymore, you always have to change the password-hash too.

but don't worry, it sounds harder then it is - luckily mysql provides all we need.

To Change a password:

SQL

UPDATE `account` SET `sha_pass_hash` = SHA1(CONCAT(UPPER(`username`),':',UPPER('passwordxyz'))) WHERE `id` = x; 

To Change a username:

SQL

UPDATE `account` SET `username` = 'new_username', `sha_pass_hash` = SHA1(CONCAT(UPPER('new_username'),':',UPPER('passwordxyz'))) WHERE `id` = x; 

To Create a new account:

SQL

INSERT INTO `account` (`username`,`sha_pass_hash`) VALUES ('myusername', SHA1(CONCAT(UPPER('myusername'),':',UPPER('mypassword')))); 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use