Error Login (Se puede entrar con cualquier contraseсa)
#1

Hola buenos dias , os cuento , estaba intentanto quitar la encriptaciуn de contraseсas de UDB en mi GM para poder comprobar unas cosas y he conseguido quitarla del registro pero no se como quitarlo de la comprobaciуn de contraseсas (es que soy muy noob en esto aъn jaja)

Cуdigo de la comprobaciуn de passwords :

Код:
if(udb_hash(inputtext) == Info[playerid][pKey])
No se como quitar el hash de esa lнne , їme podrнan ayudar porfavor?


Gracias.
Reply
#2

Код:
if(!strcmp(Info[playerid][pKey],inputtext))
Reply
#3

Gracias tio , pero no se porque con cualquier contraseсa logro entrar , no hay ninguna determinada poner cualquier cosa y puedes loguearte , ya he buscado varios cуdigos pero ninguno me funciona correctamente.
Reply
#4

Es porque pKey esta vacнa. Comprueba que strlen(inputtext) sea mayor a 0, y fijate que la contraseсa no se esta almacenando en pKey
Reply
#5

Quote:
Originally Posted by spell
Посмотреть сообщение
Es porque pKey esta vacнa. Comprueba que strlen(inputtext) sea mayor a 0, y fijate que la contraseсa no se esta almacenando en pKey
Gracias pero esque soy nuevo en esto y no se como comprobar que pKey este vacнa y si es asн como llenarla
Reply
#6

Solo haz

Код:
if(strlen(inputtext) > 0)
Reply
#7

Gracias tio pero :
Код:
case DLOGIN:
		{
			if(response == 1)
			{
               if(!strlen(inputtext))
	    		{
		        Mensaje(playerid, COLOR_GREY, " Debes introducir tu contraseсa para continuar.");
		        format(string, sizeof(string), "{FFFFFF}Bienvenido de nuevo, %s!\n{FFFFFF}Ingresa a continuaciуn tu contraseсa para conectarte al servidor\n\nTienes en total {E80000}3{FFFFFF} intentos de logueo.", NombreIC(playerid));
	    		ShowPlayerDialog(playerid, DLOGIN, DIALOG_STYLE_PASSWORD, "{E80000}› {FFFFFF}Ingresar al servidor", string, "Conectar", "");
				return 1;
				}

				//if (ComprobarClave(playerid, inputtext))
               if(!strcmp(Info[playerid][pKey],inputtext))
				{
				    InsideMainMenu[playerid] = false;
				    INI_ParseFile(UserPath(playerid), "LoadUser_data", .bExtra = true, .extra = playerid);
				    KillTimer(LoginTimer[playerid]);
		            PlayerLogin(playerid);
				}
				else
				{
	        		SetPVarInt(playerid, "IntentosIngreso", GetPVarInt(playerid, "IntentosIngreso")+1);
	        		format(string, sizeof(string), " La contraseсa introducida es incorrecta. (%d/%d)", GetPVarInt(playerid, "IntentosIngreso"), LIMITE_INTENTOS_INGRESO);
		    		Mensaje(playerid, COLOR_GREY, string);
		           	if (GetPVarInt(playerid, "IntentosIngreso") == LIMITE_INTENTOS_INGRESO)
		    		{
			        Mensaje(playerid, COLOR_ORANGE, "Has sido kickeado automбticamente. (Razуn: Lнmite de intentos de ingreso)");
			        Expulsar(playerid);
			        return 1;
		            }
		            format(string, sizeof(string), "{FFFFFF}Bienvenido de nuevo, %s!\n{FFFFFF}Ingresa a continuaciуn tu contraseсa para conectarte al servidor\n\nTienes en total {E80000}3{FFFFFF} intentos de logueo.", NombreIC(playerid));
	    			ShowPlayerDialog(playerid, DLOGIN, DIALOG_STYLE_PASSWORD, "{E80000}› {FFFFFF}Ingresar al servidor", string, "Conectar", "");
                	return 1;
				}
        	}
Ese es mi codigo en
Код:
if(!strlen(inputtext))
lo he intentado cambiar a
Код:
if(!strlen(inputtext) >0)
pero nada , sigue igual , tambiйn quitando la exclamaciуn pero na no se que fer jaja
Reply
#8

Quote:
Originally Posted by extractor304
Посмотреть сообщение
Gracias tio pero :
Код:
case DLOGIN:
		{
			if(response == 1)
			{
               if(!strlen(inputtext))
	    		{
		        Mensaje(playerid, COLOR_GREY, " Debes introducir tu contraseсa para continuar.");
		        format(string, sizeof(string), "{FFFFFF}Bienvenido de nuevo, %s!\n{FFFFFF}Ingresa a continuaciуn tu contraseсa para conectarte al servidor\n\nTienes en total {E80000}3{FFFFFF} intentos de logueo.", NombreIC(playerid));
	    		ShowPlayerDialog(playerid, DLOGIN, DIALOG_STYLE_PASSWORD, "{E80000}› {FFFFFF}Ingresar al servidor", string, "Conectar", "");
				return 1;
				}

				//if (ComprobarClave(playerid, inputtext))
               if(!strcmp(Info[playerid][pKey],inputtext))
				{
				    InsideMainMenu[playerid] = false;
				    INI_ParseFile(UserPath(playerid), "LoadUser_data", .bExtra = true, .extra = playerid);
				    KillTimer(LoginTimer[playerid]);
		            PlayerLogin(playerid);
				}
				else
				{
	        		SetPVarInt(playerid, "IntentosIngreso", GetPVarInt(playerid, "IntentosIngreso")+1);
	        		format(string, sizeof(string), " La contraseсa introducida es incorrecta. (%d/%d)", GetPVarInt(playerid, "IntentosIngreso"), LIMITE_INTENTOS_INGRESO);
		    		Mensaje(playerid, COLOR_GREY, string);
		           	if (GetPVarInt(playerid, "IntentosIngreso") == LIMITE_INTENTOS_INGRESO)
		    		{
			        Mensaje(playerid, COLOR_ORANGE, "Has sido kickeado automбticamente. (Razуn: Lнmite de intentos de ingreso)");
			        Expulsar(playerid);
			        return 1;
		            }
		            format(string, sizeof(string), "{FFFFFF}Bienvenido de nuevo, %s!\n{FFFFFF}Ingresa a continuaciуn tu contraseсa para conectarte al servidor\n\nTienes en total {E80000}3{FFFFFF} intentos de logueo.", NombreIC(playerid));
	    			ShowPlayerDialog(playerid, DLOGIN, DIALOG_STYLE_PASSWORD, "{E80000}› {FFFFFF}Ingresar al servidor", string, "Conectar", "");
                	return 1;
				}
        	}
Ese es mi codigo en
Код:
if(!strlen(inputtext))
lo he intentado cambiar a
Код:
if(!strlen(inputtext) >0)
pero nada , sigue igual , tambiйn quitando la exclamaciуn pero na no se que fer jaja
[Cуdigo] No se que error hay porfavor podrнan ayudarme
Reply
#9

************************************************** ***************
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)