Official Soldat Forums

Server Talk => Scripting Releases => Topic started by: -Snowy- on January 22, 2008, 10:00:57 am

Title: Anti Speed/Teleport Hack
Post by: -Snowy- on January 22, 2008, 10:00:57 am
you are all probably gonna lol @ me for this...but hey, i was bored :D im honestly suprised nobody else has tried something similar, seeing that it was so easy and is never wrong (unlike battleye). at least in my trials it hasnt had any problems...at the set distance its not possible to move at that speed legit (even with m79 boosts downward) but it still has 3 warnings just in case

(honestly, i just wanna try and show up enesce and battleye, especially since battleye sucks)

0-1.1
added easyonlaggers option, which give more of a distance before detection the higher a player's ping is (a 500 ping player gets another 500 pixels, that should be more than enough to rule out getting false detections)
does not kick players when script is recompiled

Script Name:
Anti Speed/Teleport Hack
Script Description:
Detects players if they move more than the specified distance in 1 second, disreguarded if a player dies, respawns, joins game, joins team,etc.
Original Author(s):
~Snowy~
Core Version: (Version of the Dedicated Server you made this script with)
2.6.3
Code: (Just some snippets, not the whole script)

Code: [Select]
if Distance(GetPlayerStat(i,'x'),GetPlayerStat(i,'y'),x[i],y[i]) > DISTANCEPERSECOND then begin

if warnings[i] > 0 then begin
warnings[i] := warnings[i] - 1;
if warnings[i] > 0 then begin
WriteConsole(i,'Possible speed hack detected - ' + inttostr(warnings[i]) + ' warning(s) left',$00FF0000);
end;
end;

if warnings[i] = 0 then begin
Command('/say ' + idtoname(i) + ' kicked for possible speed/teleport hacks');
Command('/kick ' + inttostr(i));
end;

end;

whatever happened to enesce making all the anti cheat built into the server...that rapes down hacks compared to battleye
Title: Re: Anti Speed/Teleport Hack
Post by: Leo on January 22, 2008, 10:29:45 am
How about warps due to lag ?
Title: Re: Anti Speed/Teleport Hack
Post by: -Snowy- on January 22, 2008, 10:30:50 am
i doubt even the gayest laggers can warp the entire width of the screen in 1 second, and like i said, they get warnings jic
Title: Re: Anti Speed/Teleport Hack
Post by: Pie on January 22, 2008, 10:33:47 am
How about warps due to lag ?
Would that change how far you move in a second in the server?
I mean if you're spiking That badly then you're going to be pinged anyways, right?
Title: Re: Anti Speed/Teleport Hack
Post by: EnEsCe on January 22, 2008, 10:49:03 am
Trust me, I have tried that exact method before. It won't work with laggers, false detections paradise.
Title: Re: Anti Speed/Teleport Hack
Post by: -Snowy- on January 22, 2008, 10:57:04 am
increase distance with ping then? not that you want laggers in your server anyway.

edit:
Quote from: Flariut
were you in my server today/tonight (different time zone thing) and by any chance were u hacking? because i got bored and made a anti tele hack thing and either you were hacking or lagging something shockin. just curious to know if it works :D
yeah, it worked! it kiked me...nice one! but dont publish it please, because all the tele hacks we  will dead...

lol this is 5 minutes after i started my first trial :D maybe i shouldnt have posted it D:

fyi if any of you laggy foreigners wanna test it for me, its in my zombie server right now
snowy.servegame.com:23073
id say you wont get kicked unless u actually hack
Title: Re: Anti Speed/Teleport Hack
Post by: badchucky on January 22, 2008, 11:27:14 am
Nice script thanks:)
Title: Re: Anti Speed/Teleport Hack
Post by: FliesLikeABrick on January 22, 2008, 11:35:59 am
increasing the threshold distance based on a player's ping should definitely help as long as you make sure to increase it a good amount
Title: Re: Anti Speed/Teleport Hack
Post by: rhide on January 22, 2008, 04:17:07 pm
I just want to add some general scripting tips:

1. I see that you use a lot of comments to describe your constant variables in the top level of your script - dont do that. Variable names should be good enough to be self-explanatory without any comments. Instead use comments to explain programming logic in words (the more the better!).

2. The code you pasted above could use some minor cleaning:

Code: [Select]
if Distance(GetPlayerStat(i,'x'),GetPlayerStat(i,'y'),x[i],y[i]) > DISTANCEPERSECOND then begin

    if warnings[i] > 0 then begin
        warnings[i] := warnings[i] - 1;
        WriteConsole(i,'Possible speed hack detected - ' + inttostr(warnings[i]) + ' warning(s) left',$00FF0000);
    end else begin
        Command('/say ' + idtoname(i) + ' kicked for possible speed/teleport hacks');
        Command('/kick ' + inttostr(i));
    end;
end;

Now the player will be kicked both if his warning = 0 AND if his warnings < 0. This might not be neccesary, but it's VERY good practise to test for <= and not just =. For example, in the future you might add higher offences that reduce warning level by 2 - wich might just take the player from 1 to -1, and voila - a bug!

3. Use indents! Just hitting TAB once makes the code MUCH easier to read >.<
Title: Re: Anti Speed/Teleport Hack
Post by: -Snowy- on January 22, 2008, 06:16:59 pm
yeah honestly im horrid at laying out code in soldat scripts...im not very familiar with the language, so i dont really know how to use else and such (its a bit different to vb and im just not used to the layout)

and im not really sure people need to be told what things to, because if they cant work it out themselves they shouldnt have gone past the config section up the top
Title: Re: Anti Speed/Teleport Hack
Post by: rhide on January 23, 2008, 06:01:12 pm
Don't worry about being unfamiliar with the language, if you're smart enough to work around that then good code design will come with time :)

About comments though: What you say is not really true.
Think of a car, some people just use the "config section" (think of it as just using the car) while others want to unscrew it and start modifying it's parts. Those people may very well be competent enough to do so, but without a proper manual (comments) the car is simply way too complex to do anything.

In fact, many professional programmers I know actually recommend commenting EVERY piece of code you write. Perhaps that's just too much, but when you look at your very own code, lets say a year later, then perhaps
Code: [Select]
Distance(GetPlayerStat(i,'x'),GetPlayerStat(i,'y'),x[i],y[i]) > DISTANCEPERSECONDjust wont be so self-explanatory anymore
Title: Re: Anti Speed/Teleport Hack
Post by: Mercury92 on May 11, 2010, 10:06:15 am
BE is actually dead for a while and many hackers seen on public.
This script works very good.
Title: Re: Anti Speed/Teleport Hack
Post by: Swompie on May 11, 2010, 10:27:22 am
BE is actually dead for a while and many hackers seen on public.
This script works very good.
Just get admins around all time and it'll be fine. Imo scripts don't solve it.
Btw. necro much.
Title: Re: Anti Speed/Teleport Hack
Post by: Mercury92 on May 11, 2010, 11:17:18 am
Admin's are not gonna monitor soldat players 24/7.
Just a second ago 2 guys were using speedhack on somekind Zombie server. (Hacktank script)
On each Server 5-10 admins. In theory there will be only admins instead of players.

This is not a solution.
Title: Re: Anti Speed/Teleport Hack
Post by: Leo on May 11, 2010, 01:01:54 pm
I have the solution, I am gonna make all players admins. Then they can kick and ban each other, problem "solved".
Title: Re: Anti Speed/Teleport Hack
Post by: Furai on May 11, 2010, 01:16:49 pm
I have the solution, I am gonna make all players admins. Then they can kick and ban each other, problem "solved".
Leo, just give me adminrights. :)
Title: Re: Anti Speed/Teleport Hack
Post by: Silnikos on May 11, 2010, 01:33:11 pm
This script is gonna go crazy on maps with bouncing polygons.
Title: Re: Anti Speed/Teleport Hack
Post by: Swompie on May 11, 2010, 01:53:21 pm
Admin's are not gonna monitor soldat players 24/7.
I don't meant these guys who are on 24/7. I meant to have admins in USA, Europe, ect. Not only in a timezone range from GMT0-8 for example, get what I mean?

Even though Silnikos is right aswell scripts are also no solutions, admins are way better, but when you pick guys which can't afford a brain to use adminrights in correct form it's not my problem.

And there won't be only admins in theory, they also can just stay around and come in if someone means to see a hacker, if they don't want to they aren't worth beeing an admin..
Title: Re: Anti Speed/Teleport Hack
Post by: Mercury92 on May 11, 2010, 02:41:37 pm
This script is gonna go crazy on maps with bouncing polygons.
Script is tested and no Lags even "gayest" lagger neither Bouncing polygons count here.
Title: Re: Anti Speed/Teleport Hack
Post by: Silnikos on May 12, 2010, 06:35:56 am
If it can't detect a strong bouncing polygon, it won't detect hack either.
Title: Re: Anti Speed/Teleport Hack
Post by: DarkCrusade on May 12, 2010, 08:50:13 am
What about you stop saying "Uuuuuh, this doesn't work because of BOUNCING POLYGONS" and just try this?
Title: Re: Anti Speed/Teleport Hack
Post by: Silnikos on June 01, 2010, 09:58:48 am
What about you stop saying "Uuuuuh, this doesn't work because of BOUNCING POLYGONS" and just try this?
You ask me to get hacks and use them? lol
Title: Re: Anti Speed/Teleport Hack
Post by: DarkCrusade on June 01, 2010, 10:04:14 am
I didn't tell you to join a server and use an aimbot + tele hacks. I stated that this theoretical discussions gets us nowhere and instead of that you could just try it out.
Title: Re: Anti Speed/Teleport Hack
Post by: Falcon` on June 02, 2010, 11:16:52 am
just ban *.*.*.* range. Problem solved

And nice script. Its weird that you wrote it, since you're writing also hacks for soldat, lol.
Some pangs of conscience or what? :D
Title: Re: Anti Speed/Teleport Hack
Post by: Gizd on June 02, 2010, 02:33:00 pm
And nice script. Its weird that you wrote it, since you're writing also hacks for soldat, lol.
Some pangs of conscience or what? :D
To secure something from hacks you need to know how to hack.
Title: Re: Anti Speed/Teleport Hack
Post by: DarkCrusade on June 02, 2010, 03:28:14 pm
Yeah, that's why you sell your hacking tool.
Title: Re: Anti Speed/Teleport Hack
Post by: Falcon` on June 09, 2010, 03:31:27 pm
And nice script. Its weird that you wrote it, since you're writing also hacks for soldat, lol.
Some pangs of conscience or what? :D
To secure something from hacks you need to know how to hack.

/me disagree

you only need to know what hax do
Title: Re: Anti Speed/Teleport Hack
Post by: duz on June 20, 2011, 04:35:55 pm
There's no one solution using script to prevent speed/teleport hacks?
Some players in Brazil are using █████████[software] and MSAC doesn't detect.
Title: Re: Anti Speed/Teleport Hack
Post by: Shoozza on June 21, 2011, 11:48:11 am
I took a look at the speed hack software and wrote some detection code.
If you know other software which allows you to speedhack just send me a pm with the details.

Thanks
Title: Re: Anti Speed/Teleport Hack
Post by: jrgp on June 21, 2011, 11:54:29 pm
I took a look at the speed hack software and wrote some detection code.
If you know other software which allows you to speedhack just send me a pm with the details.

Thanks

It'd be cooler if we made it delete or disable the detected hacks, not just whine about them.
Title: Re: Anti Speed/Teleport Hack
Post by: KYnetiK on June 22, 2011, 02:20:33 am
Denying user input - how much more disabling do you need it?
Title: Re: Anti Speed/Teleport Hack
Post by: Shoozza on June 22, 2011, 03:11:42 am
Denying user input - how much more disabling do you need it?
Actually the game quits after the messagebox gets closed :P

I took a look at the speed hack software and wrote some detection code.
If you know other software which allows you to speedhack just send me a pm with the details.

Thanks

It'd be cooler if we made it delete or disable the detected hacks, not just whine about them.
Nah I can't just start deleting 3rd party stuff.
Title: Re: Anti Speed/Teleport Hack
Post by: KYnetiK on June 22, 2011, 03:59:48 am
Actually the game quits after the messagebox gets closed :P

Exactly - deny the user any form of input to the application while a hack is detectable. What more do y'need :P