[Help] Messaging packet version 5630+

02/07/2013 20:03 Super Aids#16
Are you writing TQServer at the end of the packet?
02/07/2013 21:04 diedwarrior#17
Specifying offsets is easy at small packets, but it tends to be a pain in the ass in very large packets.
02/07/2013 21:32 Super Aids#18
Quote:
Originally Posted by diedwarrior View Post
Specifying offsets is easy at small packets, but it tends to be a pain in the ass in very large packets.
Make a parser for it then like you paste the structure in a textfile, let's a program parse that file and spit out the structure with valid c# code. :D
02/07/2013 21:45 JobvdH#19
Quote:
Originally Posted by Super Aids View Post
Are you writing TQServer at the end of the packet?
As you can see in my dump: Yes.
[Only registered and activated users can see links. Click Here To Register...]

I write it behind every packet, encrypt it and send it to the socket system
02/07/2013 21:46 Lateralus#20
I much prefer specifying offsets explicitly rather than using a stream, especially when you have a packet with a lot of unknowns.
02/07/2013 21:49 Adventure-MMO#21
JobvdH you have last packet sniffer 56700+?
02/07/2013 21:51 JobvdH#22
Ehh no if I would have it wouldn't make this thread heh?
02/08/2013 00:14 nTL3fTy#23
Quote:
Originally Posted by JobvdH View Post
As you can see in my dump: Yes.
[Only registered and activated users can see links. Click Here To Register...]

I write it behind every packet, encrypt it and send it to the socket system
If I recall, the size written in the packet shouldn't include the TQServer at end. Obviously your buffer needs enough room, but 0x49 should be the size of the packet without the TQServer (0x41).
02/08/2013 03:01 Super Aids#24
Quote:
Originally Posted by nTL3fTy View Post
If I recall, the size written in the packet shouldn't include the TQServer at end. Obviously your buffer needs enough room, but 0x49 should be the size of the packet without the TQServer (0x41).
This is correct ^.
02/08/2013 09:52 JobvdH#25
So that means remove 8 length from the packet.
And when I send the packet to the sockets I should add TQServer and add 8 bytes to the array?
02/08/2013 11:02 Super Aids#26
Yes.

This is how I do it:
Code:
				using (var sendPacket = new DataPacket(new byte[Packet.BufferLength + 8]))
				{
					sendPacket.WriteBytes(Packet.Copy(), 0);
					sendPacket.WriteString("TQServer", sendPacket.BufferLength - 8);
					NetworkClient.Send(sendPacket);
				}
02/08/2013 13:32 _DreadNought_#27
You should modify it so you don't have to manually specify +/- 8 in the length for the bytes

Or even just have a method sendPacket.Seal();

Just seems alot less messy imo
02/08/2013 16:24 Super Aids#28
Quote:
Originally Posted by _DreadNought_ View Post
You should modify it so you don't have to manually specify +/- 8 in the length for the bytes

Or even just have a method sendPacket.Seal();

Just seems alot less messy imo
Doesn't really matter if I do it in a "Seal method" or in the send method.
02/09/2013 21:06 _DreadNought_#29
Just thought it looks messy lol
02/09/2013 21:51 Super Aids#30
How do you find 3 lines messy? Or rather 2 lines.