Help with mysql
#1

Hello , i want to convert from dini into mysql
I could find a program here to convert all of data into a .sql file and import it
but problem is password is not hashed
So i think i have to loop through the whole passwords and hash them using whirl pool but how?
I couldn't really figure it out
Reply
#2

I'm not a expert with MySQL but, you might have to have someone do it or pay someone to do it themselves.
Reply
#3

Try searching some posts,i've seen people saying in their signatures : I can convert your y_ini/dini etc.. to MySQL 4 free.
Im not an expert but probably you will have to re-create the register/login system .
1 reason is that you need to hash the passwords
Another reason is that dini or y_ini is different from MySQL.

Hope i helped you a bit.
Reply
#4

Yes i am recreating the whole account system , but only this part is a trouble for me now..
Dunno how to loop through all passwords and hash them :/
Reply
#5

Import everything including unencrypted passwords and encrypt them within the database (easy and fast).

Assuming you have everything ready, you must perform a query to your database, for example:
(assuming you're using MySQL R7)
pawn Код:
mysql_function_query(mysql, "SELECT * FROM players", true, "hashAccounts", "");
Then, loop through all user accounts:

pawn Код:
stock Whirlpool(string[])
{
    new hash[129];
    WP_Hash(hash, 129, string);
    return hash;
}
pawn Код:
public hashAccounts()
{
    new rows, fields, id, result[32], query[192];
    cache_get_data(rows, fields, MySQL);
    for(new i = 0; i < rows; i++)
    {
        cache_get_field_content(i, "ID", result, MySQL);
        id = strval(result);
        cache_get_field_content(i, "Password", result, MySQL);
        mysql_format(MySQL, query, "UPDATE users SET Password = '%e' WHERE ID = %i", Whirlpool(result), id);
        mysql_function_query(MySQL, query, false, "", "");
    }
    return 1;
}
Theoretically this should work, I have not tested yet.
If you have any questions PM me or post here
Reply
#6

Thanks dude !
I'll give it a try and pm you
RPeed.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)