public override bool Read(IClient client, IncomingAuthenticationPacket packet) { var filePosition = packet.ReadInt64Field("File Position"); if (filePosition < 0) return InvalidValueRange(client, filePosition, 0, long.MaxValue); return true; }
public override bool Read(IClient client, IncomingAuthenticationPacket packet) { packet.ReadInt32Field("Survey Id"); packet.ReadBooleanField("Success"); var dataSize = packet.ReadInt16Field("Data Size"); packet.ReadBytesField("Survey Data", dataSize.Value); return true; }
public override bool Read(IClient client, IncomingAuthenticationPacket packet) { packet.ReadByteField("Protocol Version?"); // Always 8 var packetSize = packet.ReadInt16Field("Packet Size"); var clientType = packet.ReadFourCCField("Client Type"); var clientVersion = new Version( packet.ReadByteField("Major"), packet.ReadByteField("Minor"), packet.ReadByteField("Revision"), packet.ReadInt16Field("Build")); var processor = packet.ReadFourCCField("Processor"); var operatingSystem = packet.ReadFourCCField("Operating System"); var locale = packet.ReadFourCCField("Locale"); var timeZone = packet.ReadInt32Field("Time Zone"); var clientAddress = packet.ReadIPAddressField("Client Address", false); var accountName = packet.ReadP8StringField("Account Name"); var expectedSize = (short)(packet.Length - sizeof(byte) - sizeof(short)); if (packetSize != expectedSize) return InvalidValue(client, packetSize, expectedSize); var clientTypeEnum = GameUtility.GetClientTypeFromFourCC(clientType); if (clientTypeEnum == null) return InvalidValue(client, clientType); var processorEnum = GameUtility.GetProcessorFromFourCC(processor); if (processorEnum == null) return InvalidValue(client, processor); var operatingSystemEnum = GameUtility.GetPlatformFromFourCC(operatingSystem); if (operatingSystemEnum == null) return InvalidValue(client, operatingSystem); var localeEnum = GameUtility.GetClientLocaleFromFourCC(locale); if (localeEnum == null) return InvalidValue(client, locale); var expectedAddress = client.EndPoint.ToIPEndPoint().Address; if (clientAddress.Value.Equals(expectedAddress)) return InvalidValue(client, clientAddress, expectedAddress); GameType = (ClientType)clientTypeEnum; ClientVersion = clientVersion; Processor = (ProcessorArchitecture)processorEnum; OperatingSystem = (PlatformID)operatingSystemEnum; Locale = (ClientLocale)localeEnum; TimeZone = timeZone; AccountName = accountName; return true; }
public override bool Read(IClient client, IncomingAuthenticationPacket packet) { packet.ReadByteField("Unknown"); // Always 8 packet.ReadInt16Field("Packet Size"); packet.ReadFourCCField("Game Name"); packet.ReadByteField("Major"); packet.ReadByteField("Minor"); packet.ReadByteField("Revision"); packet.ReadInt16Field("Build"); packet.ReadFourCCField("Processor"); packet.ReadFourCCField("Operating System"); packet.ReadFourCCField("Locale"); packet.ReadInt32Field("Time Zone"); packet.ReadIPAddressField("Client Address", false); packet.ReadP8StringField("Account Name"); return true; }
public override bool Read(IClient client, IncomingAuthenticationPacket packet) { packet.ReadBigIntegerField("SRP A", WowAuthenticationParameters.KeySize); packet.ReadBigIntegerField("SRP Proof", 20); // SHA-1 hash of the PublicA and HMAC SHA-1 of the contents of WoW.exe and unicows.dll. HMAC seed is // the 16 bytes at the end of the challenge sent by the server. Currently fairly useless for us. packet.ReadBytesField("Client File SHA-1 Hash", 20); var keyCount = packet.ReadByteField("Key Count"); if (keyCount > 0) { for (var i = 0; i < keyCount; i++) { packet.ReadInt16Field("Key - Unknown 1"); packet.ReadInt32Field("Key - Unknown 2"); packet.ReadBytesField("Key - Unknown 3", 4); packet.ReadBytesField("Key - SHA-1 Hash", 20); // SHA-1(PublicA, PublicB, byte[20] unknown) } } var securityFlags = (ExtraSecurityFlags)packet.ReadByteField("Extra Security Flags").Value; if (securityFlags.HasFlag(ExtraSecurityFlags.Pin)) { packet.ReadBytesField("PIN Random", 16); packet.ReadBytesField("PIN SHA-1 Hash", 20); } if (securityFlags.HasFlag(ExtraSecurityFlags.Matrix)) { packet.ReadBytesField("Matrix HMAC SHA-1 Hash", 20); } if (securityFlags.HasFlag(ExtraSecurityFlags.Token)) { var tokenLength = packet.ReadByteField("Security Token Length"); packet.ReadBytesField("Security Token", tokenLength); } return true; }
public override bool Read(IClient client, IncomingAuthenticationPacket packet) { packet.ReadBigIntegerField("Reconnect Proof R1", 16); // MD5(AccountName, byte[16] random) packet.ReadBigIntegerField("Reconnect Proof R2", 20); // SHA-1(AccountName, R1, ReconnectProof, SessionKey) packet.ReadBigIntegerField("Reconnect Proof R3", 20); // SHA-1(R1, byte[16] zeros) var keyCount = packet.ReadByteField("Key Count"); if (keyCount > 0) { for (var i = 0; i < keyCount; i++) { packet.ReadInt16Field("Key - Unknown 1"); packet.ReadInt32Field("Key - Unknown 2"); packet.ReadBytesField("Key - Unknown 3", 4); packet.ReadBytesField("Key - SHA-1 Hash", 20); // SHA(PublicA, PublicB, byte[20] unknown) } } return true; }
public override bool Read(IClient client, IncomingAuthenticationPacket packet) { packet.ReadInt32Field("Unknown"); return true; }