52 _seed = { 0x4D, 0x80, 0x8D, 0x2C, 0x77, 0xD9, 0x05, 0xC4, 0x1A, 0x63, 0x80, 0xEC, 0x08, 0x58, 0x6A, 0xFE };
119 keyData mod_seed = { { { { 0x4D, 0x80, 0x8D, 0x2C, 0x77, 0xD9, 0x05, 0xC4, 0x1A, 0x63, 0x80, 0xEC, 0x08, 0x58, 0x6A, 0xFE } } } };
121 for (
int i = 0; i < 4; ++i)
123 keyIn[i] = mod_seed.
ints.ints[i];
128 keyOut[0] = keyIn[0];
129 keyIn[0] ^= 0xDEADBEEFu;
131 keyIn[1] -= 0x35014542u;
133 keyIn[2] += 0x5313F22u;
134 keyIn[3] *= 0x1337F00Du;
135 keyOut[1] = keyIn1 - 0x6A028A84;
136 keyOut[2] = keyIn2 + 0xA627E44;
137 keyOut[3] = 0x1337F00D * keyIn[3];
177 std::string str =
"Test string!";
179 buff <<
uint8(str.size());
180 buff.
append(str.c_str(), str.size());
216 std::string str =
"Test string!";
220 uint32 magic = 0xFEEDFACE;
224 std::array<uint8, Trinity::Crypto::SHA1::DIGEST_LENGTH> sha1Hash;
225 buff.
read(sha1Hash.data(), sha1Hash.size());
229 TC_LOG_DEBUG(
"warden",
"Handle data failed: SHA1 hash is wrong!");
234 std::array<uint8, 16> theirsMD5Hash;
235 buff.
read(theirsMD5Hash);
237 if (ourMD5Hash != theirsMD5Hash)
239 TC_LOG_DEBUG(
"warden",
"Handle data failed: MD5 hash is wrong!");
std::array< uint8, SESSION_KEY_LENGTH > SessionKey
#define TC_LOG_WARN(filterType__,...)
#define TC_LOG_DEBUG(filterType__,...)
std::string ByteArrayToHexStr(Container const &c, bool reverse=false)
std::array< uint8, 9318 > Module_0DBBF209A27B1E279A9FEC5C168A15F7_Data
@ WARDEN_SMSG_HASH_REQUEST
@ WARDEN_SMSG_CHEAT_CHECKS_REQUEST
void Generate(uint8 *buf, uint32 sz)
void Init(uint8 const *seed, size_t len)
std::array< uint8, DIGEST_LENGTH > Digest
void UpdateData(uint8 const *data, size_t len)
Digest const & GetDigest() const
static Digest GetDigestOf(uint8 const *data, size_t len)
void RequestChecks() override
void HandleCheckResult(ByteBuffer &buff) override
void InitializeModule() override
void HandleHashResult(ByteBuffer &buff) override
void InitializeModuleForClient(ClientWardenModule &module) override
void Init(WorldSession *session, SessionKey const &k) override
void RequestHash() override
char const * ApplyPenalty(WardenCheck const *check)
Optional< ClientWardenModule > _module
void EncryptData(uint8 *buffer, uint32 length)
uint32 _clientResponseTimer
void MakeModuleForClient()
Trinity::Crypto::ARC4 _outputCrypto
std::array< uint8, 16 > _inputKey
Trinity::Crypto::ARC4 _inputCrypto
std::array< uint8, 16 > _seed
std::array< uint8, 16 > _outputKey
Player session in the World.
std::string GetPlayerInfo() const
void KickPlayer(std::string const &reason)
Kick a player out of the World.
void SendPacket(WorldPacket const *packet, bool forced=false)
Send a packet to the client.
uint32 GetAccountId() const
boost::beast::http::request< RequestBody > Request
uint8 const * CompressedData
std::array< uint32, 5 > ints
std::array< uint8, 20 > bytes