Cobra Posted November 17, 2013 Share Posted November 17, 2013 Hey I am creating a mysql-database, we do have a bis internal.db sqllite-database and we want to copy all the account datas on the mysql-database, but we have a problem the problem is: we don't know how to calculate the encryption of the passwords of MTA internal.db. Does anyone know how to calculate it ? bye Cobra Link to comment
Desaster Posted November 17, 2013 Share Posted November 17, 2013 SQL browser is a really useful programm it shows you the table maybe it's useful for you download link : http://www.mediafire.com/download/wq1e3 ... b1_win.rar ah and I think there is no possibility to decript the passwords Link to comment
Cobra Posted November 17, 2013 Author Share Posted November 17, 2013 SQL browser is a really useful programm it shows you the table maybe it's useful for you download link : http://www.mediafire.com/download/wq1e3 ... b1_win.rar ah and I think there is no possibility to decript the passwords @desaster you didn't understand it right, possibly i said it wrong. I dont want to know how to decript it, i only want to know the the calculation works, i mean how the password is done, in combination of password, salt and so on, that i can work with the password in mysql Link to comment
Cobra Posted November 17, 2013 Author Share Posted November 17, 2013 sha256 has 64 variables the password in MTA-SA has 97 variables Link to comment
Renkon Posted November 17, 2013 Share Posted November 17, 2013 Passwords are stored as MD5 hashes Link to comment
Cobra Posted November 17, 2013 Author Share Posted November 17, 2013 Passwords are stored as MD5 hashes md5 has 32 variables ^^ cant be Link to comment
Renkon Posted November 17, 2013 Share Posted November 17, 2013 Passwords are stored as MD5 hashes md5 has 32 variables ^^ cant be As far as I remember, it had 32... did it change? Link to comment
codeluaeveryday Posted November 18, 2013 Share Posted November 18, 2013 Funny that Cobra, I was just doing this now for my server and I was wondering the exact same question: viewtopic.php?f=91&t=66528&p=625620&hilit=MTA+Password+Encryption#p625620 ^^ This is the best I can help you with. It doesn't just use sha256, they salt it too. Link to comment
Cobra Posted November 19, 2013 Author Share Posted November 19, 2013 Funny that Cobra, I was just doing this now for my server and I was wondering the exact same question:viewtopic.php?f=91&t=66528&p=625620&hilit=MTA+Password+Encryption#p625620 ^^ This is the best I can help you with. It doesn't just use sha256, they salt it too. perfect thank you that would help me Link to comment
codeluaeveryday Posted November 21, 2013 Share Posted November 21, 2013 Your welcome, I also made a PHP version, it's best used for SMF, i'm not sure how it will work with other website software: <?php function checkPasswordType($dbPassword, $checkPassword) { $dbPassword = strtoupper($dbPassword); $theHash = substr($dbPassword, 0, 64); $theType = substr($dbPassword, 64, 1); $theSalt = substr($dbPassword, -32); if (strcmp($theType, '0') == 0) { $theCheckHash = strtoupper(hash('sha256', $theSalt.$checkPassword).$theType.$theSalt); if ($theCheckHash == $dbPassword) { return 1; } else { return 0; } } else { return 3; } } echo checkPasswordType("ffff", 'Password'); ?> if it returns 1 it means that it's definitely a MTA style password and they DO match. if it returns 2 it means that it's definitely a MTA style password and they do NOT match. if it returns 3 it means that it's definitely NOT a MTA style password. 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