Author Topic: Anti Speed/Teleport Hack  (Read 20171 times)

0 Members and 1 Guest are viewing this topic.

Offline -Snowy-

  • Major(1)
  • Posts: 44
    • Snowy
Anti Speed/Teleport Hack
« 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

Offline Leo

  • Soldat Beta Team
  • Veteran
  • ******
  • Posts: 1011
Re: Anti Speed/Teleport Hack
« Reply #1 on: January 22, 2008, 10:29:45 am »
How about warps due to lag ?

Offline -Snowy-

  • Major(1)
  • Posts: 44
    • Snowy
Re: Anti Speed/Teleport Hack
« Reply #2 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

Offline Pie

  • Flagrunner
  • ****
  • Posts: 761
Re: Anti Speed/Teleport Hack
« Reply #3 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?
Lol, internets.

Offline EnEsCe

  • Retired Soldat Developer
  • Flamebow Warrior
  • ******
  • Posts: 3101
  • http://enesce.com/
    • [eC] Official Website
Re: Anti Speed/Teleport Hack
« Reply #4 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.

Offline -Snowy-

  • Major(1)
  • Posts: 44
    • Snowy
Re: Anti Speed/Teleport Hack
« Reply #5 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

Offline badchucky

  • Major(1)
  • Posts: 1
Re: Anti Speed/Teleport Hack
« Reply #6 on: January 22, 2008, 11:27:14 am »
Nice script thanks:)

Offline FliesLikeABrick

  • Administrator
  • Flamebow Warrior
  • *****
  • Posts: 6144
    • Ultimate 13 Soldat
Re: Anti Speed/Teleport Hack
« Reply #7 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

Offline rhide

  • Major
  • *
  • Posts: 60
  • Coffee-addict
    • Vrastar-Hai soldat clan
Re: Anti Speed/Teleport Hack
« Reply #8 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 >.<
Warning! Division by zero seriously injures yourself and the people in your surroundings.

Proud member of Vrastar-Hai:
http://www.guldheden.com/~erga050/vrastar-hai

Offline -Snowy-

  • Major(1)
  • Posts: 44
    • Snowy
Re: Anti Speed/Teleport Hack
« Reply #9 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

Offline rhide

  • Major
  • *
  • Posts: 60
  • Coffee-addict
    • Vrastar-Hai soldat clan
Re: Anti Speed/Teleport Hack
« Reply #10 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
Warning! Division by zero seriously injures yourself and the people in your surroundings.

Proud member of Vrastar-Hai:
http://www.guldheden.com/~erga050/vrastar-hai

Offline Mercury92

  • Camper
  • ***
  • Posts: 284
Re: Anti Speed/Teleport Hack
« Reply #11 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.
[saw]  on 1.5.1

Offline Swompie

  • Camper
  • ***
  • Posts: 390
Re: Anti Speed/Teleport Hack
« Reply #12 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.

Offline Mercury92

  • Camper
  • ***
  • Posts: 284
Re: Anti Speed/Teleport Hack
« Reply #13 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.
[saw]  on 1.5.1

Offline Leo

  • Soldat Beta Team
  • Veteran
  • ******
  • Posts: 1011
Re: Anti Speed/Teleport Hack
« Reply #14 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".

Offline Furai

  • Administrator
  • Veteran
  • *****
  • Posts: 1908
    • TransHuman Design
Re: Anti Speed/Teleport Hack
« Reply #15 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. :)
"My senses are so powerful that I can hear the blood pumping through your veins."

Offline Silnikos

  • Soldier
  • **
  • Posts: 129
Re: Anti Speed/Teleport Hack
« Reply #16 on: May 11, 2010, 01:33:11 pm »
This script is gonna go crazy on maps with bouncing polygons.

Offline Swompie

  • Camper
  • ***
  • Posts: 390
Re: Anti Speed/Teleport Hack
« Reply #17 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..

Offline Mercury92

  • Camper
  • ***
  • Posts: 284
Re: Anti Speed/Teleport Hack
« Reply #18 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.
[saw]  on 1.5.1

Offline Silnikos

  • Soldier
  • **
  • Posts: 129
Re: Anti Speed/Teleport Hack
« Reply #19 on: May 12, 2010, 06:35:56 am »
If it can't detect a strong bouncing polygon, it won't detect hack either.