diff options
author | Maya <malte.hoermeyer@web.de> | 2022-06-26 22:16:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-26 22:16:50 +0200 |
commit | d961347a611a8f4e670430008f562cdb042ffdd9 (patch) | |
tree | 138bf9fbd524f954dd7e8517e9434f5f4d91783c /NorthstarDedicatedTest/ExploitFixes.cpp | |
parent | 660062b934ac98077f08fde9a18f795be0b58b0f (diff) | |
download | NorthstarLauncher-d961347a611a8f4e670430008f562cdb042ffdd9.tar.gz NorthstarLauncher-d961347a611a8f4e670430008f562cdb042ffdd9.zip |
Switch IsValveMod back to use a EnablerHook (#210)
* Switch IsValveMod back to use a EnablerHook
KHook version no worky
* Formatting
>:(
Diffstat (limited to 'NorthstarDedicatedTest/ExploitFixes.cpp')
-rw-r--r-- | NorthstarDedicatedTest/ExploitFixes.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/NorthstarDedicatedTest/ExploitFixes.cpp b/NorthstarDedicatedTest/ExploitFixes.cpp index 9abc6b66..44b62d55 100644 --- a/NorthstarDedicatedTest/ExploitFixes.cpp +++ b/NorthstarDedicatedTest/ExploitFixes.cpp @@ -272,7 +272,11 @@ INVALID_CMD: // this is HORRIBLE for security, because it means servers can run arbitrary concommands on clients // especially since we have script commands this could theoretically be awful #include "gameutils.h" -KHOOK(IsValveMod, ("engine.dll", "48 83 EC 28 48 8B 0D ? ? ? ? 48 8D 15 ? ? ? ? E8 ? ? ? ? 85 C0 74 63"), bool, __fastcall, ()) + +typedef void (*IsValveModType)(); +IsValveModType IsValveMod; + +bool IsValveModHook() { return !CommandLine()->CheckParm("-norestrictservercommands"); } @@ -511,4 +515,11 @@ void ExploitFixes::LoadCallback(HMODULE baseAddress) HookEnabler hook; ENABLER_CREATEHOOK(hook, (char*)baseAddress + 0x2a8a50, &GetEntByIndexHook, reinterpret_cast<LPVOID*>(&GetEntByIndex)); +} + +void ExploitFixes::LoadCallbackEngine(HMODULE baseAddress) +{ + spdlog::info("ExploitFixes::LoadCallbackEngine ..."); + HookEnabler hook; + ENABLER_CREATEHOOK(hook, (char*)baseAddress + 0x1C6360, &IsValveModHook, reinterpret_cast<LPVOID*>(&IsValveMod)); }
\ No newline at end of file |