- IPC Uses PID to identify the process

- Exception code now shows in hex capitals
- Fixed version checking and bumped the version support
- Added process blacklist for already injected game detection
- Used std::all_of instead of std::string::find for digit checks
This commit is contained in:
Anonymous275
2022-07-25 17:09:42 +03:00
parent d7d1a550cb
commit 8f53052356
9 changed files with 74 additions and 49 deletions

View File

@@ -23,6 +23,6 @@ private:
static inline uint64_t DllBaseAddr;
static int lua_open_jit_D(lua_State* State);
static void RegisterGEFunctions();
static int GetTickCount_D(void* GEState, void* Param2, void* Param3, void* Param4);
// static int GetTickCount_D(void* GEState, void* Param2, void* Param3, void* Param4);
static void IPCListener();
};

View File

@@ -8,8 +8,8 @@
class IPC {
public:
IPC() = delete;
IPC(const char* MemID, const char* SemID, const char* SemID2, size_t Size) noexcept;
IPC() = default;
IPC(uint32_t ID, size_t Size) noexcept;
[[nodiscard]] size_t size() const noexcept;
[[nodiscard]] char* c_str() const noexcept;
void send(const std::string& msg) noexcept;
@@ -21,6 +21,7 @@ public:
void try_receive() noexcept;
void receive() noexcept;
~IPC() noexcept;
static bool mem_used(uint32_t MemID) noexcept;
private:
void* SemConfHandle_;
void* MemoryHandle_;

View File

@@ -5,15 +5,16 @@
#pragma once
#include <string>
#include <vector>
class Memory{
public:
static uint64_t FindPattern(const char* module, const char* Pattern[]);
static uint32_t GetBeamNGPID(const std::vector<uint32_t>& BL);
static uint64_t GetModuleBase(const char* Name);
static void Print(const std::string& msg);
static void Inject(uint32_t PID);
static uint32_t GetTickCount();
static uint32_t GetBeamNGPID();
static uint32_t EntryPoint();
static uint32_t GetPID();
};