RabinGrings Posted April 16, 2016 Report Posted April 16, 2016 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.
marcelo20xx Posted April 16, 2016 Report Posted April 16, 2016 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...
RabinGrings Posted April 16, 2016 Author Report Posted April 16, 2016 Marcelo20xx, its work... Thx my friend.
antz Posted April 17, 2016 Report Posted April 17, 2016 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'))));
RabinGrings Posted April 17, 2016 Author Report Posted April 17, 2016 Antz, thanks for this... Now I can make my website...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.