issy123 / agario-protocol

Protocol for agar.io version 2.1.5
8 stars 2 forks source link

Packet 255 #11

Open wishstorage opened 8 years ago

wishstorage commented 8 years ago

Does anybody know about this packet!?

terjanq commented 8 years ago

Yes, 255,33,0,0,0,X

It is a viewarea offset.

first packet 255,43 It is a viewarea offset (when cell not spawned yet) and server version

Whats more? Cells update info (packet 16 before update)

wishstorage commented 8 years ago

thanks. Its enough for me now )

wishstorage commented 8 years ago

And what server version now?

wishstorage commented 8 years ago

For example, I have this packet:

ff:2b // this is 255, 43 00:00:00:f0:1c // what is it?

40:ab:ae:1f:30:97:01:b3 // i think it min_x c0:c8:7a:c5:0a:12:2e:b1 // min_y c0:2a:79:0e:c4:45:1e:c2 // max_x 40:1c:93:bb:56:08:08:c3 // max_y

40:08:00:00:00:32:2e:31:2e:36:00 // (sometimes i get 40:00:00:00:00:32:2e:31:2e:36:00 ) what is it?

mb1969 commented 8 years ago

Lets assume FF:2B:00:00:00:F0:1C

0xFF is a packet id 0x2B00 is a length (total bytes +/- x) (little endian) 0x0000 ?? never saw any other values , length could also be int32 (not sure)

0xF0 is a (sub)-packet id 0x1C is a length

issy123 commented 8 years ago

Guys great work investigating!
But let's keep values in decimals. 1byte unsigned int decimals 0-255. So everyone speaks the same language.

wishstorage commented 8 years ago

ok )

wishstorage commented 8 years ago

Resume: 255 - packet_id 43 - packet length 0 - delimeter or smth else 240 - sub_packet_id 28 - subpacket length Right!?

mb1969 commented 8 years ago

@wishstorage

Here's a small 255 packet I received:

00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
--------------------------------------------------------------------------------------------------------------------
FF-20-00-00-00-F0-11-10-00-00-04-E9-3F-E9-99-ED-FF-FF-98-07-00-00-20-00-08-6E-61-6D-65-31-32-33-00-00-00-00-00-00-00
^^ ^^^^^ ?? ?? ^^ ^^ ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ^^^^^^^^^^^^^^^^^^^^ ?? ?? ?? ?? ?? ?? ??
I1 L1          I2 L2                                                       Cellname (name123)

Total packet length L = 38 byte L1 = 32 = L-6 L2 = 17 = L1-15

My cell was named "name123", starting at index 24

Can anyone confirm with your 255 packets? Any ideas about the "?"-positions?

wishstorage commented 8 years ago

It looks like cells update info (packet 16 before update)

mb1969 commented 8 years ago

That makes sense. So the first 7 bytes are just a prefix for old version protocol packets?

mb1969 commented 8 years ago

After byte 255 the first int16 or int32 correlates with the packet length. If the total packet length grows that integer grows also. But the equation above L1 = L-6 doesnt hold. It seems to depend on the next 2 bytes. I thought that they are a subpacketid and a length. I see different "subpacktids" 240-246. I have to check that first what makes sense.

After these 7 header bytes old style protocol follows in a modified way,

Barbosik commented 8 years ago

It's compressed envelope for any message. This message may contains any other message in compressed form.