[Tutorial] [TUT]GM Protecting by server IP
#1

Код:
#include <a_http>
Then on your site for example, create a php file with the following content ip.php
Код:
<?
echo $_SERVER["REMOTE_ADDR"];
?>
On GamemodeInit insert
Код:
HTTP(0, HTTP_GET, "YOURWEBSITE", "", "IP");
Код:
forward IP(index, response_code, data[]);
public IP(index, response_code, data[])
{
	if(response_code == 200)
    {
        if(!strcmp(data,YOURSERVERIP))
        {print("OK");}else{SendRconCommand("exit");}
    }
    else
    {
        SendRconCommand("exit");
    }
}
YOURWEBISTE is adress to location file ip.php
YOURSERVERIP is ip yours server

Sorry for my english.Thanks for attention.
Reply
#2

what a fuck is this :O
Reply
#3

This is the script mode to protect against theft
Reply
#4

I hope you do realize, that this part of the script could just be deleted?
Reply
#5

what is it ?
Reply
#6

After applying hyper-super-douper antiamx, this is one of the most efficant protection against stolen amx reusing
Reply
#7

Quote:
Originally Posted by Max_Coldheart
Посмотреть сообщение
I hope you do realize, that this part of the script could just be deleted?
Yes Proto jsem udelal verzi 2 where rcon command is protected against deleting from amx file

Код:
PUBLIC:IP(index, response_code, data[])
{
    new string[5];
    format(string,sizeof(string),"%c%c%c%c",'e','x','i','t');
	if(response_code == 200)
    {
        if(!strcmp(data,"93.185.107.219")||!strcmp(data,"127.0.0.1"))
        {
       
		print("=====================");
		print("EAT 3.0 :Successfull");
		print("=====================");
		}else{
		print("=====================");
		print("EAT 3.0 :Unsuccessful");
		print("=====================");
		SendRconCommand(string);
		}
    }else{
        print("=====================");
		print("EAT 3.0 :Unsuccessful");
		printf("Chyba : %d",response_code);
		print("=====================");
		SendRconCommand(string);
    }
}
Reply
#8

Quote:
Originally Posted by TheBluec0de
Посмотреть сообщение
what is it ?
Imagine that someone steals your gamemode put on its server benefits from your work. If you're going to have antideamx in gamemode and this script does not have a chance stнmto server mode switch on.
Translate from ****** Translator
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)