SA-MP Forums Archive
Whirlpool Query problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Whirlpool Query problem (/showthread.php?tid=576187)



Whirlpool Query problem - MotherDucker - 01.06.2015

Hello everyone, I made a topic yesterday trying to get help with the whirlpool problem that I had, which got fixed however another problem occured which is still happening as I haven't been able to find a problem.

Here is the code.
Код:
{
	WP_Hash(HPass, 129, inputtext);
	mysql_format(1, query, sizeof(query), "INSERT INTO masterdata (uName, uPass) VALUES ('%e', '%e')", MasterData[playerid][uName], HPass);
	mysql_tquery(1, query, "OnPlayerAccountRegister", "i", playerid);
}
The problem is that when it inserts the values i.e. the username and password.. the username is put into the table however the WP Hashed Password isn't, here is the logs that I get back.
Код:
[22:07:44] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called
[22:07:47] [DEBUG] mysql_format - connection: 1, len: 128, format: "INSERT INTO masterdata (uName, uPass) VALUES ('%e', '%e')"
[22:07:47] [DEBUG] mysql_tquery - connection: 1, query: "INSERT INTO masterdata (uName, uPass) VALUES ('Duck', '')", callback: "OnPlayerAccountRegister", format: "i"
[22:07:47] [DEBUG] CMySQLQuery::Execute[OnPlayerAccountRegister] - starting query execution
[22:07:47] [DEBUG] CMySQLQuery::Execute[OnPlayerAccountRegister] - query was successfully executed within 46.478 milliseconds
[22:07:47] [DEBUG] CMySQLResult::CMySQLResult() - constructor called
[22:07:47] [DEBUG] Calling callback "OnPlayerAccountRegister"..
[22:07:48] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called
Thank you in advance.


Re: Whirlpool Query problem - MotherDucker - 05.06.2015

Bump


Re: Whirlpool Query problem - Djole1337 - 05.06.2015

print HPass value and you don't need to escape already hashed passwords btw.


Re: Whirlpool Query problem - MotherDucker - 05.06.2015

Before it proceeds to the query, I printed out to the console and it shows this
Код:
74DFC2B27ACFA364DA55F93A5CAEE29CCAD3557247EDA238831B3E9BD931B01D77FE994E4F12B9D4CFA92A124461D2065197D8CF7F33FC88566DA2DB2A4D6EAE
Which is the hashed password but it doesn't seem to actually use it.

Also, I know I don't, I just didn't change it from what I was using before.


Re: Whirlpool Query problem - MotherDucker - 07.06.2015

Bump


Re: Whirlpool Query problem - Scrillex - 07.06.2015

Did you saved it in right field after disconnect?


Re: Whirlpool Query problem - Vince - 07.06.2015

A Whirlpool hash is 128 characters long in itself, yet according to the log you are trying to fit the entire query in just 128 chars.


Re: Whirlpool Query problem - MotherDucker - 07.06.2015

Quote:
Originally Posted by Vince
Посмотреть сообщение
A Whirlpool hash is 128 characters long in itself, yet according to the log you are trying to fit the entire query in just 128 chars.
Yeah, this seemed to be the problem.. my brain kind of died just then ahah, thank you for pointing it out for me!
Rep++