Jump to content

internal.db to mysql-database


Cobra

Recommended Posts

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
SQL browser is a really useful programm it shows you the table maybe it's useful for you :D

download link :

http://www.mediafire.com/download/wq1e3 ... b1_win.rar

ah and I think there is no possibility to decript the passwords :P

@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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...