Commit graph

28 commits

Author SHA1 Message Date
Kelsi
c6256b1631 Fix movement/warden packet noise and party kill opcode mapping 2026-02-20 02:19:17 -08:00
Kelsi
7f9439d774 Reset realm and character lists when switching servers
Add reset() to RealmScreen and CharacterScreen to clear stale selection
state. Clear auth handler realm list on reconnect. Reset both screens
when going back to login or back to realm selection, so switching
servers shows fresh data instead of stale lists from the previous
connection.
2026-02-14 19:24:31 -08:00
Kelsi
430c2bdcfa Vanilla/Turtle WoW support: M2 loading, bone parsing, textures, auth
- Vanilla M2 bone struct (108 bytes) with 28-byte animation tracks
- Version-aware bone parsing (vanilla vs WotLK format detection)
- Fix CharSections.dbc field layout for vanilla (variation/color at 4-5)
- Remove broken CharSections.csv files (all fields marked as strings)
- Expansion data reload on profile switch (DBC cache clear, layout reload)
- Vanilla packet encryption (VanillaCrypt XOR-based header crypt)
- Extended character preview geoset range (0-99) for vanilla models
- DBC cache clear support in AssetManager
2026-02-13 16:53:28 -08:00
Kelsi
bb7d1d7d85 Auth: de-spam realm list requests in UI-driven flow 2026-02-13 01:54:15 -08:00
Kelsi
492703be36 Auth: include CRC in legacy proof; extend Turtle integrity set 2026-02-13 01:41:59 -08:00
Kelsi
5435796a98 Add integrity hash support and SRP tuning options 2026-02-13 01:32:15 -08:00
Kelsi
b3001a4b5b Fail fast when auth TCP disconnects during authentication 2026-02-13 01:14:33 -08:00
Kelsi
280c6ffa1d Use legacy LOGON_PROOF format for auth protocol < 8 2026-02-13 01:10:02 -08:00
Kelsi
6a44f02e0c Add authenticator opcode support + auth_probe tool 2026-02-13 00:55:36 -08:00
Kelsi
fd468ce793 Allow per-expansion login header fields + fix challenge FourCC encoding 2026-02-13 00:48:56 -08:00
Kelsi
7e5fc0ed51 Restore legacy FourCC reversal in LOGON_CHALLENGE 2026-02-13 00:43:22 -08:00
Kelsi
fd0da4486d Fix PIN grid remap bitmask (support digits 8/9) 2026-02-13 00:41:02 -08:00
Kelsi
c46cc14446 Fix LOGON_CHALLENGE FourCC fields (no byte-reversal) 2026-02-13 00:38:37 -08:00
Kelsi
371315f5ad Fix expansion auth protocol versions + improve version mismatch errors 2026-02-13 00:36:46 -08:00
Kelsi
2082ef1422 Improve 2FA/PIN flow: prefill + clearer failure 2026-02-13 00:33:03 -08:00
Kelsi
62a49644a5 Support PIN-required auth servers 2026-02-13 00:22:01 -08:00
Kelsi
7092844b5e Add multi-expansion support with data-driven protocol layer
Replace hardcoded WotLK protocol constants with a data-driven architecture
supporting Classic 1.12.1, TBC 2.4.3, and WotLK 3.3.5a. Each expansion
has JSON profiles for opcodes, update fields, and DBC layouts, plus C++
polymorphic packet parsers for binary format differences (movement flags,
speed fields, transport data, spline format, char enum layout).

Key components:
- ExpansionRegistry: scans Data/expansions/*/expansion.json at startup
- OpcodeTable: logical enum <-> wire values loaded from JSON
- UpdateFieldTable: field indices loaded from JSON per expansion
- DBCLayout: schema-driven DBC field lookups replacing magic numbers
- PacketParsers: WotLK/TBC/Classic parsers with correct flag positions
- Multi-manifest AssetManager: layered manifests with priority ordering
- HDPackManager: overlay texture packs with expansion compatibility
- Auth screen expansion picker replacing hardcoded version dropdown
2026-02-12 22:56:36 -08:00
Kelsi
4b48fcdab2 Enhanced Warden implementation with comprehensive documentation
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
2026-02-12 02:22:04 -08:00
kelsi davis
545cfbbc0e Upgrade to C++20 and fix all compilation warnings
- Upgrade from C++17 to C++20
- Remove unused helper functions (selectSpawnPreset, parseVec3Csv, parseYawPitchCsv)
- Mark unused parameters with [[maybe_unused]] attribute
- Remove unused variables (nameColor, currentRace, steppingUp, steppingDown, awayFromWallMotion)
- Fix all -Wunused-* warnings

Build now completes with zero warnings.
2026-02-07 11:43:37 -08:00
Kelsi
669d89c108 Store password hash instead of plaintext for login persistence
Save SHA1(UPPER(user):UPPER(pass)) hash to login.cfg instead of the
plaintext password. On subsequent logins, use the stored hash directly
with a new authenticateWithHash() method that bypasses password hashing.
The password field shows a placeholder when using a stored hash.
2026-02-05 15:09:16 -08:00
Kelsi
eda70e9c6f Fix FourCC encoding and protocol version in LOGON_CHALLENGE
Game name uses big-endian (not reversed), platform/os/locale use
little-endian with chars reversed and null at end (not beginning).
Protocol version is 8 for WoW 3.3.5a, not 3.
2026-02-05 13:47:54 -08:00
Kelsi
61147a08af Fix LOGON_CHALLENGE security flags buffer corruption and improve auth diagnostics
Account for PIN/matrix/authenticator extra data in packet size
calculation to prevent receive buffer corruption. Add hex dump
of raw auth packets and show actual server error codes.
2026-02-05 13:26:24 -08:00
Kelsi
933b50eab5 Use natural BigNum sizes for SRP hash computations
TrinityCore/AzerothCore's UpdateBigNumbers uses BN_num_bytes (natural
size without padding) when hashing values for u and M1. Our code was
using fixed 32-byte padding which produces different hashes when any
value (salt, A, B, N) has leading zeros in big-endian representation.
2026-02-05 12:59:48 -08:00
Kelsi
430a213063 Fix SRP authentication producing wrong proofs
Two bugs that caused the server to always reject our login proof:
- N was hashed as 256 bytes (2048 bits) instead of 32 bytes (256 bits),
  producing completely wrong H(N)^H(g) and therefore wrong M1
- Session key computation B-k*g^x could go negative; OpenSSL's
  BN_mod_exp doesn't handle negative bases. Add k*N before subtracting
  (standard TrinityCore approach) to keep the value positive
2026-02-05 12:46:53 -08:00
Kelsi
5ef11fdc7d Fix auth protocol to match real WoW 3.3.5a client format
Three critical bugs fixed:
- LOGON_CHALLENGE request: set protocol byte to 0x03 (was 0x00) and
  reverse FourCC strings (game/platform/os/locale) to match real client
- Response parsers: remove double-read of opcode byte that shifted all
  field reads by one, preventing successful auth with real servers
- LOGON_PROOF response sizes: success=32 bytes, failure=4 bytes to match
  TrinityCore/AzerothCore format

Also adds missing auth result codes (0x13-0x20, 0xFF) including
IGR_WITHOUT_BNET (0x17) which Warmane was returning.
2026-02-05 12:39:34 -08:00
Kelsi
1b414d24d8 Show hex error code for unrecognized auth server responses 2026-02-05 12:28:43 -08:00
Kelsi
a52e28191e Improve auth error feedback with specific failure reasons, version mismatch details, and connection timeout 2026-02-05 12:17:09 -08:00
Kelsi
ce6cb8f38e Initial commit: wowee native WoW 3.3.5a client 2026-02-02 13:03:22 -08:00