mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2025-01-04 00:23:27 +08:00
feat(Protections): Added network group override protection
This commit is contained in:
parent
0c0a99cf45
commit
286960ac18
@ -37,7 +37,11 @@ namespace big
|
||||
// Network Player Mgr Shutdown
|
||||
m_network_player_mgr_shutdown_hook("NPMS", g_pointers->m_network_player_mgr_shutdown, &hooks::network_player_mgr_shutdown),
|
||||
|
||||
m_net_array_handler_hook("net_array_handler", g_pointers->m_net_array_handler, &hooks::net_array_handler),
|
||||
// Network Group Override
|
||||
m_network_group_override("NGO", g_pointers->m_network_group_override, &hooks::network_group_override),
|
||||
|
||||
// Net Array Handler
|
||||
m_net_array_handler_hook("NAH", g_pointers->m_net_array_handler, &hooks::net_array_handler),
|
||||
|
||||
// Increment Stat Event
|
||||
m_increment_stat_hook("ISE", g_pointers->m_increment_stat_event, &hooks::increment_stat_event),
|
||||
|
@ -42,6 +42,8 @@ namespace big
|
||||
|
||||
static void network_player_mgr_shutdown(CNetworkPlayerMgr* _this);
|
||||
|
||||
static void network_group_override(std::int64_t a1, std::int64_t a2, std::int64_t a3);
|
||||
|
||||
static bool net_array_handler(__int64 netArrayHandlerBaseMgr, CNetGamePlayer* a2, rage::datBitBuffer* datbitbuffer, unsigned int bytes_to_read, __int16 a5);
|
||||
|
||||
static void player_join(CNetworkObjectMgr* _this, CNetGamePlayer* net_player);
|
||||
@ -101,6 +103,8 @@ namespace big
|
||||
|
||||
detour_hook m_network_player_mgr_shutdown_hook;
|
||||
|
||||
detour_hook m_network_group_override;
|
||||
|
||||
detour_hook m_net_array_handler_hook;
|
||||
|
||||
detour_hook m_player_has_joined_hook;
|
||||
|
18
BigBaseV2/src/hooks/network_group_override.cpp
Normal file
18
BigBaseV2/src/hooks/network_group_override.cpp
Normal file
@ -0,0 +1,18 @@
|
||||
#include "hooking.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
// thanks ellisdudes :P
|
||||
void hooks::network_group_override(std::int64_t a1, std::int64_t a2, std::int64_t a3)
|
||||
{
|
||||
if (a2 == 0 && (a3 == 103 || a3 == 0))
|
||||
{
|
||||
LOG(WARNING) << "Received SCRIPT_WORLD_STATE_EVENT crash from unknown attacker...";
|
||||
|
||||
return;
|
||||
}
|
||||
// original
|
||||
|
||||
return g_hooking->m_network_group_override.get_original<decltype(&network_group_override)>()(a1, a2, a3);
|
||||
}
|
||||
}
|
@ -248,6 +248,12 @@ namespace big
|
||||
{
|
||||
m_net_array_handler = ptr.sub(0x3C).as<PVOID>();
|
||||
});
|
||||
|
||||
// Network Group Override
|
||||
main_batch.add("NGO", "44 89 81 ? ? ? ? 89 91 ? ? ? ? C6 05", [this](memory::handle ptr)
|
||||
{
|
||||
m_network_group_override = ptr.as<PVOID>();
|
||||
});
|
||||
|
||||
main_batch.run(memory::module(nullptr));
|
||||
|
||||
|
@ -44,12 +44,11 @@ namespace big
|
||||
int* m_resolution_x;
|
||||
int* m_resolution_y;
|
||||
|
||||
std::uint16_t* m_some_anticheat_thing{};
|
||||
|
||||
PVOID m_blame_explode;
|
||||
PVOID m_model_spawn_bypass;
|
||||
PVOID m_native_return;
|
||||
PVOID m_is_dlc_present;
|
||||
PVOID m_network_group_override;
|
||||
|
||||
PVOID m_error_screen{};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user