Author | Message | Time |
---|---|---|
BrainScan | Does anyone have the D2GS Packet Length Tables that they are willing to share? Also, a question about huffman compression. Suppose a compression ends up in a length of bits that is not divisible by 8... (eg 12 bits) I assume that this must be padded at the end with 0's right? how does this affect the resulting packet when i's decompressed? | December 2, 2004, 9:25 PM |
UserLoser. | If you're doing any disassembly, check D2Net.dll around: .text:6FC01423 GetPacketSize .data:6FC08148 ReceivePacketSizeTable Edit: If someone sends me D2Net.dll [seems brother took d2 cds when he went away to school], I'll translate the tables nicely~ | December 2, 2004, 11:38 PM |
BrainScan | [quote author=UserLoser link=topic=9752.msg90841#msg90841 date=1102030682] If someone sends me D2Net.dll [seems brother took d2 cds when he went away to school], I'll translate the tables nicely~ [/quote] I would gladly send it to you. It would help me out a lot seeing as I'm not great at dissasembly quite yet. How should I send it to you? Thanks -BrainScan | December 3, 2004, 5:53 AM |
OnlyMeat | d2net.dll is actually surprisingly easy to decipher, just do a search in ida for the std berkley recv call and you can find all the major functions from there, well thats how i did it anyways you dont need to know asm that well to work out most of it just the basic op codes and how the stack works etc. You can lookup the more advanced op codes up as you go along, also writing a few basic c++ apps ( without any framework support) then decompiling/analysing the output gives you a good idea of compiler optimizations ( it's worth trying out different optimizations i.e speed vs size to see what the differences produce ). | December 3, 2004, 4:33 PM |
OnlyMeat | I found a script i did a while back to format them if this helps, userloser can confirm if they are right. Note the variable length packets are ommited. Formatted as a c++ table:- [code] unsigned char D2GS_PktSize_Table[] = { 0x01,0x08,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x0C,0x00,0x00, 0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00, 0x00,0x06,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x0B,0x00,0x00, 0x00,0x06,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x09,0x00,0x00, 0x00,0x0D,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x10,0x00,0x00, 0x00,0x10,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x1A,0x00,0x00, 0x00,0x0E,0x00,0x00,0x00,0x12,0x00,0x00,0x00,0x0B,0x00,0x00, 0x00,0x0FF,0x0FF,0x0FF,0x0FF,0x00,0x00,0x00,0x00,0x0F,0x00,0x00, 0x00,0x02,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x03,0x00,0x00, 0x00,0x05,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x04,0x00,0x00, 0x00,0x06,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,0x0C,0x00,0x00, 0x00,0x0C,0x00,0x00,0x00,0x0D,0x00,0x00,0x00,0x5A,0x00,0x00, 0x00,0x5A,0x00,0x00,0x00,0x0FF,0x0FF,0x0FF,0x0FF,0x28,0x00,0x00, 0x00,0x67,0x00,0x00,0x00,0x61,0x00,0x00,0x00,0x0F,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x08,0x00 }; [/code] Just a simple listing with associated packet ID:- [code] Packet: 0x00 Length: 0x01 Packet: 0x01 Length: 0x08 Packet: 0x05 Length: 0x01 Packet: 0x9 Length: 0x0C Packet: 0x0D Length: 0x01 Packet: 0x011 Length: 0x01 Packet: 0x015 Length: 0x01 Packet: 0x019 Length: 0x06 Packet: 0x01D Length: 0x06 Packet: 0x21 Length: 0x0B Packet: 0x025 Length: 0x06 Packet: 0x029 Length: 0x06 Packet: 0x02D Length: 0x09 Packet: 0x31 Length: 0x0D Packet: 0x35 Length: 0x0C Packet: 0x39 Length: 0x10 Packet: 0x3D Length: 0x10 Packet: 0x041 Length: 0x08 Packet: 0x45 Length: 0x1A Packet: 0x49 Length: 0x0E Packet: 0x4D Length: 0x12 Packet: 0x51 Length: 0x0B Packet: 0x55 Length: 0x0FF Packet: 0x56 Length: 0x0FF Packet: 0x57 Length: 0x0FF Packet: 0x58 Length: 0x0FF Packet: 0x5D Length: 0x0F Packet: 0x061 Length: 0x02 Packet: 0x065 Length: 0x02 Packet: 0x069 Length: 0x03 Packet: 0x06D Length: 0x05 Packet: 0x071 Length: 0x03 Packet: 0x075 Length: 0x04 Packet: 0x079 Length: 0x06 Packet: 0x7D Length: 0x0A Packet: 0x81 Length: 0x0C Packet: 0x85 Length: 0x0C Packet: 0x89 Length: 0x0D Packet: 0x8D Length: 0x5A Packet: 0x91 Length: 0x5A Packet: 0x95 Length: 0x0FF Packet: 0x96 Length: 0x0FF Packet: 0x97 Length: 0x0FF Packet: 0x98 Length: 0x0FF Packet: 0x99 Length: 0x28 Packet: 0x9D Length: 0x67 Packet: 0xA1 Length: 0x61 Packet: 0xA5 Length: 0x0F Packet: 0x0AD Length: 0x08 [/code] Edit: Oops Script had a couple of bugs in it think it's fixed now enjoy :) | December 3, 2004, 9:14 PM |
UserLoser. | IIRC, there's no packet with an id of the message greater than 0xAE.; and the id is an 8-bit value | December 3, 2004, 10:49 PM |
BrainScan | [quote author=UserLoser link=topic=9752.msg90957#msg90957 date=1102114148] IIRC, there's no packet with an id of the message greater than 0xAE.; and the id is an 8-bit value [/quote] So, does that mean that this table here is wrong? UserLoser, are you still willing to take a look at my D2Net.dll? | December 4, 2004, 10:35 PM |
UserLoser. | [quote author=BrainScan link=topic=9752.msg91058#msg91058 date=1102199731] [quote author=UserLoser link=topic=9752.msg90957#msg90957 date=1102114148] IIRC, there's no packet with an id of the message greater than 0xAE.; and the id is an 8-bit value [/quote] So, does that mean that this table here is wrong? UserLoser, are you still willing to take a look at my D2Net.dll? [/quote] This is on my list of things to re-do. Been busy lately, havn't had much time or been home much. I already got D2Net.dll from someone else, though. | December 5, 2004, 1:15 AM |
Skywing | [quote author=UserLoser link=topic=9752.msg90957#msg90957 date=1102114148] IIRC, there's no packet with an id of the message greater than 0xAE.; and the id is an 8-bit value [/quote] I think those are used for open games instead of realm games. | December 5, 2004, 9:16 PM |
botmaster | [code] WORD table[256][9] = { {0x0008,0x0b2f,0x0b4f,0x0b54,0x0b5c,0x0b71,0x0b7b,0x0b84,0x0b85}, {0x0008,0x0b86,0x0b87,0x0b88,0x0b8b,0x0b8c,0x0b8d,0x0b8e,0x0b91}, {0x0008,0x0b92,0x0b94,0x0b99,0x0b9a,0x0b9b,0x0b9c,0x0b9d,0x0b9e}, {0x0008,0x0b9f,0x0ba1,0x0ba3,0x0ba4,0x0ba5,0x0ba6,0x0ba7,0x0ba8}, {0x0008,0x0ba9,0x0baa,0x0bab,0x0bac,0x0bad,0x0bae,0x0baf,0x0bb1}, {0x0008,0x0bb2,0x0bb3,0x0bb4,0x0bb5,0x0bb6,0x0bb7,0x0bb9,0x0bba}, {0x0008,0x0bbb,0x0bbc,0x0bbd,0x0bbe,0x0bbf,0x0bc1,0x0bc3,0x0bc4}, {0x0008,0x0bc5,0x0bc6,0x0bc7,0x0bc8,0x0bc9,0x0bca,0x0bcb,0x0bcc}, {0x0008,0x0bcd,0x0bcf,0x0bd0,0x0bd1,0x0bd2,0x0bd3,0x0bd4,0x0bd5}, {0x0008,0x0bd6,0x0bd7,0x0bd8,0x0bd9,0x0bda,0x0bdb,0x0bdc,0x0bdd}, {0x0008,0x0bde,0x0bdf,0x0be1,0x0be3,0x0be4,0x0be5,0x0be6,0x0be7}, {0x0008,0x0be9,0x0bea,0x0beb,0x0bec,0x0bed,0x0bee,0x0bef,0x0bf1}, {0x0008,0x0bf2,0x0bf3,0x0bf4,0x0bf5,0x0bf6,0x0bf7,0x0bf9,0x0bfa}, {0x0008,0x0bfb,0x0bfc,0x0bfd,0x0bfe,0x0a1b,0x0a1b,0x0a1c,0x0a1c}, {0x0004,0x0a21,0x0a22,0x0a23,0x0a24,0x0000,0x0000,0x0000,0x0000}, {0x0004,0x0a26,0x0a27,0x0a29,0x0a2a,0x0000,0x0000,0x0000,0x0000}, {0x0004,0x0a2b,0x0a2c,0x0a2d,0x0a2e,0x0000,0x0000,0x0000,0x0000}, {0x0004,0x0a32,0x0a33,0x0a34,0x0a35,0x0000,0x0000,0x0000,0x0000}, {0x0004,0x0a36,0x0a37,0x0a38,0x0a39,0x0000,0x0000,0x0000,0x0000}, {0x0004,0x0a3a,0x0a3c,0x0a3d,0x0a3e,0x0000,0x0000,0x0000,0x0000}, {0x0004,0x0a3f,0x0a41,0x0a42,0x0a44,0x0000,0x0000,0x0000,0x0000}, {0x0004,0x0a46,0x0a47,0x0a48,0x0a49,0x0000,0x0000,0x0000,0x0000}, {0x0004,0x0a4a,0x0a4b,0x0a4e,0x0a53,0x0000,0x0000,0x0000,0x0000}, {0x0004,0x0a57,0x0a59,0x0a5a,0x0a5b,0x0000,0x0000,0x0000,0x0000}, {0x0004,0x0a5d,0x0a5e,0x0a5f,0x0a60,0x0000,0x0000,0x0000,0x0000}, {0x0004,0x0a61,0x0a65,0x0a66,0x0a6a,0x0000,0x0000,0x0000,0x0000}, {0x0004,0x0a6e,0x0a6f,0x0a70,0x0a72,0x0000,0x0000,0x0000,0x0000}, {0x0004,0x0a73,0x0a74,0x0a75,0x0a76,0x0000,0x0000,0x0000,0x0000}, {0x0004,0x0a77,0x0a78,0x0a79,0x0a7a,0x0000,0x0000,0x0000,0x0000}, {0x0004,0x0a7c,0x0a7d,0x0a7e,0x0a7f,0x0000,0x0000,0x0000,0x0000}, {0x0004,0x0a81,0x0a82,0x0a83,0x0a89,0x0000,0x0000,0x0000,0x0000}, {0x0004,0x0a8a,0x0a8f,0x0a93,0x0a98,0x0000,0x0000,0x0000,0x0000}, {0x0004,0x0aa0,0x0aa2,0x0ab0,0x0ab8,0x0000,0x0000,0x0000,0x0000}, {0x0004,0x0ac0,0x0ac2,0x0ace,0x0ae0,0x0000,0x0000,0x0000,0x0000}, {0x0004,0x0ae2,0x0ae8,0x0af0,0x0af8,0x0000,0x0000,0x0000,0x0000}, {0x0002,0x090e,0x0919,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0002,0x091a,0x0925,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0002,0x0928,0x0930,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0002,0x0931,0x093b,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0002,0x0940,0x0943,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0002,0x0945,0x094c,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0002,0x094d,0x0950,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0002,0x0952,0x0955,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0002,0x0956,0x0958,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0002,0x0962,0x0963,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0002,0x0964,0x096b,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0002,0x0990,0x0995,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0002,0x0996,0x0997,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0809,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x080b,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x080c,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x080f,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0810,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0811,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0816,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0817,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0818,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x081d,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x081f,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0820,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0851,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x086c,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0703,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0703,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0704,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0704,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0706,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0706,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0707,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0707,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0708,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0708,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x070a,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x070a,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x070d,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x070d,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0712,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0712,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0715,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0715,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x071e,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x071e,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0767,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0767,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0768,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0768,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0769,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0769,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x076d,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x076d,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0780,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0780,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0602,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0602,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0602,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0602,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0605,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0605,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0605,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0605,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0613,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0613,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0613,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0613,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0614,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0614,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0614,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0614,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x06ff,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x06ff,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x06ff,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x06ff,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0401,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0401,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0401,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0401,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0401,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0401,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0401,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0401,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0401,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0401,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0401,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0401,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0401,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0401,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0401,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0401,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}, {0x0001,0x0100,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}}; WORD InvTable[256][2]; DWORD aMasks[] = {0x0, 0x1, 0x3, 0x7, 0xF, 0x1F, 0x3F, 0x7F, 0xFF, 0x1FF, 0x3FF, 0x7FF, 0xFFF, 0x1FFF, 0x3FFF, 0x7FFF, 0xFFFF}; [/code] | December 8, 2004, 1:44 PM |
BrainScan | hey botmaster, nice table..... ::) What is it? I feel like I should know what to do with it, but I'm drawing a blank. I'm assuming that it has to do with the packet lengths, but thats as far as I am able to get. Would you mind explaining it a little? | December 8, 2004, 10:39 PM |
botmaster | you really don't need to know the lengths what I post is part of the decompression. *Edit* I fixed my problem ;) | December 9, 2004, 12:15 AM |
BrainScan | [quote author=botmaster link=topic=9752.msg91570#msg91570 date=1102551307] you really don't need to know the lengths[/quote] Since almost all of the D2GS packets are fixed length, it's good to know the length so you can verify it. Also I've heard that serveral server packets can be clumped into one compressed packet, so you need to know the length of a packet reletive to it's packet ID to seperate the clumps. This is my understanding of it at least. If I'm wrong, someone please let me know. | December 10, 2004, 8:28 PM |
Skywing | You will want the packet length table and the variable packet length calculator function if you aren't going to handle every packet with the assumption that each handler knows how long it's packet is. IIRC, messages with length 0xFF in the table have a variable length that you need to determine based on the message contents (usually embedded strings or a count of items, that sort of thing). | December 10, 2004, 10:45 PM |