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

Results 1 to 1 of 1
  1. #1
    Registered EvolutionX is online now
    MemberRank
    Jul 2011 Join Date
    GermanyLocation
    20Posts

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

    Add SHA512(salted) encryption to Tera v92.03 Retail Files
    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 Delete 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 Code:
                $query="insert into AccountInfo (userName, passWord) values ('$id','$pass1')"
    Replace it
    PHP Code:
                $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 Code:
    $secret_salt "YOUR-SALT"
    Feel free to give me any Feedback
    Last edited by EvolutionX; 31-01-21 at 09:32 PM.




Advertisement