Browse Source

update for latest sourcemod + ConMsg flood explot fix (thx Neon + backwards)

master
BotoX 1 year ago
parent
commit
7b7821f65b
  1. 3
      AMBuildScript
  2. 18
      extension.cpp
  3. 2
      smsdk_config.h

3
AMBuildScript

@ -158,7 +158,7 @@ class ExtensionConfig(object): @@ -158,7 +158,7 @@ class ExtensionConfig(object):
'-fvisibility=hidden',
]
cxx.cxxflags += [
'-std=c++11',
'-std=c++14',
'-fno-exceptions',
'-fno-threadsafe-statics',
'-Wno-non-virtual-dtor',
@ -246,6 +246,7 @@ class ExtensionConfig(object): @@ -246,6 +246,7 @@ class ExtensionConfig(object):
cxx.linkflags += ['-static-libgcc']
elif cxx.vendor == 'clang':
cxx.linkflags += ['-lgcc_eh']
cxx.linkflags += ['-static-libstdc++']
def configure_mac(self, cxx):
cxx.defines += ['OSX', '_OSX', 'POSIX']

18
extension.cpp

@ -164,6 +164,22 @@ static struct SrcdsPatch @@ -164,6 +164,22 @@ static struct SrcdsPatch
"xxxxxx",
(unsigned char *)"\x90\x90\x90\x90\x90\x90",
0, 0, 0, true
},
// 10: fix server lagging resulting from too many ConMsgs due to packet spam ("%s:corrupted packet %i at %i\n")
{
"_ZN8CNetChan19ProcessPacketHeaderEP11netpacket_s",
(unsigned char *)"\x89\x44\x24\x04\x89\x5C\x24\x0C\x89\x54\x24\x08\xE8\xE0\xAB\x22\x00",
"xxxxxxxxxxxxx????",
(unsigned char *)"\x89\x44\x24\x04\x89\x5C\x24\x0C\x89\x54\x24\x08\x90\x90\x90\x90\x90",
0, 0, 0, true
},
// 11: fix server lagging resulting from too many ConMsgs due to packet spam ("Invalid split packet length %i\n")
{
"_Z11NET_GetLongiP11netpacket_s",
(unsigned char *)"\x89\x44\x24\x04\xC7\x04\x24\x98\x64\x24\x00\xE8\xFE\x20\x22\x00\x89\xF8\x8B\x5D\xF4\x8B\x75\xF8\x8B\x7D\xFC",
"xxxx???????x????xxxxxxxxxxx",
(unsigned char *)"\x89\x44\x24\x04\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x89\xF8\x8B\x5D\xF4\x8B\x75\xF8\x8B\x7D\xFC",
0, 0, 0, true
}
};
@ -559,7 +575,7 @@ bool CSSFixes::SDK_OnLoad(char *error, size_t maxlength, bool late) @@ -559,7 +575,7 @@ bool CSSFixes::SDK_OnLoad(char *error, size_t maxlength, bool late)
return false;
}
pPatch->pPatchAddress = FindPattern(pPatch->pAddress, pPatch->pPatchSignature, pPatch->pPatchPattern, 1024);
pPatch->pPatchAddress = FindPattern(pPatch->pAddress, pPatch->pPatchSignature, pPatch->pPatchPattern, 0x1000);
if(!pPatch->pPatchAddress)
{
snprintf(error, maxlength, "Could not find patch signature for symbol: %s", pPatch->pSignature);

2
smsdk_config.h

@ -40,7 +40,7 @@ @@ -40,7 +40,7 @@
/* Basic information exposed publicly */
#define SMEXT_CONF_NAME "CSSFixes"
#define SMEXT_CONF_DESCRIPTION "Patches bugs in the CSS server binary and more..."
#define SMEXT_CONF_VERSION "1.16"
#define SMEXT_CONF_VERSION "1.17"
#define SMEXT_CONF_AUTHOR "BotoX"
#define SMEXT_CONF_URL ""
#define SMEXT_CONF_LOGTAG "CSSFIXES"

Loading…
Cancel
Save