Jump to content

[REZOLVAT] Salut ! Ajutor please


AdyHD
 Share

Recommended Posts

Astazi am venit cu o intrebare spre scripterii priceputi in pawno etc..


Cum pot sa rezolv chesti cu flood de pe report , adica dai report-alta problema si ''%s'' cum pot sa pun expl sa nu poata da flood de pe caracter asta ''%s''

Edited by AdyHD
Link to comment
Share on other sites

In primul rand, nu este flood. Acesta se numeste SQL Injection. Poti afla mai multe aici despre SQL Injection.

 

Cat despre problema ta, adauga la public OnDialogResponse:

if(strfind(inputtext,"'") || strfind(inputtext,"'"))

    {

        for(new i; i < strlen(inputtext); i++)

        {

            if(strfind(inputtext[i],"%", true) == 0)

            {

                inputtext[i] = '-';

            }

            if(strfind(inputtext[i],"'", true) == 0)

            {

                inputtext[i] = '-';

            }

        }

        SCM(playerid, COLOR_YELLOW2, "Eroare: Nu poti folosi aceste caractere.");


    }
Link to comment
Share on other sites

Pe scurt, verifici string ul introdus sa nu contina caracterul "%".

Respecta si vei fi respectat.

 

BigInt Pawn:

Pacman C++: 

Snake C++:

Minesweeper C++:

 

mattbb.cash

leaks.ro

Link to comment
Share on other sites

 

In primul rand, nu este flood. Acesta se numeste SQL Injection. Poti afla mai multe aici despre SQL Injection.

 

Cat despre problema ta, adauga la public OnDialogResponse:

if(strfind(inputtext,"'") || strfind(inputtext,"'"))

    {

        for(new i; i < strlen(inputtext); i++)

        {

            if(strfind(inputtext[i],"%", true) == 0)

            {

                inputtext[i] = '-';

            }

            if(strfind(inputtext[i],"'", true) == 0)

            {

                inputtext[i] = '-';

            }

        }

        SCM(playerid, COLOR_YELLOW2, "Eroare: Nu poti folosi aceste caractere.");


    }

Mersi,chiar acum incerc.

Link to comment
Share on other sites

 

In primul rand, nu este flood. Acesta se numeste SQL Injection. Poti afla mai multe aici despre SQL Injection.

 

Cat despre problema ta, adauga la public OnDialogResponse:

if(strfind(inputtext,"'") || strfind(inputtext,"'"))

    {

        for(new i; i < strlen(inputtext); i++)

        {

            if(strfind(inputtext[i],"%", true) == 0)

            {

                inputtext[i] = '-';

            }

            if(strfind(inputtext[i],"'", true) == 0)

            {

                inputtext[i] = '-';

            }

        }

        SCM(playerid, COLOR_YELLOW2, "Eroare: Nu poti folosi aceste caractere.");


    }

Trebuie sa sterg aia si sa pun asta care mi-ai dat tu da ?

Link to comment
Share on other sites

Am sters chestiilea alea si am bagat care mi-ati dat voi si asa mi-a dat C:\Users\Andrian\Desktop\\gamemodes\(57838) : warning 219: local variable "i" shadows a variable at a preceding level

C:\Users\Andrian\Desktop\\gamemodes\(72047) : warning 203: symbol is never used: "antisqlinjection"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
 
 
2 Warnings.
Edited by AdyHD
Link to comment
Share on other sites

  • Administrator

@@WiNKs aia e o metoda veche rau.

 

Take

stock antiDialogExploit( leonard[] ) {
	new messLength = strlen( leonard );

	for( new i; i < messLength; ++i ) {
		if( leonard[ i ] == '%' ) return true;
	}

	return false.
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{    
        if( antiDialogExploit( inputtext ) ) return true;

        // dialogurile tale

	return true;
}
Link to comment
Share on other sites

 

@@WiNKs aia e o metoda veche rau.

 

Take

stock antiDialogExploit( leonard[] ) {
	new messLength = strlen( leonard );

	for( new i; i < messLength; ++i ) {
		if( leonard[ i ] == '%' ) return true;
	}

	return false.
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{    
        if( antiDialogExploit( inputtext ) ) return true;

        // dialogurile tale

	return true;
}

unde trb sa o bag ?

Link to comment
Share on other sites

  • Administrator

unde trb sa o bag ?

Ti-am aratat, il adaugi la publicul OnDialogResponse.

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{    
        if( antiDialogExploit( inputtext ) ) return true;

        // dialogurile tale

	return true;
}
Link to comment
Share on other sites

 

Ti-am aratat, il adaugi la publicul OnDialogResponse.

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{    
        if( antiDialogExploit( inputtext ) ) return true;

        // dialogurile tale

	return true;
}

#Multumesc.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...