Newbie Posted October 19, 2014 Share Posted October 19, 2014 function server.login( thePlayer, Username, Password ) --// Login the Player if ( thePlayer ~= "" and Username ~= "" and Password ~= "" ) then if ( getElementData( thePlayer, "Connection" ) ~= 1 ) then local accounts = dbQuery( server.connection, "SELECT * FROM hhc_accounts WHERE Accountname = '" .. Username .. "'" ) local result, rows, errormessage = dbPoll( accounts, -1 ) if ( rows == 1 ) then for i, row in pairs( result ) do local pass = string.upper( row['Password'] ) local salt = row['Salt'] local gens = md5( md5( salt .. pass .. salt ) ) local ePass = md5( Password ) local salted = md5( md5( salt .. ePass .. salt ) ) if ( gens == salted ) then --bla bla bla I've set data in dabatase correctly with Accountname "aaa" and Password "aaa" The password is coded by md5, can someone help me to remove coding and just read the password normally Link to comment
Controlled Posted October 20, 2014 Share Posted October 20, 2014 Its not possible to remove the MD5 encryption. So you have to encrypt whatever the player put in the "Password" field of your login panel and compare it to the encrypted MD5 in the SQL. Link to comment
Saml1er Posted October 20, 2014 Share Posted October 20, 2014 You don't need to decrypt it. Just like cont said. First get the encrypted pass then convert the normal pass to md5 and then compare them ( if oldPass == newPass then. ) Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now