mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 07:40:14 +00:00
Fix vanilla Warden check parsing and crypto reset
Vanilla PAGE_A/B checks are 24 bytes (no addr+len), PROC checks are 25 bytes (no second strIdx+offset), unlike WotLK's 29/30. Wrong sizes caused incomplete responses with bad checksums, silently blocking character creation on Turtle WoW.
This commit is contained in:
parent
5b08e47941
commit
1a44c85264
1 changed files with 14 additions and 6 deletions
|
|
@ -2363,9 +2363,11 @@ void GameHandler::handleWardenData(network::Packet& packet) {
|
|||
}
|
||||
case CT_PAGE_A:
|
||||
case CT_PAGE_B: {
|
||||
// Request: [4 seed][20 sha1][4 addr][1 length]
|
||||
if (pos + 29 > checkEnd) { pos = checkEnd; break; }
|
||||
pos += 29;
|
||||
// Vanilla: [4 seed][20 sha1] = 24 bytes
|
||||
// WotLK: [4 seed][20 sha1][4 addr][1 length] = 29 bytes
|
||||
int pageSize = (build <= 6005) ? 24 : 29;
|
||||
if (pos + pageSize > checkEnd) { pos = checkEnd; break; }
|
||||
pos += pageSize;
|
||||
// Response: [uint8 result=0] (page matches expected)
|
||||
resultData.push_back(0x00);
|
||||
break;
|
||||
|
|
@ -2413,9 +2415,11 @@ void GameHandler::handleWardenData(network::Packet& packet) {
|
|||
break;
|
||||
}
|
||||
case CT_PROC: {
|
||||
// Request: [4 seed][20 sha1][1 stringIdx][1 stringIdx2][4 offset]
|
||||
if (pos + 30 > checkEnd) { pos = checkEnd; break; }
|
||||
pos += 30;
|
||||
// Vanilla: [4 seed][20 sha1][1 stringIdx] = 25 bytes
|
||||
// WotLK: [4 seed][20 sha1][1 stringIdx][1 stringIdx2][4 offset] = 30 bytes
|
||||
int procSize = (build <= 6005) ? 25 : 30;
|
||||
if (pos + procSize > checkEnd) { pos = checkEnd; break; }
|
||||
pos += procSize;
|
||||
// Response: [uint8 result=1] (proc NOT found = clean)
|
||||
resultData.push_back(0x01);
|
||||
break;
|
||||
|
|
@ -2459,6 +2463,10 @@ void GameHandler::handleWardenData(network::Packet& packet) {
|
|||
break;
|
||||
}
|
||||
|
||||
case 0x03: // WARDEN_SMSG_MODULE_INITIALIZE
|
||||
LOG_INFO("Warden: MODULE_INITIALIZE (", decrypted.size(), " bytes, no response needed)");
|
||||
break;
|
||||
|
||||
default:
|
||||
LOG_INFO("Warden: Unknown opcode 0x", std::hex, (int)wardenOpcode, std::dec,
|
||||
" (state=", (int)wardenState_, ", size=", decrypted.size(), ")");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue