Skip to content

Commit

Permalink
Fixed SMSG_AUTH_CHALLENGE, CMSG_AUTH_CONTINUED_SESSION, CMSG_AUTH_SES…
Browse files Browse the repository at this point in the history
…SION structure for 11.0
  • Loading branch information
Eliminationzx committed Jan 11, 2025
1 parent d530502 commit 759f926
Showing 1 changed file with 52 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
using System.Text;
using WowPacketParser.Enums;
using WowPacketParser.Misc;
using WowPacketParser.Parsing;

namespace WowPacketParserModule.V10_0_0_46181.Parsers
{
public static class AuthenticationHandler
{
[Parser(Opcode.SMSG_AUTH_CHALLENGE)]
public static void HandleServerAuthChallenge(Packet packet)
{
for (uint i = 0; i < 8; ++i)
packet.ReadUInt32("DosChallenge", i);
if (ClientVersion.RemovedInVersion(ClientVersionBuild.V10_0_7_48676))
packet.ReadBytes("Challenge", 16);
if (ClientVersion.AddedInVersion(ClientVersionBuild.V10_0_7_48676))
packet.ReadBytes("Challenge", 32);
packet.ReadByte("DosZeroBits");
}

[Parser(Opcode.CMSG_AUTH_CONTINUED_SESSION)]
public static void HandleRedirectAuthProof(Packet packet)
{
packet.ReadInt64("DosResponse");
packet.ReadInt64("Key");
if (ClientVersion.RemovedInVersion(ClientVersionBuild.V10_0_7_48676))
packet.ReadBytes("LocalChallenge", 16);
if (ClientVersion.AddedInVersion(ClientVersionBuild.V10_0_7_48676))
packet.ReadBytes("LocalChallenge", 32);
packet.ReadBytes("Digest", 24);
}

[Parser(Opcode.CMSG_AUTH_SESSION)]
public static void HandleAuthSession(Packet packet)
{
packet.ReadUInt64("DosResponse");
packet.ReadUInt32("RegionID");
packet.ReadUInt32("BattlegroupID");
packet.ReadUInt32("RealmID");
if (ClientVersion.RemovedInVersion(ClientVersionBuild.V10_0_7_48676))
packet.ReadBytes("LocalChallenge", 16);
if (ClientVersion.AddedInVersion(ClientVersionBuild.V10_0_7_48676))
packet.ReadBytes("LocalChallenge", 32);
packet.ReadBytes("Digest", 24);
packet.ReadBit("UseIPv6");

var realmJoinTicketSize = packet.ReadInt32();
packet.ReadBytes("RealmJoinTicket", realmJoinTicketSize);
}
}
}

0 comments on commit 759f926

Please sign in to comment.