• Welcome to Valhalla Legends Archive.
 

Receiving 0x25 an 0x50 at the same time..

Started by Jaquio, May 03, 2006, 01:31 AM

Previous topic - Next topic

Jaquio


------wskBNet_DataArrival------
Data:ÿ% »-ÿPf     [a...Œ¾JÌb ØpÖ½ ÆIX86ver0.mpq A=1481262565 B=1172659121 C=1538349130 4 A=A+S B=B-C C=C+A A=A+B
Hexed: FF 25 08 00 0B 08 BB 2D FF 50 66 00 00 00 00 00 5B 61 85 8C BE 4A CC 62 20 D8 70 D6 BD 0C C6 01 49 58 38 36 76 65 72 30 2E 6D 70 71 00 41 3D 31 34 38 31 32 36 32 35 36 35 20 42 3D 31 31 37 32 36 35 39 31 32 31 20 43 3D 31 35 33 38 33 34 39 31 33 30 20 34 20 41 3D 41 2B 53 20 42 3D 42 2D 43 20 43 3D 43 2B 41 20 41 3D 41 2B 42 00
Bytes Total:110
------wskBNet_DataArrival------


See that? I am receiving 0x25 a 0x50 at the same time, so therefore I cannot parse anything correctly..

Is there a way at all I could fix that, I have tried a few attempts but it sorta made it worse an made it get stuck in other places..

Here is what I have tried..


  • Spliting the hex by 0xFF, but what if the data contains more then one 0x0FF I am screwed?
  • Sending 0x50 when I receive 0x25, but not sure if that is a good idea?

I didn't have this problem before why now? I did this just as I did my other bot(It's old an outdated needed to start anew). Not sure why it's happening.. Any ideas as to what could cause this?[/li]

MyndFyre

Are you using a data reader (or what some people call (arguably) incorrectly) a "debuffer"?  (The reason I say it's incorrect is because it entirely misses the point of what a buffer is)?  If so, use that to parse every packet and then read the data in a stream fashion.

Just keep looping as long as your buffer has more data.
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.


Sorc.Polgara

Quote from: MyndFyre[vL] on May 03, 2006, 02:04 AM
Are you using a data reader (or what some people call (arguably) incorrectly) a "debuffer"?  (The reason I say it's incorrect is because it entirely misses the point of what a buffer is)?  If so, use that to parse every packet and then read the data in a stream fashion.

Just keep looping as long as your buffer has more data.
Meh, I've actually recently started writing a bot with a GUI in C++ (No MFC) and I just reached the point where I'll be implementing this.

rabbit

Jaquio, Battle.Net packets have length markers in the headers for a reason ;)
Grif: Yeah, and the people in the red states are mad because the people in the blue states are mean to them and want them to pay money for roads and schools instead of cool things like NASCAR and shotguns.  Also, there's something about ketchup in there.

Jaquio

Quote from: rabbit on May 03, 2006, 03:53 PM
Jaquio, Battle.Net packets have length markers in the headers for a reason ;)

Yea.. I not sure why I didn't use it. Feel sorta dumb now, :P, anyways thanks everyone. :)

Sorc.Polgara

Quote from: MyndFyre[vL] on May 03, 2006, 02:04 AM
Are you using a data reader (or what some people call (arguably) incorrectly) a "debuffer"?  (The reason I say it's incorrect is because it entirely misses the point of what a buffer is)?

... just spent an hour modifying and renaming my C++ packet buffer and packet "debuffer" classes to DataBuffer and DataReader >_<;

MyndFyre

QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

Sorc.Polgara

#8
Quote from: MyndFyre[vL] on May 04, 2006, 09:37 PM
Renaming them took an hour?
Well... I added a couple of functions to the DataReader and I also went through and changed everything to use hungarian notation... that required some time... since everything was using Java naming conventions.

Jaquio

Quote from: Sorc.Polgara on May 04, 2006, 11:28 PM
Quote from: MyndFyre[vL] on May 04, 2006, 09:37 PM
Renaming them took an hour?
Well... I added a couple of functions to the DataReader and I also went through and changed everything to use hungarian notation... that required some time... since everything was using Java naming conventions.

Well see, you didn't mention that before.  :P

How was MyndFyre to know, lol.


raylu

Quote from: Sorc.Polgara on May 04, 2006, 11:28 PM
Quote from: MyndFyre[vL] on May 04, 2006, 09:37 PM
Renaming them took an hour?
Well... I added a couple of functions to the DataReader and I also went through and changed everything to use hungarian notation... that required some time... since everything was using Java naming conventions.
Find...and...replace?
Pie?