diff --git a/include/modules/serversecure.lua b/include/modules/serversecure.lua index a72fb11..bd06b59 100644 --- a/include/modules/serversecure.lua +++ b/include/modules/serversecure.lua @@ -2,8 +2,8 @@ require("serversecure.core") local format, match, band, rshift = string.format, string.match, bit.band, bit.rshift -serversecure.Version = "serversecure 1.5.19" -serversecure.VersionNum = 10519 +serversecure.Version = "serversecure 1.5.20" +serversecure.VersionNum = 10520 function serversecure.IPToString(uint) if not uint then diff --git a/source/filecheck.cpp b/source/filecheck.cpp index 45ada1a..bafee67 100644 --- a/source/filecheck.cpp +++ b/source/filecheck.cpp @@ -1,7 +1,7 @@ #include #include #include -#include +#include #include #include #include @@ -26,22 +26,16 @@ namespace filecheck #if defined SYSTEM_WINDOWS static const char CNetChan__IsValidFileForTransfer_sig[] = - "\x55\x8B\xEC\x53\x8B\x5D\x08\x85\xDB\x0F\x84\x2A\x2A\x2A\x2A\x8A\x03"; + "\x55\x8B\xEC\x53\x8B\x5D\x08\x56\x57\x85\xDB\x0F\x84"; static const size_t CNetChan__IsValidFileForTransfer_siglen = sizeof( CNetChan__IsValidFileForTransfer_sig ) - 1; -#elif defined SYSTEM_LINUX +#elif defined SYSTEM_LINUX || defined SYSTEM_MACOSX static const char CNetChan__IsValidFileForTransfer_sig[] = "@_ZN8CNetChan22IsValidFileForTransferEPKc"; static const size_t CNetChan__IsValidFileForTransfer_siglen = 0; -#elif defined SYSTEM_MACOSX - - static const char CNetChan__IsValidFileForTransfer_sig[] = - "@__ZN8CNetChan22IsValidFileForTransferEPKc"; - static const size_t CNetChan__IsValidFileForTransfer_siglen = 0; - #endif static CNetChan__IsValidFileForTransfer_t CNetChan__IsValidFileForTransfer_original = nullptr; diff --git a/source/main.cpp b/source/main.cpp index 5eb14a2..5841d17 100644 --- a/source/main.cpp +++ b/source/main.cpp @@ -15,16 +15,11 @@ namespace global "\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\xD8\x6D\x24\x83\x4D\xEC\x10"; static const size_t IServer_siglen = sizeof( IServer_sig ) - 1; -#elif defined SYSTEM_LINUX +#elif defined SYSTEM_LINUX || defined SYSTEM_MACOSX static const char IServer_sig[] = "@sv"; static const size_t IServer_siglen = 0; -#elif defined SYSTEM_MACOSX - - static const char IServer_sig[] = "@_sv"; - static const size_t IServer_siglen = 0; - #endif SourceSDK::FactoryLoader engine_loader( "engine", false, true, "bin/" ); diff --git a/source/netfilter/core.cpp b/source/netfilter/core.cpp index 74e0263..3cec2ec 100644 --- a/source/netfilter/core.cpp +++ b/source/netfilter/core.cpp @@ -181,7 +181,7 @@ namespace netfilter static const char operating_system_char = 'w'; -#elif defined SYSTEM_LINUX +#elif defined SYSTEM_LINUX || defined SYSTEM_MACOSX static const char SteamGameServerAPIContext_sym[] = "@_ZL27s_SteamGameServerAPIContext"; static const size_t SteamGameServerAPIContext_symlen = 0; @@ -195,27 +195,11 @@ namespace netfilter static const char net_sockets_sig[] = "@_ZL11net_sockets"; static const size_t net_sockets_siglen = 0; +#ifdef SYSTEM_LINUX static const char operating_system_char = 'l'; - - typedef int SOCKET; - - static const SOCKET INVALID_SOCKET = -1; - -#elif defined SYSTEM_MACOSX - - static const char SteamGameServerAPIContext_sym[] = "@__ZL27s_SteamGameServerAPIContext"; - static const size_t SteamGameServerAPIContext_symlen = 0; - - static const char FileSystemFactory_sym[] = "@__Z17FileSystemFactoryPKcPi"; - static const size_t FileSystemFactory_symlen = 0; - - static const char g_pFullFileSystem_sym[] = "@_g_pFullFileSystem"; - static const size_t g_pFullFileSystem_symlen = 0; - - static const char net_sockets_sig[] = "@__ZL11net_sockets"; - static const size_t net_sockets_siglen = 0; - +#else static const char operating_system_char = 'm'; +#endif typedef int SOCKET;