Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Add SHA512(salted) encryption to Tera v92.03 Retail Files

Newbie Spellweaver
Joined
Jul 18, 2011
Messages
23
Reaction score
14
Hey Guys,

i don't liked the saved "plain-passwords" at the Database so i make some changes for a SHA512 Encryption.

1. Open the "TeraAPI\grails-4.0.3\TeraAPI\grails-app\controllers\com\tera\AccountController.groovy"
2. Find
Code:
def accountInfo = accountList.get(0)
if (params.password != accountInfo.getAt('passWord')) {

Replace it with

Code:
                                def secret_salt = 'YOUR-SALT'
                                def pass_plain = params.password
				def pwd_salt = secret_salt + pass_plain
				def pass_sha512 = pwd_salt.digest('SHA-512')
				
				
				def accountInfo = accountList.get(0)
				if (pass_sha512 != accountInfo.getAt('passWord')) {

3. Save the changes at AccountController.groovy File and then Delete TeraAPI\grails-4.0.3\TeraAPI the "build" Folder
4. Run your .bat file which includet "grailsw.bat run-app --port=8080" and the changes will be compiled.
5. Open "xampp\htdocs\81\reg\index_act.php" and find
PHP:
			$query="insert into AccountInfo (userName, passWord) values ('$id','$pass1')";

Replace it
PHP:
			$pwdhash = hash('sha512',$secret_salt . $pass1);
			$query="insert into AccountInfo (userName, passWord) values ('$id','$pwdhash')";
6. Open "xampp\htdocs\81\reg\config.php" and add
PHP:
$secret_salt = "YOUR-SALT";

Feel free to give me any Feedback
 
Last edited:
Back
Top