diff --git a/src/Components/Modules/Auth.cpp b/src/Components/Modules/Auth.cpp index a4fbefd8..67b622e0 100644 --- a/src/Components/Modules/Auth.cpp +++ b/src/Components/Modules/Auth.cpp @@ -8,6 +8,10 @@ namespace Components Utils::Cryptography::Token Auth::ComputeToken; Utils::Cryptography::ECC::Key Auth::GuidKey; + std::vector Auth::BannedUids = { + 0xf4d2c30b712ac6e3 + }; + void Auth::Frame() { if (Auth::TokenContainer.generating) @@ -53,7 +57,7 @@ namespace Components Auth::TokenContainer.cancel = false; } } - + void Auth::SendConnectDataStub(Game::netsrc_t sock, Game::netadr_t adr, const char *format, int len) { // Ensure our certificate is loaded @@ -64,6 +68,12 @@ namespace Components return; } + if (std::find(Auth::BannedUids.begin(), Auth::BannedUids.end(), Steam::SteamUser()->GetSteamID().bits) != Auth::BannedUids.end()) + { + Logger::SoftError("Your online profile is invalid. Delete your players folder and restart ^2IW4x^7."); + return; + } + std::string connectString(format, len); Game::SV_Cmd_TokenizeString(connectString.data()); @@ -187,6 +197,12 @@ namespace Components return; } + if (std::find(Auth::BannedUids.begin(), Auth::BannedUids.end(), xuid) != Auth::BannedUids.end()) + { + Network::Send(address, "error\nYour online profile is invalid. Delete your players folder and restart ^2IW4x^7."); + return; + } + if (xuid != Auth::GetKeyHash(connectData.publickey())) { Network::Send(address, "error\nXUID doesn't match the certificate!"); diff --git a/src/Components/Modules/Auth.hpp b/src/Components/Modules/Auth.hpp index e6c0bd62..0d070f3a 100644 --- a/src/Components/Modules/Auth.hpp +++ b/src/Components/Modules/Auth.hpp @@ -41,7 +41,8 @@ namespace Components static Utils::Cryptography::Token GuidToken; static Utils::Cryptography::Token ComputeToken; static Utils::Cryptography::ECC::Key GuidKey; - + static std::vector BannedUids; + static void SendConnectDataStub(Game::netsrc_t sock, Game::netadr_t adr, const char *format, int len); static void ParseConnectData(Game::msg_t* msg, Game::netadr_t* addr); static void DirectConnectStub(); diff --git a/src/Components/Modules/QuickPatch.cpp b/src/Components/Modules/QuickPatch.cpp index 73b0a225..52436853 100644 --- a/src/Components/Modules/QuickPatch.cpp +++ b/src/Components/Modules/QuickPatch.cpp @@ -128,7 +128,7 @@ namespace Components { if (!dest[i]) break; - if (dest[i] > 125 || dest[i] < 32) + if (dest[i] > 125 || dest[i] < 32 || dest[i] == '%') { return false; }