Commit graph

8 commits

Author SHA1 Message Date
Kelsi
9091cb0496 Drain auth socket reads to avoid dropping partial packets on close 2026-02-13 01:12:59 -08:00
Kelsi
dca8fcad31 Handle short vanilla LOGON_PROOF success responses 2026-02-13 01:03: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
45fc9996e2 Handle variable LOGON_PROOF failure response sizes
Some servers send 2 bytes for failure, others send 4. Consume up to 4
if available, otherwise accept the 2-byte minimum.
2026-02-05 12:50:05 -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
bc9c7f09b1 Fix non-blocking TCP connect for remote servers and persist login info between sessions 2026-02-05 12:25:00 -08:00
Kelsi
6bf3fa4ed4 Add Windows cross-platform support alongside Linux
Replace POSIX-specific socket and process APIs with portable
abstractions so the project builds on both Windows and Linux.

- Add include/network/net_platform.hpp: Winsock2/POSIX socket
  abstraction (socket types, non-blocking, error handling,
  WSAStartup lifecycle)
- Add include/platform/process.hpp: CreateProcess/fork+exec
  abstraction for spawning ffplay subprocesses
- Update network module (tcp_socket, world_socket) to use
  portable socket helpers instead of raw POSIX calls
- Update audio module (music_manager, footstep_manager,
  activity_sound_manager) to use portable process helpers
  instead of fork/exec/kill/waitpid
- Replace hardcoded /tmp/ paths with std::filesystem::temp_directory_path()
- Link ws2_32 and SDL2main on Windows in CMakeLists.txt
2026-02-03 22:25:41 -08:00
Kelsi
ce6cb8f38e Initial commit: wowee native WoW 3.3.5a client 2026-02-02 13:03:22 -08:00