Valhalla Legends Forums Archive | Battle.net Bot Development | 0x6c

AuthorMessageTime
Arthas
.... What is it?
December 29, 2003, 12:35 AM
Arta
Client? Protocol? Context?
December 29, 2003, 12:57 AM
UserLoser.
Assuming you recieved it - Where did you recieve it? What did you do before you recieved it? What product, ect... (what Arta said)
December 29, 2003, 2:16 AM
Arthas
Just wondering, I cant find it on bnet docs.

Sent 0x65, later received 0x6c upon login. Clinet = 3raw, protocol?... TCP.
December 29, 2003, 2:38 AM
UserLoser.
That'd be game protocol, 1 = game, 2 = ftp, 3 = chat
December 29, 2003, 2:39 AM
Arthas
battle.net bot development forum, right?....

Nevermind, I made a typo in my code so that when I received split-packets it only parsed the first part of the packet...... Now my bot freezes, yay~!

Here's the code, see if you can tell me what the heck is going wrong here...

[code]
sckBnet.GetData strTemp, vbString
strBuffer = v1 + strBuffer & strTemp
While Len(strBuffer) > 4
lngLen = v2 + Asc(Mid(strBuffer, 3, 1)) + Asc(Mid(strBuffer, 4, 1)) * 256
If Len(strBuffer) < lngLen Then
v1 = strBuffer
v2 = lngLen
Exit Sub
End If
If Not Mid(StrToHex(strBuffer), 1, 2) = "FF" Then
v1 = strBuffer
v2 = lngLen
Exit Sub
End If
Parse (Left(strBuffer, lngLen))
strBuffer = Mid(strBuffer, lngLen + 1)
Wend
[/code]
December 29, 2003, 2:46 AM
Grok
Ten gazillion examples of using VB to parse binary network data, battle.net protocol, and we still see code like that. Hmm. I advise separating the buffer writing from the buffer reading. As someone else has pointed out, your While Len(buffer)>4 is a problem. Some packets are 4 bytes only, and you won't parse them timely.
December 29, 2003, 3:22 AM
Arthas
Maybe I just need a better example...... lol

I changed my while len(buffer) > 4 to >= 4, better?

I need t know of a better method of joining two split packet together. Btw v1 and v2 are public variables for the form I am using this code in. Any ideas...?
December 29, 2003, 3:57 AM

Search