Jump to content
  • 0

Problema Login !


rStyle

Question

Problema intalnita (descriere): Salut, numele meu este Adrian și va contactez cu o problema familiara scripterilor din viața cotidiana. Am achiziționat un gamemode de la un prieten vechi. L-Am băgat pe localhost și am pus datele, baza de date și toate chestiile necesare. Am intrat pe server, m-am înregistrat, iar la logare am scris aceeași parola dar îmi spune ca parolele nu se potrivesc... (presupun ca este la de mysql_query sau alte chestii).
Ero(area / rile) / warning-(ul / urile): Presupun ca la DIALOG_LOGIN .
Liniile de cod / sursa / script-ul(obligatoriu):

case DIALOG_LOGIN:
  {
     if(!response) return Kick(playerid);

      new
          query[300],
          pName[MAX_PLAYER_NAME],
    escapedPassword[129];

   GetPlayerName(playerid, pName, MAX_PLAYER_NAME);

   WP_Hash(escapedPassword, sizeof(escapedPassword), inputtext);

   //mysql_real_escape_string(szPlayerName, escapedName);

            //mysql_store_result( );
   mysql_format(handle, query, sizeof(query), "SELECT * FROM `playeraccounts` WHERE playerName = '%s' AND playerPassword = '%s'", pName, escapedPassword);
   //mysql_query(query, THREAD_CHECK_CREDENTIALS, playerid);
   mysql_tquery(handle, query, "WhenPlayerLogin", "i", playerid);
   //SendClientMessage(playerid, COLOR_WHITE, "da");
   //TogglePlayerSpectating(playerid, 0);
  }


Imagini / Video (optional):
Ati incercat sa rezolvati singur?: Da, dar n-am izbutit. Va rog sa mă ajutați ..

Edited by rStyle
Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 1
  • 0
  • 0
Acum 28 minute, WiDuAlK a spus:

Problema s-ar putea sa fie din cauza WP_Hash. Sterge WP_Hash si inlocuieste cu MD5

http://forum.sa-mp.com/showthread.php?t=479288

E mult mai OK, mai ales ca poti accesa mai usor un panel(daca ai, bine-inteles)

Am incercat, nu merge. (Eroare -> debug MD5)

Edited by rStyle
Link to comment
Share on other sites

  • 0

Iti dau un sfat, sterge tot ce tine de cryptarea parolelor de la WhirlPool.

La register pui sa insereze parola in SHA1. Ex:     f

ormat(iStr, 200, "INSERT INTO `accounts`(`Name`, `Password`) VALUES ('%s', SHA1('%s'))", GetName(playerid), Password);

iar la login pui sa selecteze, ex: 

format(iStr2, 300, "SELECT * FROM `accounts` WHERE `Name` = '%s' AND `Password` = SHA1('%s')", GetName(playerid), iStr);

 

Edited by cristyifrim31O
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.