diff --git a/src/game/Anticheat/module/Warden/WardenModule.hpp b/src/game/Anticheat/module/Warden/WardenModule.hpp index 0ba273554f..921791b41d 100644 --- a/src/game/Anticheat/module/Warden/WardenModule.hpp +++ b/src/game/Anticheat/module/Warden/WardenModule.hpp @@ -57,6 +57,9 @@ class WardenModule // mapping of scan function to the numerical value of the opcode uint8_t opcodes[ScanTypeCount]; + // invalid opcode value that signifies scans are over + uint8 scanTerminator; + // pregenerated challenge, responses, and encryption keys for this module std::vector crk; }; diff --git a/src/game/Anticheat/module/Warden/warden.cpp b/src/game/Anticheat/module/Warden/warden.cpp index ca31c6042b..d4036e3a80 100644 --- a/src/game/Anticheat/module/Warden/warden.cpp +++ b/src/game/Anticheat/module/Warden/warden.cpp @@ -259,7 +259,7 @@ void Warden::RequestScans(std::vector> &&scans) if (_session->GetOS() == CLIENT_OS_WIN) { // indicates to the client that there are no further requests in this packet - buff << _xor; + buff << uint8(_module->scanTerminator ^ _xor); } BeginTimeoutClock(); diff --git a/src/game/Anticheat/module/Warden/wardenmodule.cpp b/src/game/Anticheat/module/Warden/wardenmodule.cpp index f106d3fc29..74003a030d 100644 --- a/src/game/Anticheat/module/Warden/wardenmodule.cpp +++ b/src/game/Anticheat/module/Warden/wardenmodule.cpp @@ -81,6 +81,23 @@ WardenModule::WardenModule(std::string const &bin, std::string const &kf, std::s if (Windows()) { + for (uint8 i = 0; i <= UINT8_MAX; i++) + { + if (opcodes[0] != i && + opcodes[1] != i && + opcodes[2] != i && + opcodes[3] != i && + opcodes[4] != i && + opcodes[5] != i && + opcodes[6] != i && + opcodes[7] != i && + opcodes[8] != i) + { + scanTerminator = i; + break; + } + } + if (!memoryRead) throw std::runtime_error("Module data does not include memory read information");