AzerothCore 3.3.5a
OpenSource WoW Emulator
|
#include "Warden.h"
Public Member Functions | |
Warden () | |
virtual | ~Warden () |
virtual void | Init (WorldSession *session, SessionKey const &k)=0 |
virtual ClientWardenModule * | GetModuleForClient ()=0 |
virtual void | InitializeModule ()=0 |
virtual void | RequestHash ()=0 |
virtual void | HandleHashResult (ByteBuffer &buff)=0 |
virtual bool | IsCheckInProgress ()=0 |
virtual bool | IsInitialized () |
virtual void | ForceChecks ()=0 |
virtual void | RequestChecks ()=0 |
virtual void | HandleData (ByteBuffer &buff)=0 |
bool | ProcessLuaCheckResponse (std::string const &msg) |
void | SendModuleToClient () |
void | RequestModule () |
void | Update (uint32 const diff) |
void | DecryptData (uint8 *buffer, uint32 length) |
void | EncryptData (uint8 *buffer, uint32 length) |
void | ApplyPenalty (uint16 checkId, std::string const &reason) |
WardenPayloadMgr * | GetPayloadMgr () |
Static Public Member Functions | |
static bool | IsValidCheckSum (uint32 checksum, uint8 const *data, const uint16 length) |
static uint32 | BuildChecksum (uint8 const *data, uint32 length) |
Private Attributes | |
WorldSession * | _session |
WardenPayloadMgr | _payloadMgr |
uint8 | _inputKey [16] |
uint8 | _outputKey [16] |
uint8 | _seed [16] |
Acore::Crypto::ARC4 | _inputCrypto |
Acore::Crypto::ARC4 | _outputCrypto |
uint32 | _checkTimer |
uint32 | _clientResponseTimer |
bool | _dataSent |
ClientWardenModule * | _module |
bool | _initialized |
bool | _interrupted |
bool | _checkInProgress |
uint32 | _interruptCounter = 0 |
Friends | |
class | WardenWin |
class | WardenMac |
Warden::Warden | ( | ) |
References _inputKey, _outputKey, and _seed.
|
virtual |
References _initialized, _module, and ClientWardenModule::CompressedData.
void Warden::ApplyPenalty | ( | uint16 | checkId, |
std::string const & | reason | ||
) |
References _session, WardenCheck::Action, ASSERT, WardenCheck::Comment, CONFIG_WARDEN_CLIENT_BAN_DURATION, CONFIG_WARDEN_CLIENT_FAIL_ACTION, WorldSession::GetAccountId(), AccountMgr::GetName(), WorldSession::GetPlayer(), GetWardenActionStr(), WorldSession::KickPlayer(), LOG_INFO, sBan, Acore::StringFormat(), sWardenCheckMgr, sWorld, WARDEN_ACTION_BAN, WARDEN_ACTION_KICK, and WARDEN_ACTION_LOG.
Referenced by WardenWin::HandleData(), WardenMac::HandleHashResult(), WardenWin::HandleHashResult(), and ProcessLuaCheckResponse().
References keyData::bytes, and Acore::Impl::GenericHash< HashCreator, DigestLength >::GetDigestOf().
Referenced by WardenWin::InitializeModule(), and IsValidCheckSum().
References _inputCrypto, and Acore::Crypto::ARC4::UpdateData().
References _outputCrypto, and Acore::Crypto::ARC4::UpdateData().
Referenced by WardenWin::InitializeModule(), WardenMac::RequestChecks(), WardenWin::RequestChecks(), WardenMac::RequestHash(), WardenWin::RequestHash(), RequestModule(), and SendModuleToClient().
|
pure virtual |
Implemented in WardenWin.
|
pure virtual |
WardenPayloadMgr * Warden::GetPayloadMgr | ( | ) |
References _payloadMgr.
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
Implemented in WardenWin.
|
virtual |
References _initialized.
References BuildChecksum(), and LOG_DEBUG.
Referenced by WardenWin::HandleData().
bool Warden::ProcessLuaCheckResponse | ( | std::string const & | msg | ) |
References ApplyPenalty(), LUA_EVAL_CHECK, sWardenCheckMgr, and WardenCheck::Type.
|
pure virtual |
void Warden::RequestModule | ( | ) |
References _module, _session, ByteBuffer::append(), WardenModuleUse::Command, ClientWardenModule::CompressedSize, EncryptData(), EndianConvert(), ClientWardenModule::Id, ClientWardenModule::Key, LOG_DEBUG, WorldSession::SendPacket(), SMSG_WARDEN_DATA, and WARDEN_SMSG_MODULE_USE.
Referenced by WardenMac::Init(), and WardenWin::Init().
void Warden::SendModuleToClient | ( | ) |
References _module, _session, ByteBuffer::append(), WardenModuleTransfer::Command, ClientWardenModule::CompressedData, ClientWardenModule::CompressedSize, WardenModuleTransfer::Data, WardenModuleTransfer::DataSize, EncryptData(), LOG_DEBUG, WorldSession::SendPacket(), SMSG_WARDEN_DATA, and WARDEN_SMSG_MODULE_CACHE.
void Warden::Update | ( | uint32 const | diff | ) |
References _checkTimer, _clientResponseTimer, _dataSent, _initialized, _session, CONFIG_WARDEN_CLIENT_RESPONSE_DELAY, IN_MILLISECONDS, WorldSession::KickPlayer(), RequestChecks(), and sWorld.
|
friend |
|
friend |
|
private |
Referenced by WardenWin::HandleData(), WardenWin::IsCheckInProgress(), and WardenWin::RequestChecks().
|
private |
Referenced by WardenWin::HandleData(), and Update().
|
private |
Referenced by WardenMac::HandleData(), WardenWin::HandleData(), and Update().
|
private |
|
private |
Referenced by WardenMac::HandleHashResult(), WardenWin::HandleHashResult(), IsInitialized(), Update(), and ~Warden().
|
private |
Referenced by DecryptData(), WardenMac::HandleHashResult(), WardenWin::HandleHashResult(), WardenMac::Init(), and WardenWin::Init().
|
private |
|
private |
Referenced by WardenWin::ForceChecks(), and WardenWin::HandleData().
|
private |
Referenced by WardenWin::ForceChecks(), and WardenWin::HandleData().
|
private |
Referenced by WardenMac::Init(), WardenWin::Init(), RequestModule(), SendModuleToClient(), and ~Warden().
|
private |
Referenced by EncryptData(), WardenMac::HandleHashResult(), WardenWin::HandleHashResult(), WardenMac::Init(), and WardenWin::Init().
|
private |
Referenced by WardenMac::HandleHashResult(), WardenWin::HandleHashResult(), WardenMac::Init(), WardenWin::Init(), and Warden().
|
private |
Referenced by GetPayloadMgr(), WardenWin::HandleData(), and WardenWin::RequestChecks().
|
private |
Referenced by WardenMac::Init(), WardenWin::Init(), WardenMac::RequestHash(), WardenWin::RequestHash(), and Warden().
|
private |
Referenced by ApplyPenalty(), WardenMac::HandleData(), WardenWin::HandleData(), WardenMac::Init(), WardenWin::Init(), WardenWin::InitializeModule(), WardenMac::RequestChecks(), WardenWin::RequestChecks(), WardenMac::RequestHash(), WardenWin::RequestHash(), RequestModule(), SendModuleToClient(), and Update().