mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-24 00:00:13 +00:00
Added MD5 hashing and extensive testing documentation for future attempts at supporting strict Warden servers like Warmane. Enhancements: - Added MD5 hash support to Crypto class (OpenSSL-based) - Tested 6 different module ACK response formats against Warmane - Analyzed module packet structure (37 bytes: opcode + seed + trailing) - Enhanced debug logging for plaintext and encrypted Warden data Documentation: - WARDEN_IMPLEMENTATION.md: Complete implementation guide with all attempts - WARDEN_QUICK_REFERENCE.md: Quick troubleshooting and testing guide Test Results (Warmane): - Empty ACK (0 bytes): Server silent - XOR/MD5 checksum (18 bytes): Server silent - Single byte (1 byte): Server disconnects (rejected) - Echo trailing (20 bytes): Server silent - Result + SHA1 (21 bytes): Server silent Conclusion: - Current implementation works with permissive/disabled Warden servers - Warmane requires module execution or undocumented response format - Full documentation provided for future reverse engineering attempts Next steps documented: 1. Capture packets from real WoW client (protocol analysis) 2. Implement module execution engine (months of work) 3. Test with local AzerothCore server
45 lines
1.2 KiB
C++
45 lines
1.2 KiB
C++
#include "auth/crypto.hpp"
|
|
#include <openssl/sha.h>
|
|
#include <openssl/md5.h>
|
|
#include <openssl/hmac.h>
|
|
|
|
namespace wowee {
|
|
namespace auth {
|
|
|
|
std::vector<uint8_t> Crypto::sha1(const std::vector<uint8_t>& data) {
|
|
std::vector<uint8_t> hash(SHA_DIGEST_LENGTH);
|
|
SHA1(data.data(), data.size(), hash.data());
|
|
return hash;
|
|
}
|
|
|
|
std::vector<uint8_t> Crypto::sha1(const std::string& data) {
|
|
std::vector<uint8_t> bytes(data.begin(), data.end());
|
|
return sha1(bytes);
|
|
}
|
|
|
|
std::vector<uint8_t> Crypto::md5(const std::vector<uint8_t>& data) {
|
|
std::vector<uint8_t> hash(MD5_DIGEST_LENGTH);
|
|
MD5(data.data(), data.size(), hash.data());
|
|
return hash;
|
|
}
|
|
|
|
std::vector<uint8_t> Crypto::md5(const std::string& data) {
|
|
std::vector<uint8_t> bytes(data.begin(), data.end());
|
|
return md5(bytes);
|
|
}
|
|
|
|
std::vector<uint8_t> Crypto::hmacSHA1(const std::vector<uint8_t>& key,
|
|
const std::vector<uint8_t>& data) {
|
|
std::vector<uint8_t> hash(SHA_DIGEST_LENGTH);
|
|
unsigned int length = 0;
|
|
|
|
HMAC(EVP_sha1(),
|
|
key.data(), key.size(),
|
|
data.data(), data.size(),
|
|
hash.data(), &length);
|
|
|
|
return hash;
|
|
}
|
|
|
|
} // namespace auth
|
|
} // namespace wowee
|