diff options
author | KittenPopo <Pokeberry123@gmail.com> | 2022-03-26 16:20:09 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-26 23:20:09 +0000 |
commit | 379cbc8bc251307777a14b901e5617e834398485 (patch) | |
tree | 4722db4a3c301462ca009f5bb2976508b652677e /NorthstarDedicatedTest/pch.h | |
parent | 2c74033440212308eb0fe0d8b3135ffc5cd0422e (diff) | |
download | NorthstarLauncher-379cbc8bc251307777a14b901e5617e834398485.tar.gz NorthstarLauncher-379cbc8bc251307777a14b901e5617e834398485.zip |
Major exploit fixes and some minor bug fixes/improvements (#117)v1.6.0-rc3
* Added main exploit fixes
* Fixed typo in sigscanning.cpp
* Fully implemented
* Added proper includes for new files
* Update README.md
* typo
* spare me my sanity (fixed ridiculous code)
* Added rest of KittenMemUtils
* Rename KittenMemUtils
* Removed all messy memory edits, implemented NSMem instead
* Update NorthstarDedicatedTest.vcxproj
* [1] Move everything from securitypatches to ExploitFixes
* [2] Move everything from securitypatches to ExploitFixes
* Fixed module offsets in stack trace
* Fixed UTF8 Parsing (Multiplayer Crash)
* Implemented UT8 fix
* Update NorthstarDedicatedTest.vcxproj
* Update hookutils.cpp
* Small fixes
* all my homies hate clang-format
* Temporarily restore README.md
* Added string hash macro
* Added convenient vtfunc macro
* Made lil ConCommand creation macro
* Fixed multiple NET_SetConVar exploits
* Quick fixerino
* Fix convar struct (and other things)
* Revive clang-format (but good, i think)
* Update .clang-format
* Reformatted code to meet .clang-format requirements
* Minor formatting fixes
* Fixed Northstar "crashing" when console is closed
* Update .clang-format
Diffstat (limited to 'NorthstarDedicatedTest/pch.h')
-rw-r--r-- | NorthstarDedicatedTest/pch.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/NorthstarDedicatedTest/pch.h b/NorthstarDedicatedTest/pch.h index 29d1fe8d..cc44c107 100644 --- a/NorthstarDedicatedTest/pch.h +++ b/NorthstarDedicatedTest/pch.h @@ -16,6 +16,7 @@ #include <Windows.h> #include <Psapi.h> #include <set> +#include <map> #include <filesystem> #include <sstream> @@ -30,4 +31,17 @@ template <typename ReturnType, typename... Args> ReturnType CallVFunc(int index, return (*reinterpret_cast<ReturnType(__fastcall***)(void*, Args...)>(thisPtr))[index](thisPtr, args...); } +template <typename T, size_t index, typename ...Args> constexpr T CallVFunc_Alt(void* classBase, Args... args) noexcept { + return ((*(T(__thiscall***)(void*, Args...))(classBase))[index])(classBase, args...); +} + + +#define STR_HASH(s) (std::hash<std::string>()(s)) + +// Example usage: M_VMETHOD(int, GetEntityIndex, 8, (CBaseEntity* ent), (this, ent)) +#define M_VMETHOD(returnType, name, index, args, argsRaw) \ +FORCEINLINE returnType name args noexcept { \ + return CallVFunc_Alt<returnType, index> argsRaw; \ +} + #endif
\ No newline at end of file |