Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[G2O] SpeedBlock
#1
Introduction:

SpeedBlock is Gothic 2 Online module consisting of both server and client side components. It allows to detect undesirable (game process) speed changes performed by using applications such as Cheat Engine and measure speed multiplier with an accuracy of 0.001. Any reactions and penalties are configurable via adding handlers to provided server-side events. False positive results are very unlikely to happen.

Server-side events:

onSpeedHackDetect(int pid, float multiplier) - called if measured player speed multiplier for player is incorect. Provides measured multiplier as parameter.

onSpeedBlockModuleMissing(int pid) - called if player has no module, module is not loaded on client side or module file hash mismatch occurs. Event won't be called right after player joins, it will trigger in few seconds - this allows to prevent false positive on overloaded server. If you wish to detect missing module on client-side instantly, you should use custom script similar to presented below.

onSpeedBlockModuleError(int pid) - rare event occuring only when someone is trying to mess with module protection algorithm. Should be also penalised.

Example implementation:

Code:
addEventHandler("onSpeedHackDetect",function(pid, multiplier)
{
    if(isPlayerConnected(pid))
        kick(pid, "SpeedHack detected with multiplier: " + multiplier);
});

addEventHandler("onSpeedBlockModuleError",function(pid)
{
    if(isPlayerConnected(pid))
        kick(pid, "SpeedBlock module error.");
});

addEventHandler("onSpeedBlockModuleMissing",function(pid)
{
    if(isPlayerConnected(pid))
        kick(pid, "Missing SpeedBlock module.");
});

For instantly detecting missing module on client-side, include in onInit:

Code:
local function initHandler()
{
    try{
        _7fdgkt(0xFF);
    }
    catch(Exception){
        //send packet to notify server, exitGame, w/e
    }
}

addEventHandler("onInit", initHandler);


Download links:

Client Module (Windows) - SpeedBlock.dll
SHA256: 9369ae58679040f2c2e657779f79dbe864d967ae54582536f18d4564dfbfcec7

Server Module (Windows) - SpeedBlockServer.dll
SHA256: fc8ac3cfc67208ec4b6f987b977c9567246048d14ad630096b2d731688151397

Server Module (Linux) - SpeedBlockServer.so
SHA256: 3ca49fbf140291ac28887590630e8d85d176e7670febe1a229ca10e8d62e3f63

Configuration (exact while placing server-side modules in main server directory):

Client module should be placed in Multiplayer/Modules folder and in a desired server directory.

For both Windows and Linux based servers, add line to config.xml:

PHP Code:
<module src="SpeedBlock.dll" type="client" /> 

If hosting server on Windows, add another line:

PHP Code:
<module src="SpeedBlockServer.dll" type="server" /> 

If hosting server on Linux, add line:

PHP Code:
<module src="SpeedBlockServer.so" type="server" /> 

For Linux version, it might be required to put ./ before module names/directories. Example:

PHP Code:
<module src="./SpeedBlockServer.so" type="server" /> 
Reply


Messages In This Thread
[G2O] SpeedBlock - by Marbar - 24.06.2020, 03:04
RE: [G2O] SpeedBlock - by Quarchodron - 24.06.2020, 07:45
RE: [G2O] SpeedBlock - by Marbar - 24.06.2020, 12:10
RE: [G2O] SpeedBlock - by Quarchodron - 24.06.2020, 12:32
RE: [G2O] SpeedBlock - by Marbar - 24.06.2020, 13:03
RE: [G2O] SpeedBlock - by Quarchodron - 24.06.2020, 13:11
RE: [G2O] SpeedBlock - by Marbar - 24.06.2020, 13:26
RE: [G2O] SpeedBlock - by Patrix - 24.06.2020, 19:57
RE: [G2O] SpeedBlock - by Retrok - 24.06.2020, 20:32
RE: [G2O] SpeedBlock - by Marbar - 24.06.2020, 22:05
RE: [G2O] SpeedBlock - by Patrix - 25.06.2020, 00:48
RE: [G2O] SpeedBlock - by Marbar - 25.06.2020, 01:59
RE: [G2O] SpeedBlock - by Patrix - 25.06.2020, 02:53
RE: [G2O] SpeedBlock - by Patrix - 25.06.2020, 05:16
RE: [G2O] SpeedBlock - by Marbar - 25.06.2020, 12:14
RE: [G2O] SpeedBlock - by Piootrek86 - 03.10.2020, 15:44
RE: [G2O] SpeedBlock - by Sative - 13.10.2020, 15:32

Possibly Related Threads…
Thread Author Replies Views Last Post
  [New G2O][Client-Side] GUI Patrix 1 3,345 02.01.2021, 05:22
Last Post: Patrix
  [New G2O][Client-Side] LocalStorage Patrix 0 2,427 08.05.2020, 16:38
Last Post: Patrix
  [New G2O] Module example Patrix 4 7,694 17.05.2019, 01:30
Last Post: Patrix
  [New G2O][Client-Side] Music Module Nubzior 3 5,921 24.05.2018, 08:07
Last Post: Nubzior
  G2O - Client Side Bots(0.0.4) KimiorV 16 17,035 16.01.2017, 10:47
Last Post: KimiorV
  [DEV] G2O Bot module Sative 64 59,288 25.11.2016, 20:13
Last Post: HammelGammel
  G2O Client side bots KimiorV 4 5,911 09.06.2016, 20:11
Last Post: KimiorV

Forum Jump:


Users browsing this thread: 1 Guest(s)