SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 17/04/2016, 10:21 PM   #1
Faqahat
Little Clucker
 
Faqahat's Avatar
 
Join Date: Apr 2015
Posts: 25
Reputation: 6
Default Password Hash Problem & MYSQL Saving Problem

Hello,
I was having problem while comparing password hashes while logging in so i printed both the hashes but one of them wasn't complete i cant figur out what the problem is exactly since variable are all greater then 128.
This is the password in Database


Here i am saving it in a variable:
(OnAccountCheck)


Here i am hashing entered password , printing and comparing


Here is the output




im having a syntax error in this query
__________________

Old Account (Compromised)

Last edited by Faqahat; 18/04/2016 at 11:56 AM. Reason: Resolved
Faqahat is offline   Reply With Quote
Old 18/04/2016, 07:43 AM   #2
introzen
Gangsta
 
introzen's Avatar
 
Join Date: Aug 2008
Posts: 774
Reputation: 30
Default Re: Password Hash Problem & MYSQL Saving Problem

In
PHP Code:
mysql_format(mysqlquerysizeof(query), "UPDATE `players` SET `xLevel` = %d, `Toys` = %d, `Neons` = %d, `BoomBox` = %d, `Banned` = %d, `xVIP` = %d, `Score` = %d, `Respect` = %d, `Credits` = %d, `Drugs` = %d, `Kills` = %d, `Deaths` = %d, `MaxSpree` = %d, `TotalDuels` = %d, `DuelsWon` = %d, `DuelsLost` = %d,`Skin` = %d,`Muted` = %d,`Cash`= %d, `TotalSeconds` = %d, `LastLoggedIP` = '%e',`LastSeen` = '%e', WHERE `p_id` = %d "pInfo[playerid][pLevel], pInfo[playerid][Toys], pInfo[playerid][Neons], pInfo[playerid][BoomBox], pInfo[playerid][Banned], pInfo[playerid][VIP], GetPlayerScore(playerid), pInfo[playerid][Respect], pInfo[playerid][credits], pInfo[playerid][Drugs], pInfo[playerid][Kills], pInfo[playerid][Deaths], pInfo[playerid][MaxSpree], pInfo[playerid][TotalDuels], pInfo[playerid][DuelsWon], pInfo[playerid][DuelsLost], pInfo[playerid][Skin], pInfo[playerid][Muted], GetPlayerMoney(playerid), secondspIPstrpInfo[playerid][p_id]); 
mysql_tquery(mysqlquery"OnStatsSave""i"playerid); 
Change
PHP Code:
`LastSeen` = '%e'WHERE `p_id` = %
To
PHP Code:
`LastSeen` = '%e' WHERE `p_id` = %
Also show us your pInfo enum please.
__________________
"No problem can be solved from the same level of consciousness that created it." - Albert Einstein
introzen is offline   Reply With Quote
Old 18/04/2016, 10:23 AM   #3
Threshold
High-roller
 
Threshold's Avatar
 
Join Date: Nov 2012
Location: Australia
Posts: 3,033
Reputation: 519
Default Re: Password Hash Problem & MYSQL Saving Problem

You're using printf instead of print. Also, I'm gonna go ahead and assume that you've only given p_password 100 cells instead of 129...

Change
Code:
p_password[100]
to:
Code:
p_password[129]
__________________

SERVER.LVCNR.NET:7777
Threshold is offline   Reply With Quote
Old 18/04/2016, 11:54 AM   #4
Faqahat
Little Clucker
 
Faqahat's Avatar
 
Join Date: Apr 2015
Posts: 25
Reputation: 6
Default Re: Password Hash Problem & MYSQL Saving Problem

Quote:
Originally Posted by introzen View Post
In
PHP Code:
mysql_format(mysqlquerysizeof(query), "UPDATE `players` SET `xLevel` = %d, `Toys` = %d, `Neons` = %d, `BoomBox` = %d, `Banned` = %d, `xVIP` = %d, `Score` = %d, `Respect` = %d, `Credits` = %d, `Drugs` = %d, `Kills` = %d, `Deaths` = %d, `MaxSpree` = %d, `TotalDuels` = %d, `DuelsWon` = %d, `DuelsLost` = %d,`Skin` = %d,`Muted` = %d,`Cash`= %d, `TotalSeconds` = %d, `LastLoggedIP` = '%e',`LastSeen` = '%e', WHERE `p_id` = %d "pInfo[playerid][pLevel], pInfo[playerid][Toys], pInfo[playerid][Neons], pInfo[playerid][BoomBox], pInfo[playerid][Banned], pInfo[playerid][VIP], GetPlayerScore(playerid), pInfo[playerid][Respect], pInfo[playerid][credits], pInfo[playerid][Drugs], pInfo[playerid][Kills], pInfo[playerid][Deaths], pInfo[playerid][MaxSpree], pInfo[playerid][TotalDuels], pInfo[playerid][DuelsWon], pInfo[playerid][DuelsLost], pInfo[playerid][Skin], pInfo[playerid][Muted], GetPlayerMoney(playerid), secondspIPstrpInfo[playerid][p_id]); 
mysql_tquery(mysqlquery"OnStatsSave""i"playerid); 
Change
PHP Code:
`LastSeen` = '%e'WHERE `p_id` = %
To
PHP Code:
`LastSeen` = '%e' WHERE `p_id` = %
Also show us your pInfo enum please.
Quote:
Originally Posted by Threshold View Post
You're using printf instead of print. Also, I'm gonna go ahead and assume that you've only given p_password 100 cells instead of 129...

Change
Code:
p_password[100]
to:
Code:
p_password[129]

Thanks The issue is resolved
__________________

Old Account (Compromised)
Faqahat is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with password hash TonyII Scripting Help 4 12/01/2015 04:28 PM
Hash password problem + rep osman2571 Scripting Help 24 13/11/2014 08:30 PM
MySQL Password Hash DarkKillerWithPride<3 Scripting Help 3 04/01/2012 06:03 PM
Hash MySQL-Password DeathOnaStick Help Archive 4 25/08/2010 04:18 PM


All times are GMT. The time now is 06:41 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.