diff options
author | Emma Miler <emma.pi@protonmail.com> | 2022-10-04 00:09:44 +0200 |
---|---|---|
committer | GeckoEidechse <gecko.eidechse+git@pm.me> | 2022-10-04 00:10:39 +0200 |
commit | 41e29a060083aabae2d8f3959d4e81037c484d95 (patch) | |
tree | 13888b959cfccd1c12f1a0126b6d9741c6c10d88 | |
parent | adaeb557eeb90e41275058ab3f3a0ca75e6ea0a4 (diff) | |
download | NorthstarLauncher-41e29a060083aabae2d8f3959d4e81037c484d95.tar.gz NorthstarLauncher-41e29a060083aabae2d8f3959d4e81037c484d95.zip |
Also blocks migrateme
-rw-r--r-- | NorthstarDLL/clientauthhooks.cpp | 18 | ||||
-rw-r--r-- | NorthstarDLL/exploitfixes.cpp | 2 |
2 files changed, 20 insertions, 0 deletions
diff --git a/NorthstarDLL/clientauthhooks.cpp b/NorthstarDLL/clientauthhooks.cpp index cdabf7f2..3235e6cd 100644 --- a/NorthstarDLL/clientauthhooks.cpp +++ b/NorthstarDLL/clientauthhooks.cpp @@ -15,6 +15,11 @@ const int NOT_DECIDED_TO_SEND_TOKEN = 0; const int AGREED_TO_SEND_TOKEN = 1; const int DISAGREED_TO_SEND_TOKEN = 2; +typedef char* (*Auth3PTokenType)(); +Auth3PTokenType Auth3PToken; + +char* token_location = 0x0; + void AuthWithStryderHook(void* a1) { // game will call this forever, until it gets a valid auth key @@ -33,6 +38,17 @@ void AuthWithStryderHook(void* a1) AuthWithStryder(a1); } +char* Auth3PTokenHook() +{ + if (g_MasterServerManager->m_sOwnClientAuthToken[0] != 0) + { + memset(token_location, 0x0, 1024); + strcpy(token_location, "Protocol 3: Protect the Pilot"); + } + + return Auth3PToken(); +} + void InitialiseClientAuthHooks(HMODULE baseAddress) { // this cvar will save to cfg once initially agreed with @@ -44,4 +60,6 @@ void InitialiseClientAuthHooks(HMODULE baseAddress) HookEnabler hook; ENABLER_CREATEHOOK(hook, (char*)baseAddress + 0x1843A0, &AuthWithStryderHook, reinterpret_cast<LPVOID*>(&AuthWithStryder)); + ENABLER_CREATEHOOK(hook, (char*)baseAddress + 0x183760, &Auth3PTokenHook, reinterpret_cast<LPVOID*>(&Auth3PToken)); + token_location = (char*)baseAddress + 0x13979D80; } diff --git a/NorthstarDLL/exploitfixes.cpp b/NorthstarDLL/exploitfixes.cpp index aa5adae3..0aa0a3bf 100644 --- a/NorthstarDLL/exploitfixes.cpp +++ b/NorthstarDLL/exploitfixes.cpp @@ -548,6 +548,8 @@ void ExploitFixes::LoadCallback_Full(HMODULE baseAddress) ns_exploitfixes_log = new ConVar("ns_exploitfixes_log", "1", FCVAR_GAMEDLL, "Whether to log whenever exploitfixes.cpp blocks/corrects something"); + g_pCVar->FindCommand("migrateme")->m_nFlags &= ~FCVAR_SERVER_CAN_EXECUTE; + HookEnabler hook; ENABLER_CREATEHOOK(hook, (char*)baseAddress + 0x2a8a50, &GetEntByIndexHook, reinterpret_cast<LPVOID*>(&GetEntByIndex)); } |