diff --git a/extensions/connect.ext.2.ep2v.dll b/extensions/connect.ext.2.ep2v.dll deleted file mode 100755 index a894cb2a..00000000 Binary files a/extensions/connect.ext.2.ep2v.dll and /dev/null differ diff --git a/extensions/connect.ext.2.ep2v.so b/extensions/connect.ext.2.ep2v.so deleted file mode 100755 index 83878a0e..00000000 Binary files a/extensions/connect.ext.2.ep2v.so and /dev/null differ diff --git a/extensions/connect.ext.2.tf2.dll b/extensions/connect.ext.2.tf2.dll new file mode 100644 index 00000000..6f2a8f1f Binary files /dev/null and b/extensions/connect.ext.2.tf2.dll differ diff --git a/extensions/connect.ext.2.tf2.so b/extensions/connect.ext.2.tf2.so new file mode 100644 index 00000000..2a44f297 Binary files /dev/null and b/extensions/connect.ext.2.tf2.so differ diff --git a/extensions/x64/connect.ext.2.tf2.dll b/extensions/x64/connect.ext.2.tf2.dll new file mode 100644 index 00000000..a937abe1 Binary files /dev/null and b/extensions/x64/connect.ext.2.tf2.dll differ diff --git a/extensions/x64/connect.ext.2.tf2.so b/extensions/x64/connect.ext.2.tf2.so new file mode 100644 index 00000000..38afea68 Binary files /dev/null and b/extensions/x64/connect.ext.2.tf2.so differ diff --git a/gamedata/connect.games.txt b/gamedata/connect.games.txt index 843de8bc..3decfb73 100755 --- a/gamedata/connect.games.txt +++ b/gamedata/connect.games.txt @@ -15,31 +15,25 @@ "ISteamGameServer__BeginAuthSession" { "linux" "29" - "mac" "29" + "linux64" "29" "windows" "29" } "ISteamGameServer__EndAuthSession" { "linux" "30" - "mac" "30" + "linux64" "30" "windows" "30" } } "Signatures" { - "CBaseServer__CheckMasterServerRequestRestart" - { - "library" "engine" - "windows" "\xE8\x2A\x2A\x2A\x2A\x83\x78\x04\x00\x74\x2A\xE8\x2A\x2A\x2A\x2A\x8B\x48\x04\x8B\x01\x8B\x40\x2C\xFF\xD0\x84\xC0\x74\x2A\x56" - } - "Steam3Server" { "library" "engine" "linux" "@_Z12Steam3Serverv" - "mac" "@_Z12Steam3Serverv" + "linux64" "@_Z12Steam3Serverv" } } } @@ -53,6 +47,14 @@ "engine" "hl2dm" } + "Offsets" + { + "CheckMasterServerRequestRestart_Steam3ServerFuncOffset" + { + "windows" "1" + } + } + "Signatures" { "CBaseServer__ConnectClient" @@ -79,12 +81,10 @@ "windows" "\x55\x8B\xEC\x8B\x55\x08\x8B\x02\x89\x41\x59\x8B\x42\x04" } - "CBaseServer__CheckChallengeType" + "CBaseServer__CheckMasterServerRequestRestart" { "library" "engine" - "linux" "@_ZN11CBaseServer18CheckChallengeTypeEP11CBaseClientiR8netadr_siPKcii" - "mac" "@_ZN11CBaseServer18CheckChallengeTypeEP11CBaseClientiR8netadr_siPKcii" - "windows" "\x55\x8B\xEC\x83\xEC\x14\x56\x57\x8B\x7D\x2A\x8B\xF1" + "windows" "\xE8\x2A\x2A\x2A\x2A\x83\x78\x04\x00\x74\x2A\xE8\x2A\x2A\x2A\x2A\x8B\x48\x04\x8B\x01\x8B\x40\x2C\xFF\xD0\x84\xC0\x74\x2A\x56" } } } @@ -96,21 +96,45 @@ "engine" "tf2" } + "Offsets" + { + "ISteamGameServer__BeginAuthSession" + { + "linux" "26" + "linux64" "26" + "windows" "26" + "windows64" "26" + } + + "ISteamGameServer__EndAuthSession" + { + "linux" "27" + "linux64" "27" + "windows" "27" + "windows64" "27" + } + + "CheckMasterServerRequestRestart_Steam3ServerFuncOffset" + { + "windows" "240" + } + } + "Signatures" { "CBaseServer__ConnectClient" { "library" "engine" "linux" "@_ZN11CBaseServer13ConnectClientER8netadr_siiiiPKcS3_S3_i" - "mac" "@_ZN11CBaseServer13ConnectClientER8netadr_siiiiPKcS3_S3_i" - "windows" "\x55\x8B\xEC\x81\xEC\x24\x05\x00\x00" + "linux64" "@_ZN11CBaseServer13ConnectClientER8netadr_siiiiPKcS3_S3_i" + "windows" "\x55\x8B\xEC\x81\xEC\x24\x05\x00\x00\x53\x56\x57\x68\x2A\x2A\x2A\x2A" } "CBaseServer__RejectConnection" { "library" "engine" "linux" "@_ZN11CBaseServer16RejectConnectionERK8netadr_siPKc" - "mac" "@_ZN11CBaseServer16RejectConnectionERK8netadr_siPKc" + "linux64" "@_ZN11CBaseServer16RejectConnectionERK8netadr_siPKc" "windows" "\x55\x8B\xEC\x81\xEC\x04\x05\x00\x00\x57" } @@ -118,16 +142,14 @@ { "library" "engine" "linux" "@_ZN11CBaseClient10SetSteamIDERK8CSteamID" - "mac" "@_ZN11CBaseClient10SetSteamIDERK8CSteamID" - "windows" "\x55\x8B\xEC\x56\x57\x8B\x7D\x08\x8B\xF1\x8D\x4E\x04" + "linux64" "@_ZN11CBaseClient10SetSteamIDERK8CSteamID" + "windows" "\x55\x8B\xEC\x56\x8B\xF1\x57\x8B\x7D\x08\x8D\x4E\x04" } - "CBaseServer__CheckChallengeType" + "CBaseServer__CheckMasterServerRequestRestart" { "library" "engine" - "linux" "@_ZN11CBaseServer18CheckChallengeTypeEP11CBaseClientiR8netadr_siPKcii" - "mac" "@_ZN11CBaseServer18CheckChallengeTypeEP11CBaseClientiR8netadr_siPKcii" - "windows" "\x55\x8B\xEC\x83\xEC\x14\x53\x8B\x5D\x14" + "windows" "\x55\x8B\xEC\x83\xEC\x1C\x53\x57\x33\xD2" } } } diff --git a/gamedata/conplex.games.txt b/gamedata/conplex.games.txt index 3e2613ee..21bfdd8d 100755 --- a/gamedata/conplex.games.txt +++ b/gamedata/conplex.games.txt @@ -45,19 +45,19 @@ "ProcessAccept" { "library" "engine" - "windows" "\x55\x8B\xEC\x83\xEC\x24\x53\x57\x8D\x45\xF8\xC7\x45\xF8\x10\x00\x00\x00\x50" + "windows" "\x55\x8B\xEC\x83\xEC\x24\x53\x8B\xD9\x8B\x43\x18" } "RunFrame" { "library" "engine" - "windows" "\x55\x8B\xEC\xB8\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\x53\x8B\xD9\x56\x57" + "windows" "\x55\x8B\xEC\xB8\x60\x10\x00\x00" } "HandleFailedRconAuth" { "library" "engine" - "windows" "\x55\x8B\xEC\x83\xEC\x18\xA1\x2A\x2A\x2A\x2A\x8B\x15\x2A\x2A\x2A\x2A\x53\x56\x57" + "windows" "\x55\x8B\xEC\x83\xEC\x14\xF7\x05\x2A\x2A\x2A\x2A\x00\x10\x00\x00" } } } diff --git a/gamedata/sourcetvmanager.games.txt b/gamedata/sourcetvmanager.games.txt index 91a14bb4..201a765e 100755 --- a/gamedata/sourcetvmanager.games.txt +++ b/gamedata/sourcetvmanager.games.txt @@ -502,7 +502,7 @@ "library" "engine" "linux" "@host_client" // ping(CCommand const&) "Client ping times:\n" - "windows" "\x55\x8B\xEC\x51\x83\x3D\x2A\x2A\x2A\x2A\x01\x75\x2A" + "windows" "\x55\x8B\xEC\x51\x83\x3D\x2A\x2A\x2A\x2A\x2A\x75\x11\x6A\x01\xFF\x75\x08\xE8\x2A\x2A\x2A\x2A\x83\xC4\x08\x8B\xE5\x5D\xC3\x8B\x0D\x2A\x2A\x2A\x2A\x85" } "CHLTVServer::BroadcastEventLocal" @@ -510,7 +510,7 @@ "library" "engine" "linux" "@_ZN11CHLTVServer19BroadcastEventLocalEP10IGameEventb" // "SourceTV broadcast local event: %s\n" - "windows" "\x55\x8B\xEC\x81\xEC\x48\x04\x00\x00\x53\x8B\xD9\xC6\x45\xBC\x01\x56\x8D\x4D\xD0\xC7\x45\xC0\x00\x00\x00\x00\xC7\x45\xC4\x00\x00\x00\x00\xC7\x45\x2A\x2A\x2A\x2A\x2A\xE8" + "windows" "\x55\x8B\xEC\x8B\x0D\x2A\x2A\x2A\x2A\x81\xEC\x4C\x04\x00\x00\x85\xC9\x0F\x84\x9A\x01\x00\x00\x8B\x41\x08\x83\xC1\x08\x8B\x40\x58\xFF\xD0\x84\xC0\x0F\x84\x87\x01\x00\x00\x8B\x0D" } "CHLTVServer::BroadcastLocalChat" diff --git a/gamedata/stac.txt b/gamedata/stac.txt index 930151ce..c6ea451d 100755 --- a/gamedata/stac.txt +++ b/gamedata/stac.txt @@ -81,18 +81,17 @@ { /* "Packet from %s after processing time exceeded (%d bytes pkt), aborting" - sub_101A0200 proc near */ "CNetChan::ProcessPacket" { "library" "engine" "linux" "@_ZN8CNetChan13ProcessPacketEP11netpacket_sb" - "windows" "\x55\x8B\xEC\x83\xEC\x10\x53\x56\x57\x8B\x7D\x08\x8B\xD9\x83\x7F\x24\x00" + "windows" "\x55\x8B\xEC\x83\xEC\x08\x53\x56\x8B\x75\x08\x83\x7E\x24\x00" } /* "CBasePlayer::ChangeTeam( %d )" - 2 in vtable from that func - sub_102B44C0 ; int __thiscall sub_102B44C0(_DWORD *this, int, int, int, int, char) + int __thiscall sub_102E5310(_DWORD *this, int a2, int a3, int a4, int a5, char a6) */ "CBasePlayer::ProcessUsercmds" { @@ -173,7 +172,10 @@ "CBaseClient::GetPlayerSlot" { "linux" "15" - "windows" "14" // <-- annoying offset to get that i'm just trusting nosoop to be correct on (it doesn't crash) + // annoying offset to get that i'm just trusting nosoop to be correct on (it doesn't crash): + // "find SV_BroadcastVoiceData via string xref "Sending voice from: %s - playerslot: %d" + // virtual calls made prior to that (call dword ptr [eax+38h] on windows, buncha machinery comparing to _ZThn4_NK11CBaseClient13GetPlayerSlotEv on linux)" + "windows" "14" } "CNetChan::GetTimeSinceLastReceived" { diff --git a/plugins/stac.smx b/plugins/stac.smx deleted file mode 100755 index 326bf6c4..00000000 Binary files a/plugins/stac.smx and /dev/null differ diff --git a/scripting/stac.sp b/scripting/stac.sp index 27cd43bb..ff071c30 100755 --- a/scripting/stac.sp +++ b/scripting/stac.sp @@ -279,12 +279,6 @@ void StopIncompatPlugins() SetFailState("[StAC] Refusing to load with malicious plugins."); return; } - else if (StrContains(plName, "SMAC", false) != -1) /* SMAC */ - { - delete plugini; - SetFailState("[StAC] Refusing to load with SMAC. SMAC is outdated and is actively harmful to server performance as well as StAC's operation. Uninstall SMAC and try again."); - return; - } else if ( StrContains(plName, "Backtrack Patch", false) != -1 /* JTanz backtrack fix */ @@ -303,6 +297,13 @@ void StopIncompatPlugins() } delete plugini; + if + ( + LibraryExists("smac") + && GetFeatureStatus(FeatureType_Capability, "SMAC_Ban")) + { + SetFailState("[StAC] Refusing to load with SMAC. SMAC is outdated and is actively harmful to server performance as well as StAC's operation. Uninstall SMAC and try again."); + } } diff --git a/scripting/stac/stac_cvar_checks.sp b/scripting/stac/stac_cvar_checks.sp index 7c5f0e56..25c40eb2 100755 --- a/scripting/stac/stac_cvar_checks.sp +++ b/scripting/stac/stac_cvar_checks.sp @@ -30,8 +30,6 @@ char miscVars[][] = "r_portalsopenall", // must be == 1.0 "host_timescale", - // if this is >= 8 just kick them, cathook uses this to "spoof" windows - "windows_speaker_config" // sv_force_transmit_ents ? // sv_suppress_viewpunch ? // tf_showspeed ? @@ -61,6 +59,8 @@ char cheatVars[][] = // "hook" // fware "crash", + // cathook uses this to "spoof" windows + "windows_speaker_config", }; @@ -273,35 +273,20 @@ public void ConVarCheck(QueryCookie cookie, int cl, ConVarQueryResult result, co } } - // chook does this. we cant ban since technically legit clients can set this, but we can kick em out - else if (StrEqual(cvarName, "windows_speaker_config")) - { - if (StringToInt(cvarValue) >= 8) - { - char fmtmsg[512]; - Format - ( - fmtmsg, - sizeof(fmtmsg), - "Client %N has a value of \"%i\" for cvar \"%s\", which is out of bounds. Legit clients can set this, but most of the time, this is a bot. Kicked from server.", - cl, StringToInt(cvarValue), cvarName - ); - StacNotify - ( - userid, - fmtmsg - ); - if (stac_ban_for_misccheats.BoolValue) - { - KickClient(cl, "#GameUI_ServerInsecure"); - } - } - } - /* cheat program only cvars */ - if (result != ConVarQuery_NotFound && IsCheatOnlyVar(cvarName)) + + if + ( + ( + result == ConVarQuery_Okay + || result == ConVarQuery_NotValid + || result == ConVarQuery_Protected + ) + && + IsCheatOnlyVar(cvarName) + ) { illegalVarsNotify(userid, cvarName); if (stac_ban_for_misccheats.BoolValue) @@ -310,7 +295,7 @@ public void ConVarCheck(QueryCookie cookie, int cl, ConVarQueryResult result, co } } // log something about cvar errors - else if (result != ConVarQuery_Okay && !IsCheatOnlyVar(cvarName) && !StrEqual(cvarName, "windows_speaker_config")) + else if (result != ConVarQuery_Okay && !IsCheatOnlyVar(cvarName)) { char fmtmsg[512]; Format diff --git a/updatefile.txt b/updatefile.txt index 6c122b98..4339c472 100755 --- a/updatefile.txt +++ b/updatefile.txt @@ -4,11 +4,11 @@ { "Version" { - "Latest" "6.1.4" + "Latest" "6.1.6" } - "Notes" "Changes in 6.1.4" - "Notes" "- https://github.com/sapphonie/StAC-tf2/releases/tag/v6.1.4" + "Notes" "Changes in 6.1.6" + "Notes" "- https://github.com/sapphonie/StAC-tf2/releases/tag/v6.1.6" "Notes" "===== StAC is always looking for feedback! Got an issue, request, or wanna discuss? Open a GitHub issue and join the Discord server linked in the README, on GitHub! =====" "Notes" "===== Thank you for using StAC. -sappho ===== " } @@ -24,8 +24,12 @@ // Extensions "Plugin" "Path_SM/extensions/SteamWorks.ext.dll" "Plugin" "Path_SM/extensions/SteamWorks.ext.so" - "Plugin" "Path_SM/extensions/connect.ext.2.ep2v.dll" - "Plugin" "Path_SM/extensions/connect.ext.2.ep2v.so" + + "Plugin" "Path_SM/extensions/connect.ext.2.tf2.dll" + "Plugin" "Path_SM/extensions/connect.ext.2.tf2.so" + "Plugin" "Path_SM/extensions/x64/connect.ext.2.tf2.dll" + "Plugin" "Path_SM/extensions/x64/connect.ext.2.tf2.so" + "Plugin" "Path_SM/extensions/conplex.ext.dll" "Plugin" "Path_SM/extensions/conplex.ext.so" "Plugin" "Path_SM/extensions/sourcetvmanager.ext.2.tf2.dll" @@ -39,7 +43,4 @@ "Plugin" "Path_SM/gamedata/sourcetvmanager.games.txt" "Plugin" "Path_SM/gamedata/stac.txt" } -} - - - +} \ No newline at end of file