![]() |
TrinityCore
|
#include <Warden.h>
Inheritance diagram for Warden:Public Member Functions | |
| Warden () | |
| virtual | ~Warden () |
| virtual void | Init (WorldSession *session, SessionKey const &K)=0 |
| void | Update (uint32 diff) |
| void | HandleData (ByteBuffer &buff) |
| bool | ProcessLuaCheckResponse (std::string const &msg) |
| virtual size_t | DEBUG_ForceSpecificChecks (std::vector< uint16 > const &checks)=0 |
Protected Member Functions | |
| void | DecryptData (uint8 *buffer, uint32 length) |
| void | EncryptData (uint8 *buffer, uint32 length) |
| virtual void | InitializeModule ()=0 |
| virtual void | RequestHash ()=0 |
| virtual void | HandleHashResult (ByteBuffer &buff)=0 |
| virtual void | HandleCheckResult (ByteBuffer &buff)=0 |
| virtual void | InitializeModuleForClient (ClientWardenModule &module)=0 |
| virtual void | RequestChecks ()=0 |
| void | MakeModuleForClient () |
| void | SendModuleToClient () |
| void | RequestModule () |
| char const * | ApplyPenalty (WardenCheck const *check) |
Static Protected Member Functions | |
| static bool | IsValidCheckSum (uint32 checksum, const uint8 *data, const uint16 length) |
| static uint32 | BuildChecksum (const uint8 *data, uint32 length) |
Protected Attributes | |
| WorldSession * | _session |
| std::array< uint8, 16 > | _inputKey = {} |
| std::array< uint8, 16 > | _outputKey = {} |
| std::array< uint8, 16 > | _seed = {} |
| Trinity::Crypto::ARC4 | _inputCrypto |
| Trinity::Crypto::ARC4 | _outputCrypto |
| uint32 | _checkTimer |
| uint32 | _clientResponseTimer |
| bool | _dataSent |
| Optional< ClientWardenModule > | _module |
| bool | _initialized |
| Warden::Warden | ( | ) |
Definition at line 32 of file Warden.cpp.
|
virtual |
Definition at line 37 of file Warden.cpp.
References _initialized.
|
protected |
Definition at line 174 of file Warden.cpp.
References _session, WardenCheck::Action, BAN_ACCOUNT, WardenCheck::CheckId, WardenCheck::Comment, CONFIG_WARDEN_CLIENT_BAN_DURATION, CONFIG_WARDEN_CLIENT_FAIL_ACTION, WorldSession::GetAccountId(), AccountMgr::GetName(), WorldSession::KickPlayer(), sWorld, EnumUtils::ToTitle(), WARDEN_ACTION_BAN, WARDEN_ACTION_KICK, and WARDEN_ACTION_LOG.
Referenced by WardenWin::HandleCheckResult(), WardenMac::HandleHashResult(), WardenWin::HandleHashResult(), and ProcessLuaCheckResponse().
Definition at line 163 of file Warden.cpp.
References keyData::bytes, Trinity::Impl::GenericHash< HashCreator, DigestLength >::GetDigestOf(), and keyData::ints.
Referenced by WardenWin::InitializeModule(), and IsValidCheckSum().
|
pure virtual |
Implemented in WardenMac, and WardenWin.
Referenced by debug_commandscript::HandleDebugWardenForce().
Definition at line 131 of file Warden.cpp.
References _inputCrypto, and Trinity::Crypto::ARC4::UpdateData().
Referenced by HandleData().
Definition at line 136 of file Warden.cpp.
References _outputCrypto, and Trinity::Crypto::ARC4::UpdateData().
Referenced by WardenWin::InitializeModule(), WardenMac::RequestChecks(), WardenWin::RequestChecks(), WardenMac::RequestHash(), WardenWin::RequestHash(), RequestModule(), and SendModuleToClient().
|
protectedpure virtual |
Implemented in WardenMac, and WardenWin.
Referenced by HandleData().
| void Warden::HandleData | ( | ByteBuffer & | buff | ) |
Definition at line 209 of file Warden.cpp.
References ByteBuffer::contents(), DecryptData(), HandleCheckResult(), HandleHashResult(), ByteBuffer::hexlike(), InitializeModule(), RequestHash(), SendModuleToClient(), ByteBuffer::size(), TC_LOG_DEBUG, TC_LOG_WARN, WARDEN_CMSG_CHEAT_CHECKS_RESULT, WARDEN_CMSG_HASH_RESULT, WARDEN_CMSG_MEM_CHECKS_RESULT, WARDEN_CMSG_MODULE_FAILED, WARDEN_CMSG_MODULE_MISSING, and WARDEN_CMSG_MODULE_OK.
|
protectedpure virtual |
Implemented in WardenMac, and WardenWin.
Referenced by HandleData().
|
pure virtual |
|
protectedpure virtual |
Implemented in WardenMac, and WardenWin.
Referenced by HandleData().
|
protectedpure virtual |
Implemented in WardenMac, and WardenWin.
Referenced by MakeModuleForClient().
|
staticprotected |
Definition at line 141 of file Warden.cpp.
References BuildChecksum(), and TC_LOG_DEBUG.
Referenced by WardenWin::HandleCheckResult().
|
protected |
Definition at line 42 of file Warden.cpp.
References _module, Trinity::Impl::GenericHash< HashCreator, DigestLength >::GetDigestOf(), InitializeModuleForClient(), and TC_LOG_DEBUG.
Referenced by WardenMac::Init(), and WardenWin::Init().
| bool Warden::ProcessLuaCheckResponse | ( | std::string const & | msg | ) |
Definition at line 244 of file Warden.cpp.
References _session, ApplyPenalty(), WorldSession::GetPlayerInfo(), LUA_EVAL_CHECK, StringStartsWith(), sWardenCheckMgr, TC_LOG_WARN, EnumUtils::ToConstant(), and WardenCheck::Type.
|
protectedpure virtual |
|
protectedpure virtual |
Implemented in WardenMac, and WardenWin.
Referenced by HandleData().
|
protected |
Definition at line 78 of file Warden.cpp.
References _module, _session, ByteBuffer::append(), WardenModuleUse::Command, EncryptData(), EndianConvert(), WardenModuleUse::ModuleId, WardenModuleUse::ModuleKey, WorldSession::SendPacket(), WardenModuleUse::Size, SMSG_WARDEN_DATA, TC_LOG_DEBUG, and WARDEN_SMSG_MODULE_USE.
Referenced by WardenMac::Init(), and WardenWin::Init().
|
protected |
Definition at line 50 of file Warden.cpp.
References _module, _session, ByteBuffer::append(), WardenModuleTransfer::Command, WardenModuleTransfer::Data, WardenModuleTransfer::DataSize, EncryptData(), EndianConvert(), WorldSession::SendPacket(), SMSG_WARDEN_DATA, TC_LOG_DEBUG, and WARDEN_SMSG_MODULE_CACHE.
Referenced by HandleData().
| void Warden::Update | ( | uint32 | diff | ) |
Definition at line 100 of file Warden.cpp.
References _checkTimer, _clientResponseTimer, _dataSent, _initialized, _session, CONFIG_WARDEN_CLIENT_RESPONSE_DELAY, WorldSession::GetLatency(), WorldSession::GetPlayerInfo(), WorldSession::GetRemoteAddress(), IN_MILLISECONDS, WorldSession::KickPlayer(), RequestChecks(), secsToTimeString(), ShortText, sWorld, and TC_LOG_WARN.
|
protected |
Definition at line 125 of file Warden.h.
Referenced by WardenWin::HandleCheckResult(), and Update().
|
protected |
Definition at line 126 of file Warden.h.
Referenced by WardenMac::HandleCheckResult(), WardenWin::HandleCheckResult(), and Update().
|
protected |
Definition at line 127 of file Warden.h.
Referenced by WardenMac::HandleCheckResult(), WardenWin::HandleCheckResult(), WardenMac::RequestChecks(), WardenWin::RequestChecks(), and Update().
|
protected |
Definition at line 129 of file Warden.h.
Referenced by WardenMac::HandleHashResult(), WardenWin::HandleHashResult(), Update(), and ~Warden().
|
protected |
Definition at line 123 of file Warden.h.
Referenced by DecryptData(), WardenMac::HandleHashResult(), WardenWin::HandleHashResult(), WardenMac::Init(), and WardenWin::Init().
|
protected |
Definition at line 120 of file Warden.h.
Referenced by WardenMac::HandleHashResult(), WardenWin::HandleHashResult(), WardenMac::Init(), WardenWin::Init(), and WardenWin::RequestChecks().
|
protected |
Definition at line 128 of file Warden.h.
Referenced by WardenMac::Init(), WardenWin::Init(), MakeModuleForClient(), RequestModule(), and SendModuleToClient().
|
protected |
Definition at line 124 of file Warden.h.
Referenced by EncryptData(), WardenMac::HandleHashResult(), WardenWin::HandleHashResult(), WardenMac::Init(), and WardenWin::Init().
|
protected |
Definition at line 121 of file Warden.h.
Referenced by WardenMac::HandleHashResult(), WardenWin::HandleHashResult(), WardenMac::Init(), and WardenWin::Init().
|
protected |
Definition at line 122 of file Warden.h.
Referenced by WardenMac::Init(), WardenWin::Init(), WardenMac::RequestHash(), and WardenWin::RequestHash().
|
protected |
Definition at line 119 of file Warden.h.
Referenced by ApplyPenalty(), WardenMac::HandleCheckResult(), WardenWin::HandleCheckResult(), WardenMac::HandleHashResult(), WardenWin::HandleHashResult(), WardenMac::Init(), WardenWin::Init(), WardenWin::InitializeModule(), ProcessLuaCheckResponse(), WardenMac::RequestChecks(), WardenWin::RequestChecks(), WardenMac::RequestHash(), WardenWin::RequestHash(), RequestModule(), SendModuleToClient(), and Update().