Author | Message | Time |
---|---|---|
Jaquio | [code] ------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------ [/code] 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.. [list] [li]Spliting the hex by 0xFF, but what if the data contains more then one 0x0FF I am screwed?[/li] [li]Sending 0x50 when I receive 0x25, but not sure if that is a good idea?[/li] [/list] 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] | May 3, 2006, 6:31 AM |
Myndfyr | 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. | May 3, 2006, 7:04 AM |
laurion | [Credits to Joe] https://davnit.net/bnet/vL/index.php?topic=13294.0 | May 3, 2006, 10:48 AM |
bethra | [quote author=MyndFyre[vL] link=topic=14925.msg151876#msg151876 date=1146639855] 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. [/quote]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. | May 3, 2006, 8:08 PM |
rabbit | Jaquio, Battle.Net packets have length markers in the headers for a reason ;) | May 3, 2006, 8:53 PM |
Jaquio | [quote author=rabbit link=topic=14925.msg151909#msg151909 date=1146689603] Jaquio, Battle.Net packets have length markers in the headers for a reason ;) [/quote] Yea.. I not sure why I didn't use it. Feel sorta dumb now, :P, anyways thanks everyone. :) | May 3, 2006, 9:00 PM |
bethra | [quote author=MyndFyre[vL] link=topic=14925.msg151876#msg151876 date=1146639855] 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)?[/quote] ... just spent an hour modifying and renaming my C++ packet buffer and packet "debuffer" classes to DataBuffer and DataReader >_<; | May 5, 2006, 2:28 AM |
Myndfyr | Renaming them took an hour? | May 5, 2006, 2:37 AM |
bethra | [quote author=MyndFyre[vL] link=topic=14925.msg152000#msg152000 date=1146796663] Renaming them took an hour? [/quote]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. | May 5, 2006, 4:28 AM |
Jaquio | [quote author=Sorc.Polgara link=topic=14925.msg152007#msg152007 date=1146803286] [quote author=MyndFyre[vL] link=topic=14925.msg152000#msg152000 date=1146796663] Renaming them took an hour? [/quote]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. [/quote] Well see, you didn't mention that before. :P How was MyndFyre to know, lol. | May 5, 2006, 5:32 AM |
warz | yay for c++ | May 5, 2006, 5:43 AM |
raylu | [quote author=Sorc.Polgara link=topic=14925.msg152007#msg152007 date=1146803286] [quote author=MyndFyre[vL] link=topic=14925.msg152000#msg152000 date=1146796663] Renaming them took an hour? [/quote]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. [/quote] Find...and...replace? | May 6, 2006, 3:56 AM |