Valhalla Legends Forums Archive | Battle.net Bot Development | [D2GS] 0x22 Packet??? (S>C)

AuthorMessageTime
lokis
Well, I make my bot enter the game and now I'm trying to read the packets I receive, but I'm having a little problem.

This is the part of a packet I decompressed, and now I'm trying to read it, but I found some problems
[code]8F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 59 18 00 00 00 05 42 69 67 4D 61 63 00 00 00
00 00 00 00 00 00 00 00 00 00 00 AA 00 18 00 00
00 0C 69 59 F9 FF 1F 76 00 18 00 00 00 94 08 18
00 00 00 00 00 01 02 00 01 01 00 01 D9 00 01 DA
00 01 DB 00 01 DC 00 01 03 00 01 22 00 00 18 00
00 00 DB 00 01 CB 00 22 00 00 18 00 00 00 D9 00
01 CB 00 5E 01 00 00 00 00 00 00 01 00 01 00 00
00 00 01 01 01 01 00 01 00 00 00 00 01 00 00 00
01 01 00 00 00 00 00 00 77 28 06 00 00 00 00 00[/code]

The first packet is ping response, that's OK.
[code]8F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00[/code]

The second packet is D2GS_PLAYERASIGN
[code]59 18 00 00 00 05 42 69 67 4D 61 63 00 00 00
00 00 00 00 00 00 00 00 00 00 00[/code]
In this packet I'm seeing my self, so:
My player ID: 18 00 00 00
I'm a druid, so: 05
And my name: 42 69 67 4D 61 63
Well, here I didn't understand why my location is 00 00 00 00
But that's not the problem, let's move on.

Third packet:
[code]AA 00 18 00 00
00 0C 69 59 F9 FF 1F 76 00 18 00 00 00[/code]
Well, this is packet D2GS_COMINFOADD, its lengh is determinated by its 7th byte
soh the packet lengh is 0C (12)... Ok, next packet:

Fourth packet:
[code]94 08 18
00 00 00 00 00 01 02 00 01 01 00 01 D9 00 01 DA
00 01 DB 00 01 DC 00 01 03 00 01[/code]
This is packet D2GS_SKILLSLOG, its lengh is 6 + (byte1 * 3).
In this case the lengh is 30, right?

Fifth packet?
And now, the next packet ID is a 0x22, I don't what packet it is, I found nothing about it, so i'm almost sure I'm doing something wrong, that's why I posted everything I did here.
You guys have any idea what I'm doing wrong?

Thanks in advance

February 14, 2008, 2:59 AM
Ringo
[code]
22 00 00 18 00 00 00 DB 00 01 CB 00

22 00 00 18 00 00 00 D9 00 01 CB 00

5E 01 00 00 00 00 00 00 01 00 01 00 00 00 00 01 01 01 01 00 01 00 00 00 00 01 00 00 00 01 01 00 00 00 00 00 00 77

28 06 00 00 00 00 00..........

(BYTE)
(BYTE)
(DWORD) Entity ID
(WORD) Skill Code
(BYTE) Count
(WORD)

[/code]
Its just telling you that you have 1 on tp/id scrolls/books.
Im not sure what the other values mean tho.
February 14, 2008, 3:14 AM
lokis
I didn't see anything about this packets, and this values 00 01 are very weird for me.

Here's the hole packet
[code]
8F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 59 18 00 00 00 05 42 69 67 4D 61 63 00 00 00
00 00 00 00 00 00 00 00 00 00 00 AA 00 18 00 00
00 0C 69 59 F9 FF 1F 76 00 18 00 00 00 94 08 18
00 00 00 00 00 01 02 00 01 01 00 01 D9 00 01 DA
00 01 DB 00 01 DC 00 01 03 00 01 22 00 00 18 00
00 00 DB 00 01 CB 00 22 00 00 18 00 00 00 D9 00
01 CB 00 5E 01 00 00 00 00 00 00 01 00 01 00 00
00 00 01 01 01 01 00 01 00 00 00 00 01 00 00 00
01 01 00 00 00 00 00 00 77 28 06 00 00 00 00 00
01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
29 00 00 00 80 00 80 00 80 00 A0 00 80 00 80 00
00 00 20 00 A0 00 00 00 A0 00 A0 00 80 00 80 00
00 00 20 00 00 00 80 00 00 00 80 00 A0 00 A0 00
00 00 00 00 80 00 80 00 80 00 00 00 00 00 00 00
00 00 A0 00 00 00 00 00 80 00 80 00 80 00 80 00
80 00 80 00 00 00 00 00 00 00 00 00 00 00 00 00
00 0B 00 18 00 00 00 5F 01 00 00 00 1D 00 0F 1D
01 14 1D 02 14 1D 03 19 1E 07 00 37 1E 09 00 14
1E 0B 00 54 1D 0C 01 9C 0E 14 10 CF 02 00 00 10
00 A2 00 65 08 00 80 06 17 03 02 9C 0E 14 10 D0
02 00 00 10 00 A2 00 65 08 02 80 06 17 03 02 9C
0E 14 10 D1 02 00 00 10 00 A2 00 65 08 04 80 06
17 03 02 9C 0E 14 10 D2 02 00 00 10 00 A2 00 65
08 06 80 06 17 03 02 9C 04 14 10 D3 02 00 00 10
00 A2 00 65 00 72 42 37 37 06 02 00 00 00 00 00
[/code]

I'm almost sure there's something wrong, I don't understand this lot of 00 bytes in the packet
February 14, 2008, 3:31 AM
Ringo
[quote author=lokis link=topic=17321.msg176369#msg176369 date=1202959861]
I didn't see anything about this packets, and this values 00 01 are very weird for me.

Here's the hole packet
[code]
8F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 59 18 00 00 00 05 42 69 67 4D 61 63 00 00 00
00 00 00 00 00 00 00 00 00 00 00 AA 00 18 00 00
00 0C 69 59 F9 FF 1F 76 00 18 00 00 00 94 08 18
00 00 00 00 00 01 02 00 01 01 00 01 D9 00 01 DA
00 01 DB 00 01 DC 00 01 03 00 01 22 00 00 18 00
00 00 DB 00 01 CB 00 22 00 00 18 00 00 00 D9 00
01 CB 00 5E 01 00 00 00 00 00 00 01 00 01 00 00
00 00 01 01 01 01 00 01 00 00 00 00 01 00 00 00
01 01 00 00 00 00 00 00 77 28 06 00 00 00 00 00
01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
29 00 00 00 80 00 80 00 80 00 A0 00 80 00 80 00
00 00 20 00 A0 00 00 00 A0 00 A0 00 80 00 80 00
00 00 20 00 00 00 80 00 00 00 80 00 A0 00 A0 00
00 00 00 00 80 00 80 00 80 00 00 00 00 00 00 00
00 00 A0 00 00 00 00 00 80 00 80 00 80 00 80 00
80 00 80 00 00 00 00 00 00 00 00 00 00 00 00 00
00 0B 00 18 00 00 00 5F 01 00 00 00 1D 00 0F 1D
01 14 1D 02 14 1D 03 19 1E 07 00 37 1E 09 00 14
1E 0B 00 54 1D 0C 01 9C 0E 14 10 CF 02 00 00 10
00 A2 00 65 08 00 80 06 17 03 02 9C 0E 14 10 D0
02 00 00 10 00 A2 00 65 08 02 80 06 17 03 02 9C
0E 14 10 D1 02 00 00 10 00 A2 00 65 08 04 80 06
17 03 02 9C 0E 14 10 D2 02 00 00 10 00 A2 00 65
08 06 80 06 17 03 02 9C 04 14 10 D3 02 00 00 10
00 A2 00 65 00 72 42 37 37 06 02 00 00 00 00 00
[/code]

I'm almost sure there's something wrong, I don't understand this lot of 00 bytes in the packet
[/quote]

Hmm im just braking these up by hand:
[code]
8F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00

Your character stuff:
59 18 00 00 00 05 42 69 67 4D 61 63 00 00 00
00 00 00 00 00 00 00 00 00 00 00

AA 00 18 00 00
00 0C 69 59 F9 FF 1F 76 00 18 00 00 00

Skill crap:
94 08 18
00 00 00 00 00 01 02 00 01 01 00 01 D9 00 01 DA
00 01 DB 00 01 DC 00 01 03 00 01

22 00 00 18 00
00 00 DB 00 01 CB 00

22 00 00 18 00 00 00 D9 00
01 CB 00

Some quest crap:
5E 01 00 00 00 00 00 00 01 00 01 00 00
00 00 01 01 01 01 00 01 00 00 00 00 01 00 00 00
01 01 00 00 00 00 00 00 77

28 06 00 00 00 00 00
01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

29 00 00 00 80 00 80 00 80 00 A0 00 80 00 80 00
00 00 20 00 A0 00 00 00 A0 00 A0 00 80 00 80 00
00 00 20 00 00 00 80 00 00 00 80 00 A0 00 A0 00
00 00 00 00 80 00 80 00 80 00 00 00 00 00 00 00
00 00 A0 00 00 00 00 00 80 00 80 00 80 00 80 00
80 00 80 00 00 00 00 00 00 00 00 00 00 00 00 00
00 0B 00 18 00 00 00

5F 01 00 00 00

Your chars stats: (base life/mana/str/dex/vita etc)
1D 00 0F

1D 01 14

1D 02 14

1D 03 19

1E 07 00 37

1E 09 00 14

1E 0B 00 54

1D 0C 01

Some items: (0x14 is the lengh byte for 0x9C/9x9D)
9C 0E 14 10 CF 02 00 00 10
00 A2 00 65 08 00 80 06 17 03 02

9C 0E 14 10 D0
02 00 00 10 00 A2 00 65 08 02 80 06 17 03 02

9C 0E 14 10 D1 02 00 00 10 00 A2 00 65 08 04 80 06
17 03 02

9C 0E 14 10 D2 02 00 00 10 00 A2 00 65
08 06 80 06 17 03 02

9C 04 14 10 D3 02 00 00 10
00 A2 00 65 00 72 42 37 37 06 02 00 00 00 00 00....
[/code]

Aside, if your useing that d2gs research topic as referance, some packets arnt listed.
I think somone posted the packet lenghs on this forum somwhere, try search D2GS packet lenghs -- but they were for 1.10.
Also, its not 00 01, i posted format with out the packet id:
[code]
22
00
00
18 00 00 00
DB 00
01
CB 00 [/code]
February 14, 2008, 3:35 AM
lokis
omg, you're good at this :o more efficient than my packet splitter class... lol

I'm gonna try to find out something about this "unknow" packets, but how do you know how to separate the packet? just intuitive? any hint for a beginner?

You really helped me, thanks  ;D

Thanks I found the lenghs, its for the 1.10, but it helps
[code]Private m_PacketLengths() As Integer = {&H1, &H8, &H1, &HC, &H1, &H1, &H1, &H6, &H6, &HB, &H6, &H6, &H9, &HD, &HC, &H10, _
                                              &H10, &H8, &H1A, &HE, &H12, &HB, -1, -1, &HF, &H2, &H2, &H3, &H5, &H3, &H4, &H6, _
                                              &HA, &HC, &HC, &HD, &H5A, &H5A, -1, &H28, &H67, &H61, &HF, &H0, &H8, &H0, &H0, &H0, _
                                              &H0, &H0, &H0, &H0, &H0, &H0, &H0, &H0, &H0, &H0, &H0, &H0, &H0, &H0, -1, &H8, _
                                              &HD, &H0, &H6, &H0, &H0, &HD, &H0, &HB, &HB, &H0, &H0, &H0, &H10, &H11, &H7, &H1, _
                                              &HF, &HE, &H2A, &HA, &H3, &H0, &H0, &HE, &H7, &H1A, &H28, -1, &H5, &H6, &H26, &H5, _
                                              &H7, &H2, &H7, &H15, &H0, &H7, &H7, &H10, &H15, &HC, &HC, &H10, &H10, &HA, &H1, &H1, _
                                              &H1, &H1, &H1, &H20, &HA, &HD, &H6, &H2, &H15, &H6, &HD, &H8, &H6, &H12, &H5, &HA, _
                                              &H4, &H14, &H1D, &H0, &H0, &H0, &H0, &H0, &H0, &H2, &H6, &H6, &HB, &H7, &HA, &H21, _
                                              &HD, &H1A, &H6, &H8, -1, &HD, &H9, &H1, &H7, &H10, &H11, &H7, -1, -1, &H7, &H8, _
                                              &HA, &H7, &H8, &H18, &H3, &H8, -1, &H7, -1, &H7, -1, &H7, -1, &H0, -1}[/code]
February 14, 2008, 3:42 AM
Ringo
[quote author=lokis link=topic=17321.msg176371#msg176371 date=1202960558]
I'm gonna try to find out something about this "unknow" packets, but how do you know how to separate the packet? just intuitive? any hint for a beginner?
[/quote]
Yeah intuitive and past exp, I researched the whole protocol with out knowing any of the packet lenghs, packet values or anything. D2GS Rersearch thread was a result of a few weeks after, I later continued and figgerd out almost everything via packet logs.
Player ID's were my main target, when i was trying to figger out what was what.
I have all the packet formats on my computer *somwhere*, most are in the back of my head somwhere.
Alot of the codes/values/bit fields can be found in the txt files in the mpqs (like monstats.txt etc)
I have been meaning to create a new D2GS packet thread, but just never got round to it.
Any packets your not sure about, post them and i can give a basic discription of there meanings. :)
February 14, 2008, 3:52 AM
lokis
Well, I got this packets 0D:
[code]
0D 05 00 01 06 00 0F 13 00 00
0D 00 2E 00 00 5A 11 43 12 80
[/code]

But the documentation for this packet is:
0x0D
D2GS_PLAYERSTOP
Lengh = 13

0D 00 XX XX XX XX 07 67 16 D8 15 00 5D
(BYTE) Object Type
(DWORD) Object ID
(BYTE) Unknown (very's from 0 to 15)
(WORD) Location X
(WORD) Location Y
(BYTE) Unknown
(BYTE) Life%

Well, I think this packet changed, do you know what are the possible information in this packet now?
I captured this 2 packets while standing in the same position, that's weird because I can't see the location WORDS, their values difference have to be small, right?

now I got this packet 0x51

[code]51 00 00 28 00 00 59 F9 FF 1F[/code]

Previously documentation:
51 02 XX XX XX XX 25 00 59 16 A0 15 02 00
(BYTE) Object Type
(DWORD) Object ID
(WORD) Object Unique Code
(WORD) Location X
(WORD) Location Y
(BYTE) Objects State (0x00=no &HE will follow, 0x02=expect a &HE)
(BYTE) Interaction Conditions


Well, in both cases, shouldn't the IDs have lower values?
February 14, 2008, 7:47 PM
Ringo
[quote author=lokis link=topic=17321.msg176380#msg176380 date=1203018451]
Well, I got this packets 0D:
[code]
0D 05 00 01 06 00 0F 13 00 00
0D 00 2E 00 00 5A 11 43 12 80
[/code]
[code]51 00 00 28 00 00 59 F9 FF 1F[/code]
[/quote]
Looks like somwhere before you got them, you parsed a packet with the wrong lengh.
Remember those packet lenghs are for 1.10, a few packets changed slightly in 1.11 (not many tho)
You need to print out each message as you recv them, and back track when it brakes, to find out what message was passed with the wrong lengh, then change it to the 1.11 lengh.
When a packet gets parsed with the wrong lengh, some bits of broken data will fall into some parsers, so its a good idea to habve plenty of error checks -- always good for new patchs and detecting changes/brakes.
If you want, post the parsed messages and i can point out what and where it went wrong if you like.
[code]
0D 00 2E 00 00 5A 11 43 12 80
[/code]
That one looks like it was some location based packet -- not sure what one tho, but im seeing an X/Y location as well as NPC life percent there.

Aside, got some better documentation here for 0x0D:
[code]
0x0D - D2GS_PLAYERSTATE1
0D 00 XX XX XX XX 07 67 16 D8 15 00 5D
(BYTE) Entity Type
(DWORD) Entity ID
(BYTE) State
(WORD) Location X
(WORD) Location Y
(BYTE) Life Percent (Mainly for NPC's only, normaly 0 for players)
(BITS[4]) Melee/Missle sound/animation FX
(BITS[4]) Damage type sound/animation FX


Valid/Known States for a player (entity 0):
    0x06 = get hit
    0x07 = stop
    0x08 = Die (No esc)
    0x09 = Dead (Esc, corpse is replaced with dummy)
    0x12 = Nothing?
    0x13 = get hit (no animation)
    0x14 = get hit
    0x15 = Heading Change (Changes direction your character is facing)
    0x16 = nothing?
    0x17 = nothing?
    0x19 = Dodge

Valid/Known States for a NPC (entity 1):
    0x00 = Nothing (X/Y Must be 0)
    0x01 = Walks To X/Y
    0x02 = Stops walking (X/Y N/A)
    0x03 = Stops walking (X/Y N/A)
    0x04 = ???? (NPC went invisible)
    0x05 = ???? (NPC went invisible, X/Y Must be 0)
    0x06 = Takes Hit (animations useable, X/Y N/A)
    0x07 = Walks To X/Y (And auto stops)
    0x08 = Dieing (animations useable, X/Y N/A)
    0x09 = Dead (X/Y N/A)
    0x0A = Attack (X/Y Must be 0)
    0x0B = Attack At location X/Y
    0x0C = Resurrect (X/Y N/A)
    0x0D = ???? (NPC went invisible, X/Y Must be 0, Resurrect sound)
    0x0E = ???? (NPC went invisible)
    0x0F = ???? (NPC went invisible, X/Y Must be 0)
    0x11 = Cast At Location X/Y
    0x12 = Dodge attack (X/Y Must be 0)
    0x13 = Get hit with no effect (X is the animation byte)
    -> higher states are just strange and effect the layout of the packet body


Missile/Melee codes:
    0x00 = Normal
    0x01 = Stab1
    0x02 = Stab2
    0x03 = Stab3
    0x04 = Stab4
    0x05 = Stab5
    0x06 = Stab6
    0x07 = Stab7
    0x08 = Wooden1 (like from staffs etc)
    0x08 = Wooden2
    0x0A = Arrow1
    0x0B = Arrow2
    0x0C = Arrow3
    0x0D = Normal?
    0x0E = Normal?
    0x0F = Normal?

Damage types:
    0x01 = Magic sound/graphic
    0x02 = Fire sound/graphic
    0x03 = Cold sound/graphic
    0x04 = Lightning sound/graphic
    0x05 = Posion sound/graphic
    0x06 = Wobble sound/graphic?
    0x07 = Knock back sound/graphic
    0x08 = Stun sound/graphic?
    0x09 = Redemtion sound/graphic?

[/code]
The states and effect bitfields are the same for 0x0C, 0x69 etc
February 14, 2008, 10:11 PM
lokis
yeah, I'm logging the whole packet before it's parsed, then I log what my parser class did, and I check the whole packet that was logged to see if it's right

Here's the packet where I extracted de 0x0D packets:
[code]
0D 05 00 01 06 00 0F 13 00 00 0D 00 2E 00 00 5A
11 43 12 80 AC 03 00 00 00 98 00 73 11 44 12 80
10 11 08 00 AA 01 03 00 00 00 0C 69 59 F9 FF 1F
6D 03 00 00 00 73 11 44 12 80 51 02 06 00 00 00
4E 00 6B 11 23 12 00 00 51 02 05 00 00 00 25 00
79 11 43 12 02 00 51 02 04 00 00 00 23 00 6C 11
40 12 00 00 51 02 03 00 00 00 27 00 7D 11 22 12
00 00 [/code]

Here's what I done
[code]
0D 05 00 01 06 00 0F 13 00 00
0D 00 2E 00 00 5A 11 43 12 80

AC 03 00 00 00 98 00 73 11 44 12 80 10 11 08 00

AA 01 03 00 00 00 0C 69 59 F9 FF 1F

6D 03 00 00 00 73 11 44 12 80

51 02 06 00 00 00 4E 00 6B 11 23 12 00 00
51 02 05 00 00 00 25 00 79 11 43 12 02 00
51 02 04 00 00 00 23 00 6C 11 40 12 00 00
51 02 03 00 00 00 27 00 7D 11 22 12 00 00
[/code]
This is right?


Here's the whole packet that i got the 0x51:
[code]51 00 00 28 00 00 59 F9 FF 1F 6D 06 00 00 00 5A
11 43 12 80 AC 03 00 00 00 98 00 73 11 44 12 80
10 11 08 00 AA 01 03 00 00 00 0C 69 59 F9 FF 1F
6D 03 00 00 00 73 11 44 12 80 51 02 06 00 00 00
4E 00 6B 11 23 12 00 00 51 02 05 00 00 00 25 00
79 11 43 12 02 00 51 02 04 00 00 00 23 00 6C 11
40 12 00 00 51 02 03 00 00 00 27 00 7D 11 22 12
00 00 07 80 03 A0 03 01 51 02 02 00 00 00 81 01
84 11 21 12 00 00 AC 02 00 00 00 09 01 80 11 25
12 80 0E 01 AA 01 02 00 00 00 0C 69 59 F9 FF 1F[/code]

I splitted like this:
[code]
51 00 00 28 00 00 59 F9 FF 1F

6D 06 00 00 00 5A 11 43 12 80
AC 03 00 00 00 98 00 73 11 44 12 80 10 11 08 00
AA 01 03 00 00 00 0C 69 59 F9 FF 1F
6D 03 00 00 00 73 11 44 12 80

51 02 06 00 00 00 4E 00 6B 11 23 12 00 00
51 02 05 00 00 00 25 00 79 11 43 12 02 00
51 02 04 00 00 00 23 00 6C 1140 12 00 00
51 02 03 00 00 00 27 00 7D 11 22 12 00 00

07 80 03 A0 03 01

51 02 02 00 00 00 81 01 84 11 21 12 00 00

AC 02 00 00 00 09 01 80 11 25 12 80 0E 01

AA 01 02 00 00 00 0C 69 59 F9 FF 1F[/code]
For me, everything's appear to be right, but that initial 0x51 packet doesn't make sense to me, I mean, there are others 0x51 packets and they are not that way
February 14, 2008, 11:25 PM
Ringo
Can you post the whole logon dumps, like that?
I need to see the block of data before those blocks, to see what went wrong.
It looks like its a bad packet lengh, but it might be bad compressed message declumping.
You just posted the after math, i need to see the before and after =)
Somthings braking tho, no doubt of that.

EDIT: should look somthing like this:
[code]
59 01 00 00 00 01 65 72 65 72 67 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

AA 00 01 00 00 00 0C 69 59 F9 FF 1F

76 00 01 00 00 00

94 0D 01 00 00 00 00 00 01 02 00 01 01 00 01 D9 00 01 DA 00 01 DB 00 01 DC 00 01 03 00 01 27 00 01 28 00 01 2C 00 01 2D 00 01 32 00 01

22 00 00 01 00 00 00 DB 00 01 9E 00

22 00 00 01 00 00 00 D9 00 01 9E 00

21 00 00 01 00 00 00 24 00 00 01 00

23 00 01 00 00 00 00 2C 00 FF FF FF FF

5E 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 B1

0B 00 01 00 00 00

5F 01 00 00 00

1D 00 0A

1D 01 23

1D 02 19

1D 03 0A

1D 05 0F

1F 07 00 F4 01 00

1F 09 00 F4 01 00

1F 0B 00 F4 01 00

1D 0C 0C

1F 0F A0 86 01 00

9C 0E 14 10 01 00 00 00 10 00 A2 00 65 08 00 80 06 17 03 02

9C 0E 14 10 02 00 00 00 10 00 A2 00 65 08 02 80 06 17 03 02

9C 0E 14 10 03 00 00 00 10 00 A2 00 65 08 04 80 06 17 03 02

9C 0E 14 10 04 00 00 00 10 00 A2 00 65 08 06 80 06 17 03 02

9C 04 14 10 05 00 00 00 10 00 A2 00 65 00 72 42 37 37 06 02

9C 04 14 10 06 00 00 00 10 00 A2 00 65 00 52 92 36 37 06 02

9D 06 21 05 07 00 00 00 00 01 00 00 00 11 00 82 00 65 84 08 30 37 47 07 82 80 40 21 61 0D 89 FC 07

23 00 01 00 00 00 01 00 00 FF FF FF FF

23 00 01 00 00 00 00 2C 00 FF FF FF FF

1D 00 0A

1D 01 23

1D 02 19

1D 03 0A

1D 05 0F

1F 07 00 F4 01 00

1F 09 00 F4 01 00

1F 0B 00 F4 01 00

1D 0C 0C

1F 0F A0 86 01 00

95 D9 01 FA 00 7D 00 00 00 00 00 00 00

1F 0E C0 D4 01 00

1C 57 60 01 00

03 00 13 74 36 4A 01 00 01 A2 4E BA

53 02 00 00 00 00 00 00 00 00

07 88 04 B0 03 01

07 80 04 A8 03 01

07 80 04 B0 03 01

07 88 04 A8 03 01

07 90 04 A8 03 01

07 80 04 B8 03 01

07 88 04 B0 03 01

07 90 04 B0 03 01

07 88 04 B8 03 01

07 90 04 B8 03 01

15 00 01 00 00 00 B5 16 73 12 01

7E 00 00 00 00

AC 08 00 00 00 9A 00 8E 16 68 12 80 0E 01

AA 01 08 00 00 00 0C 69 59 F9 FF 1F

6D 08 00 00 00 8E 16 68 12 80

51 02 13 00 00 00 25 00 96 16 62 12 02 00

0E 02 13 00 00 00 03 00 02 00 00 00

51 02 12 00 00 00 25 00 88 16 6F 12 02 00

0E 02 12 00 00 00 03 00 02 00 00 00

51 02 11 00 00 00 77 00 A7 16 56 12 02 00

0E 02 11 00 00 00 03 01 02 00 00 00

AC 07 00 00 00 98 00 95 16 90 12 80 10 11 60 00

AA 01 07 00 00 00 0C 69 59 F9 FF 1F

6D 07 00 00 00 95 16 90 12 80

51 02 10 00 00 00 24 00 95 16 76 12 00 00

51 02 0F 00 00 00 4E 00 A7 16 81 12 00 00

51 02 0E 00 00 00 25 00 90 16 82 12 02 00

0E 02 0E 00 00 00 03 00 02 00 00 00

51 02 0D 00 00 00 25 00 A4 16 79 12 02 00

0E 02 0D 00 00 00 03 00 02 00 00 00

51 02 0C 00 00 00 25 00 BA 16 6A 12 02 00

0E 02 0C 00 00 00 03 00 02 00 00 00

AC 06 00 00 00 94 00 F0 16 5D 12 80 0E 01

AA 01 06 00 00 00 0C 69 59 F9 FF 1F

6D 06 00 00 00 F0 16 5D 12 80

51 02 0B 00 00 00 25 00 E9 16 61 12 02 00

0E 02 0B 00 00 00 03 00 02 00 00 00

51 02 0A 00 00 00 25 00 F6 16 58 12 02 00

0E 02 0A 00 00 00 03 00 02 00 00 00

51 02 09 00 00 00 25 00 DB 16 60 12 02 00

0E 02 09 00 00 00 03 00 02 00 00 00

AC 05 00 00 00 93 00 92 16 A9 12 80 0E 01

AA 01 05 00 00 00 0C 69 59 F9 FF 1F

6D 05 00 00 00 92 16 A9 12 80

51 02 08 00 00 00 25 00 93 16 9C 12 02 00

0E 02 08 00 00 00 03 00 02 00 00 00

51 02 07 00 00 00 25 00 8B 16 AC 12 02 00

0E 02 07 00 00 00 03 00 02 00 00 00

AC 0A 00 00 00 9B 00 AE 16 7A 12 80 0E 01

AA 01 0A 00 00 00 0C 69 59 F9 FF 1F

6D 0A 00 00 00 AE 16 7A 12 80

AC 09 00 00 00 96 00 CB 16 7B 12 80 0E 01

AA 01 09 00 00 00 0C 69 59 F9 FF 1F

6D 09 00 00 00 CB 16 7B 12 80

51 02 18 00 00 00 25 00 CA 16 76 12 02 00

0E 02 18 00 00 00 03 00 02 00 00 00

51 02 17 00 00 00 27 00 B9 16 81 12 00 00

51 02 16 00 00 00 0B 01 AE 16 74 12 00 00

51 02 15 00 00 00 25 00 BC 16 90 12 02 00

0E 02 15 00 00 00 03 00 02 00 00 00

51 02 14 00 00 00 81 01 C0 16 80 12 00 00

A8 00 01 00 00 00 0B 69 AC FC 0F

1D 0C 0C

1D 00 0A

1D 02 19

AC 04 00 00 00 98 00 DD 16 8A 12 80 10 11 40 00

AA 01 04 00 00 00 0C 69 59 F9 FF 1F

6D 04 00 00 00 DD 16 8A 12 80

51 02 06 00 00 00 23 00 E7 16 90 12 00 00

51 02 05 00 00 00 25 00 F4 16 94 12 02 00

0E 02 05 00 00 00 03 00 02 00 00 00

AC 03 00 00 00 98 00 C0 16 B5 12 80 10 11 40 00

AA 01 03 00 00 00 0C 69 59 F9 FF 1F

6D 03 00 00 00 C0 16 B5 12 80

AC 02 00 00 00 98 00 B0 16 A3 12 80 10 11 60 00

AA 01 02 00 00 00 0C 69 59 F9 FF 1F

6D 02 00 00 00 B0 16 A3 12 80

AC 01 00 00 00 98 00 CD 16 A5 12 80 10 11 60 00

AA 01 01 00 00 00 0C 69 59 F9 FF 1F

6D 01 00 00 00 CD 16 A5 12 80

51 02 04 00 00 00 25 00 C5 16 B6 12 02 00

0E 02 04 00 00 00 03 00 02 00 00 00

51 02 03 00 00 00 25 00 B4 16 A2 12 02 00

0E 02 03 00 00 00 03 00 02 00 00 00

51 02 02 00 00 00 25 00 D1 16 B1 12 02 00

0E 02 02 00 00 00 03 00 02 00 00 00

51 02 01 00 00 00 25 00 E0 16 B2 12 02 00

0E 02 01 00 00 00 03 00 02 00 00 00

1D 00 0A

1D 01 23

1D 02 19

1D 03 0A

1D 05 0F

1F 07 00 F4 01 00

1F 09 00 F4 01 00

1F 0B 00 F4 01 00

1D 0C 0C

1F 0F A0 86 01 00

48 00 00 01 00 00 00 00 00 00 00

04

48 00 00 01 00 00 00 00 00 00 00

5B 24 00 01 00 00 00 01 65 72 65 72 67 00 00 00 00 00 00 00 00 00 00 00 0C 00 FF FF 00 00 00 00 00 00 00 00

65 01 00 00 00 00 00

8D 01 00 00 00 FF FF

5A 02 04 00 00 00 00 00 65 72 65 72 67 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[/code]

[Kp edit: killed long lines that broke the table layout.  Learn to use line breaks in your hex dumps.]
February 14, 2008, 11:40 PM
lokis
I don't have that packets before decompressed :/

But, I have this one, for decompress test:
[code]F1 6B 02 A8 1A 34 57 CD 24 0C 65 95 00 80 90 24
A1 5C 0B 21 50 C0 CF E8 F9 AC 79 8C A0 19 19 2C
1C 87 88 47 95 AB 47 80 A4 28 01 64 27 68 8B 7E
8F 9A C7 98 CA 06 D2 1D 95 84 94 23 CA DB A1 42
DB 87 54 7D F6 DB 6D B0 EA 8F F6 DB 6D B3 99 99
CB B4 72 BB 47 27 C8 EA 11 44 95 06 16 94 18 C0
11 C9 93 97 44 9A 4A 7F E7 ED 87 E2 98 A8 F1 50
8A 0A 4C 8B 6B F0 C8 51 E8 95 20 1F D0 3A 21 8D
01 71 02 E8 86 34 03 FA 07 04 68 F8 13 85 E4 E9
4D D6 91 9C 10 BA 3E 64 AC 5D 0C CD 9D 2C 47 C2
F2 74 A6 EB 4F 17 33 E3 85 73 67 37 5E 78 B9 1B
92 61 91 3A 53 75 E7 8B A5 E4 99 12 9C 90 6E BD
12 A4 05 C4 0B A2 18 D0 10 08 1C F1 73 2E 1D C3
12 70 E0 DF 3C 5C C7 92 64 52 71 08 DD 79 E2 E9
39 26 80 D8 3B 37 5E 88 6A 40 5C 40 BA 25 48 07
F4 0E 08 D2 71 FE 21 9B 19 9B AD 23 38 21 74 9C
C9 58 BA 19 9B 3A 58 93 88 66 C6 66 EB 41 19 87
1F E6 66 C6 46 EB 48 CE 08 5C C3 99 2B 17 43 33
67 4B 0C 39 99 B1 91 BA D3 C5 D9 E4 98 86 6C 19
CD 97 9E 2E 9B 92 6A 0D 8C 4D D7 9E 2E 6B CC 5C
8C 6C 74 6F 9E 2E 69 C9 33 73 63 63 75 E2 EB F4
25 41 A4 B0 32 8D 63 68 D2 34 0C 9F D3 9B 28 37
1B 9F B6 D8 02 F9 DB F2 79 6B 80 F1 D1 3B 7E 29
1B 9F B6 D8 02 F9 DB F2 79[/code]

My decompressor generate this:
[code]9C 04 14 10 69 00 00 00 10 00 A2 00 65 00 52 92
36 37 06 02 9D 06 1E 05 6A 00 00 00 00 08 00 00
00 11 00 82 00 65 84 08 30 C6 26 06 82 80 80 81
E1 3F 9D 06 20 07 6B 00 00 00 00 08 00 00 00 11
00 82 00 65 A4 0A 20 56 37 06 82 80 00 01 06 06
FF 01 23 00 08 00 00 00 01 00 00 FF FF FF FF 23
00 08 00 00 00 00 00 00 FF FF FF FF 1D 00 0F 1D
01 14 1D 02 14 1D 03 19 1E 07 00 37 1E 09 00 14
1E 0B 00 54 1D 0C 01 95 37 00 0A 00 15 00 00 00
00 00 00 00 03 00 FF 2A 44 46 01 00 46 F0 E1 13
53 02 00 00 00 F6 4C 00 00 00 07 68 04 98 04 01
07 60 04 90 04 02 07 60 04 98 04 01 AC 08 00 00
00 9A 00 EF 15 0D 17 80 0E 01 AA 01 08 00 00 00
0C 69 59 F9 FF 1F 6D 08 00 00 00 EF 15 0D 17 80
51 02 0F 00 00 00 77 00 02 16 01 17 02 00 51 02
0E 00 00 00 25 00 F6 15 0D 17 02 00 51 02 0D 00
00 00 25 00 E8 15 1A 17 02 00 07 68 04 90 04 02
07 60 04 A0 04 01 51 02 0C 00 00 00 24 00 F4 15
21 17 00 00 51 02 0B 00 00 00 25 00 F0 15 2D 17
02 00 51 02 0A 00 00 00 25 00 04 16 24 17 02 00
07 70 04 90 04 02 07 68 04 98 04 01 AC 0A 00 00
00 98 00 2E 16 0F 17 80 0E 01 AA 01 0A 00 00 00
0C 69 59 F9 FF 1F 6D 0A 00 00 00 2E 16 0F 17 80
AC 09 00 00 00 98 00 0F 16 0C 17 80 0E 01 AA 01
09 00 00 00 0C 69 59 F9 FF 1F 6D 09 00 00 00 0F
16 0C 17 80 51 02 13 00 00 00 25 00 2E 16 FA 16
02 00 51 02 12 00 00 00 25 00 1E 16 0B 17 02 00
51 02 11 00 00 00 0B 01 0E 16 1F 17 00 00 51 02
10 00 00 00 25 00 17 16 16 17 02 00 59 01 00 00
00 06 52 6F 62 65 72 74 6F 6E 61 00 00 00 00 00
00 00 15 16 1E 17 75 01 00 00 00 FF FF 54 00 00
00 00 00 20 01 00 00 00 43 64 00 00 00 00 00 00
[/code]


I'm using this decompressor code: https://davnit.net/bnet/vL/index.php?topic=15601.msg157328#msg157328

This code is reliable? Do you have any others decompressor codes?
I'm using c# but I know others languages, if you have another code. In c++ would be good, so I could build a .dll to use in my C# program
February 15, 2008, 1:25 AM
Ringo
Looks good, but its braking at the end:
[code]
9C 04 14 10 69 00 00 00 10 00 A2 00 65 00 52 92
36 37 06 02

9D 06 1E 05 6A 00 00 00 00 08 00 00
00 11 00 82 00 65 84 08 30 C6 26 06 82 80 80 81
E1 3F

9D 06 20 07 6B 00 00 00 00 08 00 00 00 11
00 82 00 65 A4 0A 20 56 37 06 82 80 00 01 06 06
FF 01

23 00 08 00 00 00 01 00 00 FF FF FF FF

23 00 08 00 00 00 00 00 00 FF FF FF FF

1D 00 0F

1D 01 14

1D 02 14

1D 03 19

1E 07 00 37

1E 09 00 14

1E 0B 00 54

1D 0C 01

95 37 00 0A 00 15 00 00 00 00 00 00 00

03 00 FF 2A 44 46 01 00 46 F0 E1 13

53 02 00 00 00 F6 4C 00 00 00

07 68 04 98 04 01

07 60 04 90 04 02

07 60 04 98 04 01

AC 08 00 00 00 9A 00 EF 15 0D 17 80 0E 01

AA 01 08 00 00 00 0C 69 59 F9 FF 1F

6D 08 00 00 00 EF 15 0D 17 80

51 02 0F 00 00 00 77 00 02 16 01 17 02 00

51 02 0E 00 00 00 25 00 F6 15 0D 17 02 00

51 02 0D 00 00 00 25 00 E8 15 1A 17 02 00

07 68 04 90 04 02

07 60 04 A0 04 01

51 02 0C 00 00 00 24 00 F4 15 21 17 00 00

51 02 0B 00 00 00 25 00 F0 15 2D 17 02 00

51 02 0A 00 00 00 25 00 04 16 24 17 02 00

07 70 04 90 04 02

07 68 04 98 04 01

AC 0A 00 00 00 98 00 2E 16 0F 17 80 0E 01

AA 01 0A 00 00 00 0C 69 59 F9 FF 1F

6D 0A 00 00 00 2E 16 0F 17 80

AC 09 00 00 00 98 00 0F 16 0C 17 80 0E 01

AA 01 09 00 00 00 0C 69 59 F9 FF 1F

6D 09 00 00 00 0F 16 0C 17 80

51 02 13 00 00 00 25 00 2E 16 FA 16
02 00

51 02 12 00 00 00 25 00 1E 16 0B 17 02 00

51 02 11 00 00 00 0B 01 0E 16 1F 17 00 00

51 02 10 00 00 00 25 00 17 16 16 17 02 00

59 01 00 00 00 06 52 6F 62 65 72 74 6F 6E 61 00 00 00 00 00 00 00 15 16 1E 17

75 01 00 00 00 FF FF 54 00 00 00 00 00

20 01 00 00 00 43 64 00 00 00

00 00 00
[/code]
Those 3 0x00 bytes at the end will cause big problems, its probly due to sending 1 byte to many through the decompressor, or somthing of that nature.
I persioanly use this code, which is where most ports orginate from i would guess.
https://davnit.net/bnet/vL/index.php?topic=585.0
I would take a guess that your problem is with the compressed header (when its 2 bytes)
If the next clump is abit messed up, it would point to bad parseing of that header, leading to the next clump to be badly offseted and some of the header going into the decompressor and twisting the data.
February 15, 2008, 1:55 AM
lokis
Yeah, I'm noticing that. The last 0x00 bytes are nothing. this is just because my "logger" writes a whole line. If the packet ended before the line. It writes 0x00.

I've implemented a better logger now:

First packet: OK!
[code]Packet before decompression
E6 1F 7F FF FF FF C5 D0 DB B0 29 2B 52 52 19 0B
3F FF 82 18 6D CC 95 8B A1 99 B3 A1 BE 1B 70 22
8C 36 FB AF 77 B8 4B B8 4C B8 4D B8 4E B9 FB 87
38 6D C2 6D C1 F4 39 C3 6E 12 EE 0F A3 0B FE F7
F7 77 7B FB F7 7F C7 02 52 1F BF FF FF FF FF FF
FF FF FF FF FF FF F0 FB AD AD AD 90 15 B5 BC EE
40 72 02 40 56 D6 F3 BE B7 AD 90 12 03 EB 6B 6B
7F E4 07 D6 D6 D6 D6 D6 D6 FF FE 63 0D B8 C4 FC
E6 66 72 ED 1C AE D1 C9 F2 3A 84 51 25 41 85 A5
06 30 04 72 64 E0 54 8C D1 A0 D4 F9 A4 81 8C A8
EB 50 9B 9F 5C 0A 91 9A 34 00 8F 9A 48 18 CA 8D
75 A8 4D CF AE 05 48 CD 1A 0D 6F 9A 48 18 CA 8D
02 D4 26 E7 D7 02 A4 66 8D 06 C7 CD 24 0C 65 46
85 6A 13 73 EB 81 54 0D 1A 0D AF 9A 48 18 CB 1A
C5 21 24 49 42 B8 00 00 00 00 00 00 00 00 00 00
C5 21 24 49 42


Packets after decompression
8F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 59 1B 00 00 00 05 42 69 67 4D 61 63 00 00 00
00 00 00 00 00 00 00 00 00 00 00 AA 00 1B 00 00
00 0C 69 59 F9 FF 1F 76 00 1B 00 00 00 94 08 1B
00 00 00 00 00 01 02 00 01 01 00 01 D9 00 01 DA
00 01 DB 00 01 DC 00 01 03 00 01 22 00 00 1B 00
00 00 DB 00 01 CB 00 22 00 00 1B 00 00 00 D9 00
01 CB 00 5E 01 00 00 00 00 00 00 01 00 01 00 00
00 00 01 01 01 01 00 01 00 00 00 00 01 00 00 00
01 01 00 00 00 00 00 00 77 28 06 00 00 00 00 00
01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
29 00 00 00 80 00 80 00 80 00 A0 00 80 00 80 00
00 00 20 00 A0 00 00 00 A0 00 A0 00 80 00 80 00
00 00 20 00 00 00 80 00 00 00 80 00 A0 00 A0 00
00 00 00 00 80 00 80 00 80 00 00 00 00 00 00 00
00 00 A0 00 00 00 00 00 80 00 80 00 80 00 80 00
80 00 80 00 00 00 00 00 00 00 00 00 00 00 00 00
00 0B 00 1B 00 00 00 5F 01 00 00 00 1D 00 0F 1D
01 14 1D 02 14 1D 03 19 1E 07 00 37 1E 09 00 14
1E 0B 00 54 1D 0C 01 9C 0E 14 10 70 01 00 00 10
00 A2 00 65 08 00 80 06 17 03 02 9C 0E 14 10 71
01 00 00 10 00 A2 00 65 08 02 80 06 17 03 02 9C
0E 14 10 72 01 00 00 10 00 A2 00 65 08 04 80 06
17 03 02 9C 0E 14 10 73 01 00 00 10 00 A2 00 65
08 06 80 06 17 03 02 9C 04 14 10 74 01 00 00 10
00 A2 00 65 00 72 42 37 37 06 02 00 00 00 00 00

Parsing
Packet [0x8F]
8F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Packet [0x59]
59 1B 00 00 00 05 42 69 67 4D 61 63 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Packet [0xAA]
AA 00 1B 00 00 00 0C 69 59 F9 FF 1F
Packet [0x76]
76 00 1B 00 00 00
Packet [0x94]
94 08 1B 00 00 00 00 00 01 02 00 01 01 00 01 D9 00 01 DA 00 01 DB 00 01 DC 00 01 03 00 01
Packet [0x22]
22 00 00 1B 00 00 00 DB 00 01 CB 00
Packet [0x22]
22 00 00 1B 00 00 00 D9 00 01 CB 00
Packet [0x5E]
5E 01 00 00 00 00 00 00 01 00 01 00 00 00 00 01 01 01 01 00 01 00 00 00 00 01 00 00 00 01 01 00 00 00 00 00 00 77
Packet [0x0B]
0B 00 1B 00 00 00
Packet [0x5F]
5F 01 00 00 00
Packet [0x1D]
1D 00 0F
Packet [0x1D]
1D 01 14
Packet [0x1D]
1D 02 14
Packet [0x1D]
1D 03 19
Packet [0x1E]
1E 07 00 37
Packet [0x1E]
1E 09 00 14
Packet [0x1E]
1E 0B 00 54
Packet [0x1D]
1D 0C 01
Packet [0x9c]
9C 0E 14 10 70 01 00 00 10 00 A2 00 65 08 00 80 06 17 03 02
Packet [0x9c]
9C 0E 14 10 71 01 00 00 10 00 A2 00 65 08 02 80 06 17 03 02
Packet [0x9c]
9C 0E 14 10 72 01 00 00 10 00 A2 00 65 08 04 80 06 17 03 02
Packet [0x9c]
9C 0E 14 10 73 01 00 00 10 00 A2 00 65 08 06 80 06 17 03 02
Packet [0x9c]
9C 04 14 10 74 01 00 00 10 00 A2 00 65 00 72 42 37 37 06 02
[/code]

Second packet: OK!
[code]Packet before decompression
F1 6D 02 A8 1A 34 1B 9F 34 90 31 96 54 02 02 40
92 85 70 2C 85 43 03 7B F0 DB 9A C7 98 CA 01 91
92 C1 C8 78 84 79 5A B4 78 0A 42 80 16 42 76 88
70 7E 1B 73 58 F3 19 40 DA 43 B2 B0 92 84 79 5B
74 28 5B 70 EA 1B 77 DB 6D B6 C3 A8 6D FB 6D B6
D9 CC CC E5 DA 39 5D A3 93 E4 75 08 A2 4A 83 0B
4A 0C 60 08 E4 C9 CB A2 4D 25 3F F3 F6 C3 F1 4C
54 78 A8 45 05 26 45 B3 FC 81 2A 74 4A 90 0F E8
1D 10 C6 80 B8 81 74 43 1A 01 FD 03 82 34 7C 09
C2 EA 76 8D D6 91 9C 10 BA 3E 64 AC 5D 0C CD 9D
2C 47 C2 EA 76 8D D6 9E 2E 67 C7 0A E6 CE 6E BC
F1 72 37 24 C3 22 74 A6 EB CF 17 4B C9 32 25 39
20 DD 7A 25 48 0B 88 17 44 31 A0 20 10 39 E2 E6
5C 3B 86 24 E1 C1 BE 78 B9 8F 24 C8 A4 E2 11 BA
F3 C5 D2 72 4D 01 B0 76 6E BD 10 D4 80 B8 81 74
4A 90 0F E8 1C 11 A4 E3 FC 43 36 33 37 5A 46 70
42 E9 39 92 B1 74 33 36 74 B1 27 10 CD 8C CD D6
82 33 0E 3F CC CD 8C 8D D6 91 9C 10 B9 87 32 56
2E 86 66 CE 96 18 73 33 63 23 75 A7 8B B3 C9 31
0C D8 33 9B 2F 3C 5D 37 24 D4 1B 18 9B AF 3C 5C
D7 98 B9 18 D8 E8 DF 3C 5C D3 92 66 E6 C6 C6 EB
C5 D7 E8 4A 83 49 60 65 1A C6 D1 A4 68 19 3F A7
36 50 6E 37 3F 6D B0 05 F3 B7 E4 F2 D7 F1 D1 3B
36 50 6E 37 3F 6D B0 05 F3 B7 E4


Packets after decompression
9C 04 14 10 75 01 00 00 10 00 A2 00 65 00 52 92
36 37 06 02 9D 06 1E 05 76 01 00 00 00 1B 00 00
00 11 00 82 00 65 84 08 30 C6 26 06 82 80 80 81
E1 3F 9D 06 20 07 77 01 00 00 00 1B 00 00 00 11
00 82 00 65 A4 0A 20 56 37 06 82 80 00 01 06 06
FF 01 23 00 1B 00 00 00 01 00 00 FF FF FF FF 23
00 1B 00 00 00 00 00 00 FF FF FF FF 1D 00 0F 1D
01 14 1D 02 14 1D 03 19 1E 07 00 37 1E 09 00 14
1E 0B 00 54 1D 0C 01 95 37 00 0A 00 15 00 00 00
00 00 00 00 03 00 FF 2A 44 46 01 00 46 F0 E1 13
53 03 00 00 00 A2 52 00 00 00 07 68 04 98 04 01
07 60 04 90 04 02 07 60 04 98 04 01 AC 08 00 00
00 9A 00 EE 15 14 17 80 0E 01 AA 01 08 00 00 00
0C 69 59 F9 FF 1F 6D 08 00 00 00 EE 15 14 17 80
51 02 0F 00 00 00 77 00 02 16 01 17 02 00 51 02
0E 00 00 00 25 00 F6 15 0D 17 02 00 51 02 0D 00
00 00 25 00 E8 15 1A 17 02 00 07 68 04 90 04 02
07 60 04 A0 04 01 51 02 0C 00 00 00 24 00 F4 15
21 17 00 00 51 02 0B 00 00 00 25 00 F0 15 2D 17
02 00 51 02 0A 00 00 00 25 00 04 16 24 17 02 00
07 70 04 90 04 02 07 68 04 98 04 01 AC 0A 00 00
00 98 00 2E 16 0F 17 80 0E 01 AA 01 0A 00 00 00
0C 69 59 F9 FF 1F 6D 0A 00 00 00 2E 16 0F 17 80
AC 09 00 00 00 98 00 0F 16 0C 17 80 0E 01 AA 01
09 00 00 00 0C 69 59 F9 FF 1F 6D 09 00 00 00 0F
16 0C 17 80 51 02 13 00 00 00 25 00 2E 16 FA 16
02 00 51 02 12 00 00 00 25 00 1E 16 0B 17 02 00
51 02 11 00 00 00 0B 01 0E 16 1F 17 00 00 51 02
10 00 00 00 25 00 17 16 16 17 02 00 59 01 00 00
00 06 52 6F 62 65 72 74 6F 6E 61 00 00 00 00 00
00 00 15 16 1E 17 75 01 00 00 00 FF FF 54 00 00
00 00 00 20 01 00 00 00 43 64 00 00 00 00 00 00


Parsing
Packet [0x9c]
9C 04 14 10 75 01 00 00 10 00 A2 00 65 00 52 92 36 37 06 02
Packet [0x9d]
9D 06 1E 05 76 01 00 00 00 1B 00 00 00 11 00 82 00 65 84 08 30 C6 26 06 82 80 80 81 E1 3F
Packet [0x9d]
9D 06 20 07 77 01 00 00 00 1B 00 00 00 11 00 82 00 65 A4 0A 20 56 37 06 82 80 00 01 06 06 FF 01
Packet [0x23]
23 00 1B 00 00 00 01 00 00 FF FF FF FF
Packet [0x23]
23 00 1B 00 00 00 00 00 00 FF FF FF FF
Packet [0x1D]
1D 00 0F
Packet [0x1D]
1D 01 14
Packet [0x1D]
1D 02 14
Packet [0x1D]
1D 03 19
Packet [0x1E]
1E 07 00 37
Packet [0x1E]
1E 09 00 14
Packet [0x1E]
1E 0B 00 54
Packet [0x1D]
1D 0C 01
Packet [0x95]
95 37 00 0A 00 15 00 00 00 00 00 00 00
Packet03
03 00 FF 2A 44 46 01 00 46 F0 E1 13
Packet [0x53]
53 03 00 00 00 A2 52 00 00 00
Packet [0x07]
07 68 04 98 04 01
Packet [0x07]
07 60 04 90 04 02
Packet [0x07]
07 60 04 98 04 01
Packet [0xAC]
AC 08 00 00 00 9A 00 EE 15 14 17 80 0E 01
Packet [0xAA]
AA 01 08 00 00 00 0C 69 59 F9 FF 1F
Packet [0x6D]
6D 08 00 00 00 EE 15 14 17 80
Packet [0x51]
51 02 0F 00 00 00 77 00 02 16 01 17 02 00
Packet [0x51]
51 02 0E 00 00 00 25 00 F6 15 0D 17 02 00
Packet [0x51]
51 02 0D 00 00 00 25 00 E8 15 1A 17 02 00
Packet [0x07]
07 68 04 90 04 02
Packet [0x07]
07 60 04 A0 04 01
Packet [0x51]
51 02 0C 00 00 00 24 00 F4 15 21 17 00 00
Packet [0x51]
51 02 0B 00 00 00 25 00 F0 15 2D 17 02 00
Packet [0x51]
51 02 0A 00 00 00 25 00 04 16 24 17 02 00
Packet [0x07]
07 70 04 90 04 02
Packet [0x07]
07 68 04 98 04 01
Packet [0xAC]
AC 0A 00 00 00 98 00 2E 16 0F 17 80 0E 01
Packet [0xAA]
AA 01 0A 00 00 00 0C 69 59 F9 FF 1F
Packet [0x6D]
6D 0A 00 00 00 2E 16 0F 17 80
Packet [0xAC]
AC 09 00 00 00 98 00 0F 16 0C 17 80 0E 01
Packet [0xAA]
AA 01 09 00 00 00 0C 69 59 F9 FF 1F
Packet [0x6D]
6D 09 00 00 00 0F 16 0C 17 80
Packet [0x51]
51 02 13 00 00 00 25 00 2E 16 FA 16 02 00
Packet [0x51]
51 02 12 00 00 00 25 00 1E 16 0B 17 02 00
Packet [0x51]
51 02 11 00 00 00 0B 01 0E 16 1F 17 00 00
Packet [0x51]
51 02 10 00 00 00 25 00 17 16 16 17 02 00
Packet [0x59]
59 01 00 00 00 06 52 6F 62 65 72 74 6F 6E 61 00 00 00 00 00 00 00 15 16 1E 17
Packet [0x75]
75 01 00 00 00 FF FF 54 00 00 00 00 00
Packet [0x20]
20 01 00 00 00 43 64 00 00 00[/code]

Third packet: ERROR! He tries to read a 0x2E packet!!!
[code]
Packet before decompression
32 56 2E 86 66 CE 96 31 C4 23 61 0C DD 68 23 43
C0 A4 D8 D8 39 37 5A 46 70 42 E8 79 92 B1 74 33
36 74 B1 0F 36 36 0E 4D D6 9E 2E C7 1E 1C EC D8
40 37 C1 1A 0E 60 E7 66 C1 F1 BA D2 33 82 17 41
40


Packets after decompression
69 59 F9 FF 1F 6D 05 00 00 00 2D 16 2E 17 80 AC
06 00 00 00 9B 00 16 16 22 17 80 0E 01 AA 01 06
00 00 00 0C 69 59 F9 FF 1F 6D 06 00 00 00 16 16
22 17 80 51 02 05 00 00 00 81 01 20 16 2B 17 00


Parsing
Packet [0x69]
69 59 F9 FF 1F 6D 05 00 00 00 2D 16

Here it tryes to read a packet 0x2E, that doesn't exist
[/code]

[Kp edit: killed long lines that broke the table layout.  Learn to use line breaks in your hex dumps.]
February 15, 2008, 2:43 AM
Ringo
Looks like your 2nd compressed packet isnt all there.
I take it your not buffering any broken TCP packets?
When you recv compressed data, call GamePacketSize(), if the lengh of the data is under returned lengh + returned offset then wait for more data
other wise you have all the compressed message and can decompress it.
And just keep on doing that, making sure all the data is there before decompressing -- other wise you will start "as new" in the middle of a compressed packet, which was causeing the twisted data:
[code]
69 59 F9 FF 1F 6D 05 00 00 00 2D 16 2E 17 80 AC
06 00 00 00 9B 00 16 16 22 17 80 0E 01 AA 01 06
00 00 00 0C 69 59 F9 FF 1F 6D 06 00 00 00 16 16
22 17 80 51 02 05 00 00 00 81 01 20 16 2B 17 00


69 59 F9 FF 1F <-- twisted

6D 05 00 00 00 2D 16 2E 17 80 <-- 0x6D

...

[/code]
February 15, 2008, 3:07 AM
lokis
Thanks for the help, Now I know what's the problem. I'll try to fix :D

Yeah, you are right, there was a mistake when I receive the packets... Apparently I received 4 compressed packets in 1 packet.
So, I would have a 1400+ lengh packet and I treated it as only 1 packet, and forgot the rest.
I'm fixing it now, thanks :D
February 15, 2008, 3:19 AM
Ringo
Great :)

[quote author=Ringo link=topic=17321.msg176384#msg176384 date=1203032432]
[Kp edit: killed long lines that broke the table layout.  Learn to use line breaks in your hex dumps.]
[/quote]
I thought  code tags automaticly word wraped, at least it does for me on the YaBB SE Theme, thats why i put new lines between hex dumps. What theme are you useing?
I noticed it doesnt in quote tags tho, is there a wordwrap tag or somthing we should know about?

February 15, 2008, 7:40 AM
Barabajagal
Kp, Fix your theme.
February 15, 2008, 9:01 PM
HdxBmx27
https://addons.mozilla.org/en-US/firefox/addon/2108
[code]
@-moz-document domain("forum.valhallalegends.com") {
  .code{
    width: 100%;
    height: 100px;
    overflow: auto !important;
  }
}[/code]
February 15, 2008, 11:04 PM
Kp
Code tags are specifically for preventing reformatting, so that the layout of your code comes through intact.  That does not justify posting ugly code.

It doesn't make sense to require that everyone who views the thread should reconfigure their theme and/or browser to deal with one person breaking the table.  It's better to not break the table in the first place, and fix it when someone does break it.

Hdx: not everyone here uses a browser that accepts that CSS override.
February 16, 2008, 5:02 PM
Barabajagal
It doesn't make sense to use a theme that has poorly written CSS.
February 17, 2008, 1:38 AM
Ringo
[quote author=Kp link=topic=17321.msg176425#msg176425 date=1203181348]
It doesn't make sense to require that everyone who views the thread should reconfigure their theme and/or browser to deal with one person breaking the table.[/quote]
I think your the only persion who sees broken tables?
People use differnt screen sizes, so its unavoidable.
I also tryed every single theme and none of them brake the tables with code tags.
I would rather not bother posting at all, if it means i have to fix lines all the time.
Cut the attitude and add word wrap tags if it bothers you that much.  ::)
February 17, 2008, 1:53 AM
Kp
I'm the only one who reports broken tables.  I don't use any themes.  It's not unreasonable to ask that people avoid breaking the table in a fullscreen browser on a reasonably modern monitor.  I used to reformat their code, but no one ever learned, so I started deleting the offending lines.  That's less work for me and it encourages people to cut it out so that their posts don't get cut up.

Incidentally, I only consider a table "broken" when I need to scroll sideways to read the post.  I don't bother with fixing code blocks that only squeeze the author column into a narrow band.

IMO, if you're constantly having to fix lines so that you don't break the tables, you're doing something wrong.  I run my editor with word wrapping (and thus don't need to insert newlines at window boundaries) and yet I've never needed to reformat my code to make it not break the layout here.
February 17, 2008, 6:08 PM
Barabajagal
If you're viewing this forum in a web browser, you're using a theme.
February 17, 2008, 7:25 PM
Explicit[nK]
I see broken tables, too. I just didn't feel the need to point it out since I regard it as a minor inconvenience.
February 17, 2008, 7:27 PM
Barabajagal
What Theme are you using, Explicit?
February 17, 2008, 7:29 PM
Explicit[nK]
I'm now using the forum default, Helios_Multi. I had the classic YaBB originally and was wondering why it destroyed the tables, but eh.

It was actually my browser's settings on my end. I just set it back to the default settings and adjusted them to my specifications, and that seemed to have remedied it.
February 17, 2008, 8:12 PM
Kp
Andy: if you want to argue the point, I am using the theme that was automatically selected when the forum gained the ability to do multiple themes.  I never chose one explicitly.
February 17, 2008, 8:34 PM
Barabajagal
I'm not saying it's your fault that the problem exists in the YaBB theme. I'm saying it's your fault for not fixing the root of your problem. You're trying to correct the symptom, not the disease.
February 17, 2008, 9:15 PM
Spht
I think it depends on the browser, not the theme.  I tried out all themes on Firefox 2.0.0.12 and it puts a horizontal scroll bar on the div frame itself, and not the entire page
February 17, 2008, 9:29 PM
Barabajagal
Ya, looks like IE is just lame for most things... But I'm not seeing the code tag break tables on IE or FF using any of the themes.
February 17, 2008, 9:33 PM
Kp
[quote author=Andy link=topic=17321.msg176479#msg176479 date=1203284011]
Ya, looks like IE is just lame for most things... But I'm not seeing the code tag break tables on IE or FF using any of the themes.
[/quote]

That's because I addressed the disease.  I applied Hdx's change to the stylesheet for the main theme.  It may have affected other themes.
February 18, 2008, 12:53 AM
Barabajagal
Oh, good! Glad to hear it. I don't think any of the other themes were originally affected anyway.
February 18, 2008, 2:53 AM
Ringo
Nice1, problem solved then? :P
February 18, 2008, 9:40 AM

Search