SA-MP Forums Archive
MD5-Problem -> Whirlpool-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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: MD5-Problem -> Whirlpool-Problem (/showthread.php?tid=68093)



MD5-Problem -> Whirlpool-Problem - virtualmarc - 07.03.2009

I downloaded the MD5-Include from ******, which is used in SeifAdmin, but when I compile my script there comes this Error:
pawn Код:
C:\Dokumente und Einstellungen\Marc\Desktop\tAxIFR[GM]\tAxIFR[GM]\gamemodes\source\tAxIFR.pwn(2791) : error 033: array must be indexed (variable "MD5_Hash")
C:\Dokumente und Einstellungen\Marc\Desktop\tAxIFR[GM]\tAxIFR[GM]\gamemodes\source\tAxIFR.pwn(2826) : error 006: must be assigned to an array
C:\Dokumente und Einstellungen\Marc\Desktop\tAxIFR[GM]\tAxIFR[GM]\gamemodes\source\tAxIFR.pwn(2860) : error 006: must be assigned to an array
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


3 Errors.
These are the Lines:
Line 2791:
pawn Код:
if(PlayerInfo[playerid][pass] == MD5_Hash(tmp)) {
Line 2826:
pawn Код:
PlayerInfo[playerid][pass] = MD5_Hash(tmp);
Line 2860:
pawn Код:
PlayerInfo[playerid][pass] = MD5_Hash(tmp);



Re: MD5-Problem - maij - 07.03.2009

to me, it seems your forgetting an dimension here,

PlayerInfo[playerid][pass][X] where you forgot [X];

find if your dimensions are the right one, and if not, what dimension your missing, in that case, your problem is solved


Re: MD5-Problem - virtualmarc - 07.03.2009

theres nothing missing! thats a downloaded code by tAxI, and there was the udb_hash before!


Re: MD5-Problem - [RP]Rav - 07.03.2009

Код:
if( strcmp(PlayerInfo[playerid][pass], MD5_Hash(tmp), false) == 0)
etc..


Re: MD5-Problem - virtualmarc - 07.03.2009

Ok the problem at line 2791 is not anymore, only the others (there i changed nothing)


Re: MD5-Problem - virtualmarc - 07.03.2009

i dont want to make it secure, i wanted to make a webinterface for my users where they can login with their password from the server!


Re: MD5-Problem - d0 - 07.03.2009

Quote:
Originally Posted by ssǝן‾ʎ
WHAT!? If you want to use passwords you want to make it secure! That's what passwords are for - security!
yes sure but is there a "whirlpool" plugin for php :P


Re: MD5-Problem - virtualmarc - 07.03.2009

ok, then i will use wirepool


Re: MD5-Problem - virtualmarc - 07.03.2009

mhh... doesnt work?!?!
I loaded the Plugin:
Quote:

plugins Whirlpool.so

The log says that its loaded:
Quote:

[18:53:10] Server Plugins
[18:53:10] --------------
[18:53:10] Loading plugin: Whirlpool.so
[18:53:10]
[18:53:10] ==================
[18:53:10]
[18:53:10] Whirlpool loaded
[18:53:10]
[18:53:10] ==================
[18:53:10]
[18:53:10] Loaded.
[18:53:10] Loaded 1 plugins.

in the code at the top under the includes is:
pawn Код:
native WP_Hash(buffer[], len, const str[]);
and i used them so:
pawn Код:
if( PlayerInfo[playerid][pass] == WP_Hash(buf, sizeof (buf), tmp)) {
and
pawn Код:
PlayerInfo[playerid][pass] = WP_Hash(buf, sizeof (buf), tmp);
But in the Player-Save-File is only a 0 at the position of the password


Re: MD5-Problem -> Whirlpool-Problem - virtualmarc - 07.03.2009

what you mean with that?
Edit: now I know
i made it so:
pawn Код:
WP_Hash(buf, sizeof (buf), tmp);
                PlayerInfo[playerid][pass] = buf;
But theres that error:
Quote:

C:\Dokumente und Einstellungen\Marc\Desktop\tAxIFR[GM]\tAxIFR[GM]\gamemodes\source\tAxIFR.pwn(2866) : error 006: must be assigned to an array

and at:
pawn Код:
WP_Hash(buf, sizeof (buf), tmp);
              if( PlayerInfo[playerid][pass] == buf) {
is that error (but i think i know where the problem is:
Quote:

C:\Dokumente und Einstellungen\Marc\Desktop\tAxIFR[GM]\tAxIFR[GM]\gamemodes\source\tAxIFR.pwn(2795) : error 033: array must be indexed (variable "buf")

I don't know why, but everytime I want to compile now, the compiler crashes!