public static void HandleCompressedUpdateObject(Packet packet)
 {
     using (var packet2 = packet.Inflate(packet.ReadInt32()))
     {
         HandleUpdateObject(packet2);
     }
 }
 public static void HandleCompressedGuildRoster(Packet packet)
 {
     using (var packet2 = packet.Inflate(packet.ReadInt32()))
     {
         HandleGuildRoster422(packet2);
     }
 }
        public static void HandleServerUpdateAccountData(Packet packet)
        {
            var guid = new byte[8];

            packet.ReadBitsE<AccountDataType>("Data Type", 3);

            packet.StartBitStream(guid, 5, 1, 3, 7, 0, 4, 2, 6);

            packet.ReadXORBytes(guid, 3, 1, 5);

            var decompCount = packet.ReadInt32();
            var compCount = packet.ReadInt32();

            var pkt = packet.Inflate(compCount, decompCount, false);
            var data = pkt.ReadWoWString(decompCount);
            pkt.ClosePacket(false);

            packet.AddValue("Account Data", data);

            packet.ReadXORBytes(guid, 7, 4, 0, 6, 2);

            packet.ReadTime("Login Time");

            packet.WriteGuid("GUID", guid);
        }
 public static void HandleCompressedGuildRoster(Packet packet)
 {
     using (var packet2 = packet.Inflate(packet.ReadInt32()))
     {
         if (ClientVersion.AddedInVersion(ClientVersionBuild.V4_2_2_14545))
             HandleGuildRoster422(packet2);
         else
             HandleGuildRoster406(packet2);
     }
 }
        public static void ReadUpdateAccountDataBlock(ref Packet packet)
        {
            packet.ReadEnum<AccountDataType>("Data Type", TypeCode.Int32);

            packet.ReadTime("Login Time");

            var decompCount = packet.ReadInt32();
            var pkt = packet.Inflate(decompCount, false);
            pkt.ReadWoWString("Account Data", decompCount);
            pkt.ClosePacket(false);
        }
        public static void HandleClientUpdateAccountData(Packet packet)
        {
            packet.ReadTime("Login Time");

            var decompCount = packet.ReadInt32();
            var compCount = packet.ReadInt32();
            var data = packet.Inflate(compCount, decompCount, false).ReadWoWString(decompCount);

            packet.WriteLine("Account Data {0}", data);
            packet.ReadEnum<AccountDataType>("Data Type", 3);
        }
        public static void HandleClientUpdateAccountData(Packet packet)
        {
            var decompCount = packet.ReadInt32();
            packet.ReadTime("Login Time");
            var compCount = packet.ReadInt32();

            var pkt = packet.Inflate(compCount, decompCount, false);
            var data = pkt.ReadWoWString(decompCount);
            pkt.ClosePacket();

            packet.ReadBitsE<AccountDataType>("Data Type", 3);
            packet.AddValue("Account Data", data);
        }
        public static void HandleServerUpdateAccountData(Packet packet)
        {
            packet.ReadPackedGuid128("Guid");
            packet.ReadTime("Time");

            var decompCount = packet.ReadInt32();
            packet.ResetBitReader();
            packet.ReadBitsE<AccountDataType>("Data Type", 3);
            var compCount = packet.ReadInt32();

            var pkt = packet.Inflate(compCount, decompCount, false);
            var data = pkt.ReadWoWString(decompCount);

            packet.AddValue("Account Data", data);
        }
        public static void ReadUpdateAccountDataBlock(ref Packet packet)
        {
            packet.ReadEnum<AccountDataType>("Data Type", TypeCode.Int32);

            packet.ReadTime("Login Time");

            var decompCount = packet.ReadInt32();
            packet = packet.Inflate(decompCount);

            var data = packet.ReadBytes(decompCount);
            packet.Writer.WriteLine("Account Data: ");

            foreach (var b in data)
                packet.Writer.Write((char)b);

            packet.Writer.WriteLine();
        }
        public static void HandleServerUpdateAccountData(Packet packet)
        {
            var guid = new byte[8];

            var decompCount = packet.ReadInt32();
            var compCount = packet.ReadInt32();

            var data = packet.Inflate(compCount, decompCount, false).ReadWoWString(decompCount);
            packet.WriteLine("Account Data {0}", data);

            packet.ReadTime("Login Time");
            guid[7] = packet.ReadBit();
            packet.ReadEnum<AccountDataType>("Data Type", 3);
            packet.StartBitStream(guid, 3, 6, 1, 5, 0, 4, 2);
            packet.ReadXORBytes(guid, 6, 7, 4, 1, 5, 0, 3, 2);

            packet.WriteGuid("GUID", guid);
        }
        public static void HandleCompressedMoves(Packet packet)
        {
            var pkt = packet.Inflate(packet.ReadInt32());
            packet.Writer.WriteLine("{"); // To be able to see what is inside this packet.
            packet.Writer.WriteLine();

            while (pkt.CanRead())
            {
                var size = pkt.ReadByte();
                var opc = pkt.ReadInt16();
                var data = pkt.ReadBytes(size - 2);

                var newPacket = new Packet(data, opc, pkt.Time, pkt.Direction, pkt.Number, packet.Writer);
                Statistics.Total += 1;
                Handler.Parse(newPacket);
            }

            packet.Writer.WriteLine("}");
            packet.ReadToEnd();
        }
        public static void HandleGMTicketCreate(Packet packet)
        {
            packet.ReadEntryWithName<Int32>(StoreNameType.Map, "Map ID");
            packet.ReadVector3("Position");
            packet.ReadCString("Text");
            packet.ReadUInt32("Need Response");
            packet.ReadBoolean("Need GM interaction");
            var count = packet.ReadInt32("Count");

            for (int i = 0; i < count; i++)
                packet.WriteLine("[" + i + "] Sent: " + (packet.Time - packet.ReadTime()).ToFormattedString());

            if (count == 0)
                packet.ReadInt32("Unk Int32");
            else
            {
                var decompCount = packet.ReadInt32();
                packet = packet.Inflate(decompCount);
                packet.WriteLine(packet.ReadCString());
            }
        }
        public static void HandleCompressedMoves(Packet packet)
        {
            var pkt = packet.Inflate(packet.ReadInt32());
            packet.Writer.WriteLine("{"); // To be able to see what is inside this packet.
            packet.Writer.WriteLine();

            while (pkt.CanRead())
            {
                var size = pkt.ReadByte();
                pkt.GetLength();
                var opc = pkt.ReadInt16();

                size -= 2; // TODO: Should not be needed! Is here because size is by some reason always 2 bits too high
                byte[] input = pkt.ReadBytes(size);
                var newPacket = new Packet(input, opc, pkt.Time, pkt.Direction, pkt.Number, packet.Writer);
                Statistics.Total += 1;
                Handler.Parse(newPacket);
            }

            packet.Writer.WriteLine("}");
            packet.ReadToEnd();
        }
        public static void HandleCompressedMoves(Packet packet)
        {
            packet.WriteLine("{"); // To be able to see what is inside this packet.
            packet.WriteLine();

            using (var pkt = packet.Inflate(packet.ReadInt32()))
            {
                while (pkt.CanRead())
                {
                    var size = pkt.ReadByte();
                    var opc = pkt.ReadInt16();
                    var data = pkt.ReadBytes(size - 2);

                    using (var newPacket = new Packet(data, opc, pkt.Time, pkt.Direction, pkt.Number, packet.Writer, packet.SniffFileInfo))
                    {
                        Handler.Parse(newPacket, true);
                    }
                }
            }

            packet.WriteLine("}");
            packet.ReadToEnd();
        }
Beispiel #15
0
        public static void ReadClientAddonsList(ref Packet packet)
        {
            var decompCount = packet.ReadInt32();
            packet = packet.Inflate(decompCount);

            if (ClientVersion.AddedInVersion(ClientVersionBuild.V3_0_8_9464))
            {
                var count = packet.ReadInt32("Addons Count");
                _addonCount = count;

                for (var i = 0; i < count; i++)
                {
                    packet.ReadCString("Name", i);
                    packet.ReadBoolean("Enabled", i);
                    packet.ReadInt32("CRC", i);
                    packet.ReadInt32("Unk Int32", i);
                }

                packet.ReadTime("Time");
            }
            else
            {
                int count = 0;

                while (packet.GetPosition() != packet.GetLength())
                {
                    packet.ReadCString("Name");
                    packet.ReadBoolean("Enabled");
                    packet.ReadInt32("CRC");
                    packet.ReadInt32("Unk Int32");

                    count++;
                }

                _addonCount = count;
            }
        }
 public static void HandleCompressedMultiplePackets(Packet packet)
 {
     using (var packet2 = packet.Inflate(packet.ReadInt32()))
         HandleMultiplePackets(packet2);
 }
 public static void HandleGenericCompressed(Packet packet)
 {
     using (var newpkt = packet.Inflate(packet.ReadInt32()))
         newpkt.AsHex();
 }
 public static void HandleCompressedCharEnum(Packet packet)
 {
     using (var packet2 = packet.Inflate(packet.ReadInt32()))
     {
         if (ClientVersion.AddedInVersion(ClientVersionBuild.V4_3_4_15595))
             HandleCharEnum434(packet2);
         else if (ClientVersion.AddedInVersion(ClientVersionBuild.V4_3_3_15354))
             HandleCharEnum433(packet2);
         else if (ClientVersion.AddedInVersion(ClientVersionBuild.V4_3_0_15005))
             HandleCharEnum430(packet2);
         else
             HandleCharEnum422(packet2);
     }
 }
 public static void HandleCompressedAllAchievementData(Packet packet)
 {
     using (var packet2 = packet.Inflate(packet.ReadInt32()))
         if (ClientVersion.AddedInVersion(ClientVersionBuild.V4_3_4_15595))
             HandleAllAchievementData434(packet2);
         else if (ClientVersion.AddedInVersion(ClientVersionBuild.V4_2_2_14545))
             HandleAllAchievementData422(packet2);
         else if (ClientVersion.AddedInVersion(ClientVersionBuild.V4_0_6a_13623))
             HandleAllAchievementData406(packet2);
         else
             HandleAllAchievementData(packet2);
 }
        public static void ReadClientAddonsList(Packet packet)
        {
            var decompCount = packet.ReadInt32();
            if (decompCount == 0)
                return;

            var newPacket = packet.Inflate(decompCount, false);

            if (ClientVersion.AddedInVersion(ClientVersionBuild.V3_0_8_9464))
            {
                var count = newPacket.ReadInt32("Addons Count");
                _addonCount = count;

                for (var i = 0; i < count; i++)
                {
                    newPacket.ReadCString("Name", i);
                    newPacket.ReadBool("Uses public key", i);
                    newPacket.ReadInt32("Public key CRC", i);
                    newPacket.ReadInt32("URL file CRC", i);
                }

                newPacket.ReadTime("Time");
            }
            else
            {
                int count = 0;

                while (newPacket.Position != newPacket.Length)
                {
                    newPacket.ReadCString("Name");
                    newPacket.ReadBool("Enabled");
                    newPacket.ReadInt32("CRC");
                    newPacket.ReadInt32("Unk Int32");

                    count++;
                }

                _addonCount = count;
            }

            newPacket.ClosePacket(false);
        }
 public static void HandleCompressedMultiplePackets(Packet packet)
 {
     HandleMultiplePackets(packet.Inflate(packet.ReadInt32()));
 }
        public static void HandleGMTicketCreate(Packet packet)
        {
            packet.ReadInt32<MapId>("Map ID");
            packet.ReadVector3("Position");
            packet.ReadCString("Text");
            packet.ReadUInt32("Need Response");
            packet.ReadBool("Need GM interaction");
            var count = packet.ReadInt32("Count");

            for (int i = 0; i < count; i++)
                packet.AddValue("Sent", (packet.Time - packet.ReadTime()).ToFormattedString(), i);

            if (count == 0)
                packet.ReadInt32("Unk Int32");
            else
            {
                var decompCount = packet.ReadInt32();
                var pkt = packet.Inflate(decompCount);
                pkt.ReadCString("String");
                pkt.ClosePacket(false);
            }
        }
        public static void HandleGMTicketCreate(Packet packet)
        {
            packet.ReadInt32<MapId>("Map");
            packet.ReadVector3("Pos");
            packet.ReadByte("Flags");

            var descriptionLength = packet.ReadBits("DescriptionLength", 11);
            packet.ResetBitReader();
            packet.ReadWoWString("Description", descriptionLength);

            packet.ReadBit("NeedResponse");
            packet.ReadBit("NeedMoreHelp");
            packet.ResetBitReader();

            var dataLength = packet.ReadInt32("DataLength");

            if (dataLength > 0)
            {
                var textCount = packet.ReadByte("TextCount");

                for (int i = 0; i < textCount /* 60 */; ++i)
                    packet.AddValue("Sent", (packet.Time - packet.ReadTime()).ToFormattedString(), i);

                var decompCount = packet.ReadInt32();
                var pkt = packet.Inflate(decompCount);
                pkt.ReadCString("Text");
                pkt.ClosePacket(false);
            }
        }
 public static void Handle44964(Packet packet)
 {
     using (var pkt = packet.Inflate(packet.ReadInt32()))
         pkt.AsHex();
 }
 public static void HandleCompressedCharEnum(Packet packet)
 {
     if (ClientVersion.AddedInVersion(ClientVersionBuild.V4_3_0_15005))
         HandleCharEnum430(packet.Inflate(packet.ReadInt32()));
     else
         HandleCharEnum422(packet.Inflate(packet.ReadInt32()));
 }
 public static void HandleCompressedCharEnum(Packet packet)
 {
     using (var packet2 = packet.Inflate(packet.ReadInt32()))
     {
         switch (ClientVersion.Build)
         {
             case ClientVersionBuild.V4_3_4_15595:
                 HandleCharEnum434(packet2);
                 break;
             case ClientVersionBuild.V4_3_3_15354:
                 HandleCharEnum433(packet2);
                 break;
             case ClientVersionBuild.V4_3_0_15005:
                 HandleCharEnum430(packet2);
                 break;
             case ClientVersionBuild.V4_2_2_14545:
                 HandleCharEnum422(packet2);
                 break;
             default:
                 throw new NotImplementedException();
         }
     }
 }
Beispiel #27
0
 public static void Handle26948(Packet packet)
 {
     //packet.AsHex();
     using (var uncompressed = packet.Inflate(packet.ReadInt32()))
         uncompressed.AsHex();
 }
 public static void HandleCompressedAllAchievementData(Packet packet)
 {
     using (var packet2 = packet.Inflate(packet.ReadInt32()))
         HandleAllAchievementData422(packet2);
 }
 public static void HandleCompressedCharEnum(Packet packet)
 {
     HandleCharEnum422(packet.Inflate(packet.ReadInt32()));
 }