Valhalla Legends Forums Archive | Battle.net Bot Development | Connecting to bnet

AuthorMessageTime
soccerist
When I trying to log onto battle.net, I am successful connecting to the server. I then proceed to send the protocol byte and the 0x50 packet.

After that I'm waiting for any packet from bnet, but none ever comes. I'm lost as to what to try next in assessing the situation.

Any ideas or suggestions?

The ethereal log of my bot is here if it helps:
www.filebox.vt.edu/users/rluu/stuff/ethereal_log_4_13_04b
April 14, 2004, 8:10 AM
soccerist
Looking at the debug output of my program, it seems to be only getting recv's of 0 bytes. :-\
April 14, 2004, 10:06 AM
tA-Kane
[quote author=soccerist link=board=17;threadid=6297;start=0#msg55039 date=1081930219]The ethereal log of my bot is here if it helps:
www.filebox.vt.edu/users/rluu/stuff/ethereal_log_4_13_04b[/quote]A more useful log would be one which is stored in hex.

And preferrably, even contains messages to show the differences between receiving data and sending data (for example "sending data 'xyz' ... receiving data 'abc'").
April 14, 2004, 1:19 PM
iago
Yes, for example:
http://linkware.clan-mac.com/kanebot/misc/private/works.txt
April 14, 2004, 1:30 PM
soccerist
Ok. My apologies.

33899 Is the port I binded to and port 6112 is bnet.


http://www.filebox.vt.edu/users/rluu/stuff/ethereal_log
April 14, 2004, 2:02 PM
synth
Right click on one of the packet titles and click "Follow TCP Stream". It gets rid of that extra gibberish, so that all you see is from "ff 50" on. It made things a lot easier for me.
April 14, 2004, 2:19 PM
iago
At the bottom, under filters, type this:

tcp.flags.push == 1

and hit enter. That'll get rid of empty packets. Do that, then repost, if you don't mind :)

The stuff before 0xFF... isn't that big of a deal since the offset into the packet is always the same.
April 14, 2004, 3:58 PM
Adron
[quote author=iago link=board=17;threadid=6297;start=0#msg55065 date=1081958281]
At the bottom, under filters, type this:

tcp.flags.push == 1
[/quote]

I have a log here with a whole lot of data sent in packets without push set.
April 14, 2004, 4:29 PM
iago
[quote author=Adron link=board=17;threadid=6297;start=0#msg55068 date=1081960185]
[quote author=iago link=board=17;threadid=6297;start=0#msg55065 date=1081958281]
At the bottom, under filters, type this:

tcp.flags.push == 1
[/quote]

I have a log here with a whole lot of data sent in packets without push set.
[/quote]

hmm, that's always worked for me. Is there a better way to filter packets without data? I don't even know what push IS, but it seems to work :)

<edit> too cool, me and Adron posted in the same second!
April 14, 2004, 4:32 PM
Adron
[quote]
[code]
6112 > 33899 [fin, ack] Len = 0

0000 00 09 5b 74 00 e9 00 0c 41 35 07 da 08 00 45 00 ..[t.... A5....E.
0010 00 34 b1 ad 00 00 70 06 43 aa 3f f1 53 6d c0 a8 .4....p. C.?.Sm..
0020 01 66 17 e0 84 6b f7 c9 06 34 31 fc da a2 80 11 .f...k.. .41.....
0030 ff fe 0c f4 00 00 01 01 08 0a 00 07 59 89 06 64 ........ ....Y..d
0040 0d 80
[/code]
[/quote]

I'd like to point out that battle.net is disconnecting you at this point...
April 14, 2004, 4:32 PM
iago
eww, you have the gamecode wrong.

SXEP != SEXP

gogo fix! :)
April 14, 2004, 4:34 PM
Adron
[quote author=iago link=board=17;threadid=6297;start=0#msg55070 date=1081960370]
[quote author=Adron link=board=17;threadid=6297;start=0#msg55068 date=1081960185]
I have a log here with a whole lot of data sent in packets without push set.
[/quote]

hmm, that's always worked for me. Is there a better way to filter packets without data? I don't even know what push IS, but it seems to work :)
[/quote]

Well, I tend to just use "follow tcp stream". The first file he posted loaded fine in Ethereal, and was easy to look at. The second file he posted had the right data easily locatable since he'd pointed out the right packet:

[quote]
[code]
33899 > 6112 [psh, ack] Len = 58
Send: This contains my packet 0x50

0000 00 0c 41 35 07 da aa aa 03 00 00 00 08 00 45 00 ..A5.... ......E.
0010 00 6e d6 83 40 00 40 06 0e 9a c0 a8 01 66 3f f1 .n..@.@. .....f?.
0020 53 6d 84 6b 17 e0 31 fc da 68 f7 c9 06 34 80 18 Sm.k..1. .h...4..
0030 16 d0 49 f1 00 00 01 01 08 0a 06 64 0d 80 00 07 ..I..... ...d....
0040 59 89 ff 50 3a 00 00 00 00 00 36 38 58 49 50 45 Y..P:... ..68XIPE
0050 58 53 c7 00 00 00 00 00 00 00 00 00 00 00 2c 01 XS...... ......,.
0060 00 00 09 04 00 00 09 04 00 00 55 53 41 00 55 6e ........ ..USA.Un
0070 69 74 65 64 20 53 74 61 74 65 73 00 ited Sta tes.

[/code]
[/quote]


edit: Ah, good job iago, I was just about to go dig up bnetdocs and take the packet apart, but then you posted the probably correct answer :)
April 14, 2004, 4:36 PM
soccerist
Ahh, thank you so much Iago & everyone else for looking at this. ;D

I was going crazy trying to figure it out.

I had all the other TCP sends with Len = 0 there because I thought that maybe one of those were causing it.


It works now. :)
April 14, 2004, 4:48 PM

Search