Packets can be stopped?

Forum closed. All further discussion to be discussed at https://github.com/OpenKore/

Moderator: Moderators

Message
Author
Kaspy
Halfway to Eternity
Halfway to Eternity
Posts: 398
Joined: 08 Jun 2012, 15:42
Noob?: No
Location: Brazil

Packets can be stopped?

#1 Post by Kaspy »

In a plugin I'm creating, I'm realizing download the emblems of guilds of players who are near to the BOT.

The problem is that in most cases the emblems downloaded by OpenKore is incomplete. Ie not realize all data while conducting download.
I believe that this is caused by the high size of certain emblems that even compressed by zLib, still very heavy.
I believe that this is caused by a security measure OpenKore, which stops the packets that are too large.
If it does exist, where is the command that does this? For so I can make an exception


You may have other reasons for this problem. If you have any better ideas, please tell.
Image

EternalHarvest
Developers
Developers
Posts: 1798
Joined: 05 Dec 2008, 05:42
Noob?: Yes

Re: Packets can be stopped?

#2 Post by EternalHarvest »

Guild emblem packets are probably sent in several pieces, but that should be handled transparently by MessageTokenizer. There should be no truncating of "too large" packets.

Can you compare related data in openkore's debug mode and WPE/Wireshark?

Kaspy
Halfway to Eternity
Halfway to Eternity
Posts: 398
Joined: 08 Jun 2012, 15:42
Noob?: No
Location: Brazil

Re: Packets can be stopped?

#3 Post by Kaspy »

EternalHarvest wrote:Guild emblem packets are probably sent in several pieces, but that should be handled transparently by MessageTokenizer. There should be no truncating of "too large" packets.

Can you compare related data in openkore's debug mode and WPE/Wireshark?
Thanks for the suggestion, really well.

I used the Microsoft Network Monitor 3.4 in bRO and I obtained the following results:

Image
Packat main the guild_emblem: 52 01 A9 05 C2 3D 00 00 01 00 00 00
Continued: http://pastebin.com/tufJEBpa

I think not, but if you already have some in native OpenKore who perform the interpretation of packages that are partitioned, as emblems of this case? To serve as an example for my case.
Image

EternalHarvest
Developers
Developers
Posts: 1798
Joined: 05 Dec 2008, 05:42
Noob?: Yes

Re: Packets can be stopped?

#4 Post by EternalHarvest »

KeplerBR wrote:I think not, but if you already have some in native OpenKore who perform the interpretation of packages that are partitioned, as emblems of this case? To serve as an example for my case.
EternalHarvest wrote:that should be handled transparently by MessageTokenizer
The whole MessageTokenizer class does just that, and not much more. It's irrelevant whether a packet is an emblem packet or any other on that level. PacketParser, server types etc don't care about underlying byte stream details, they operate on discrete RO protocol messages.

Kaspy
Halfway to Eternity
Halfway to Eternity
Posts: 398
Joined: 08 Jun 2012, 15:42
Noob?: No
Location: Brazil

Re: Packets can be stopped?

#5 Post by Kaspy »

Since it the package is handled by MessageTokenizer, so no matter whether it is partitioned or not, because the emblem is partially saved by OpenKore?

Image
Plugin: http://pastebin.com/ksTmkfcx

PS: The image obtained by OpenKore was still compressed by zLib and, if he tried to decompress it, would not succeed because it is incomplete.
Image

EternalHarvest
Developers
Developers
Posts: 1798
Joined: 05 Dec 2008, 05:42
Noob?: Yes

Re: Packets can be stopped?

#6 Post by EternalHarvest »

"emblem" is unpacked as "Z*" in "guild_emblem" (in ServerType file). Try "a*" there instead.

Kaspy
Halfway to Eternity
Halfway to Eternity
Posts: 398
Joined: 08 Jun 2012, 15:42
Noob?: No
Location: Brazil

Re: Packets can be stopped?

#7 Post by Kaspy »

THANK YOU. This solved the problem the problem! Now, it is always successful in unpacking the emblems.

With some more details, I will publish the official SVN plugin in and fix this packet, oky?
Image

EternalHarvest
Developers
Developers
Posts: 1798
Joined: 05 Dec 2008, 05:42
Noob?: Yes

Re: Packets can be stopped?

#8 Post by EternalHarvest »

Yes, do that. Don't forget to change guild_emblem in all servertypes, and this can be done in separate commit too.

Kaspy
Halfway to Eternity
Halfway to Eternity
Posts: 398
Joined: 08 Jun 2012, 15:42
Noob?: No
Location: Brazil

Re: Packets can be stopped?

#9 Post by Kaspy »

It was pretty tricky, but here's the plugin.
He downloads the emblems, decompresses the zLib, removes the color pink and saves.

http://pastebin.com/gND2zGKX

Honestly, I thought it was horrible to part of remove the color pink, but do not know how to improve. Somehow, it works, but in a few cases, resulting in error messages like the one below

Image
Image

Kaspy
Halfway to Eternity
Halfway to Eternity
Posts: 398
Joined: 08 Jun 2012, 15:42
Noob?: No
Location: Brazil

Re: Packets can be stopped?

#10 Post by Kaspy »

Image

Locked