• Welcome to Valhalla Legends Archive.
 

Sigh...

Started by MyndFyre, September 26, 2003, 08:11 PM

Previous topic - Next topic

MyndFyre

I once again turn to you guys for help...

**(see edit)** Would anybody be willing to just show me their C++ of using a windows socket to connect specifically to Battle.net?  I have successfully gotten my bot to connect to BNLS, but now I'm stuck again...  I think that I might be using the wrong protocol - but then again, I really don't think that.  TCP/IP, isn't it?

Anyway, I've lost my ability to packet-capture for the next week or two, because I had to send in my laptop for repairs, and Ethereal doesn't do packet captures over a modem (yes, yes, I know I'm a lamer still on 56K).  I used to use my laptop to capture packets sent over my wireless network (long story about why I have wireless and not cable) at home or at school.  So, I can't tell whether or not I'm using the right setup.

What I do know right now is this - my BeginReceiveFrom method is ending immediately, and returning no data.  I never get Bnet's reply for SID_AUTH_INFO.

If I call BeginReceiveFrom, nothing happens.  If I throw in the SendTo call with the SID_AUTH_INFO packet, I'm SOL.

Help!!!  Please!

--Rob

EDIT: Alternatively, if someone would be kind enough to send me just some packetlogs of Starcraft connecting to/interacting with Battle.net, I would be more than grateful.  I can be emailed at [email protected].  TIA.  --Rob
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.

Arta

#1
Are you sending the correct protocol byte (0x01)? If so, your SID_AUTH_INFO is probably wrong. A sample for this packet is below. It does NOT include a header (FF 50 3A 00) and the version byte is out of date.


00 00 00 00 36 38 58 49 50 58 45 53 c5 00 00 00 ....68XIPXES....
00 00 00 00 cc 6b 8f 9d 2c 01 00 00 09 04 00 00 .....k..,.......
09 04 00 00 55 53 41 00 55 6e 69 74 65 64 20 53 ....USA.United S
74 61 74 65 73 00                               tates.


MyndFyre

#2
Ahh, I've found that my stupid socket didn't realize that bnet stopped transmitting.  It was due to an IPBan.  I guess the benefit to being a lamer with a modem is that I can d/c and r/c really quick.  =)

I'm working on 0x51 now - SID_AUTH_CHECK - and it's getting me IP banned.  

Unfortunately, the hex editor I'm using doesn't support copying the hex right out of the program:


0000   FF 51 76 00 CB 3E 63 67   01 00 01 01 5B 6F 24 F3
0010   01 00 00 00 00 00 00 00   xx xx xx xx xx xx xx xx
0020   xx xx xx xx xx xx xx xx   xx xx xx xx xx xx xx xx
0030   xx xx xx xx xx xx xx xx   xx xx xx xx 53 74 61 72
0040   63 72 61 66 74 2E 65 78    65 20 30 33 2F 32 38 2F
0050   30 33 20 30 34 3A 32 31    3A 35 36 20 31 30 36 34
0060   39 36 30 00 00 52 6F 62    65 72 74 20 41 2E 20 50
0070   61 76 65 7A 61 00

Starcraft.exe 03/28/03 04:21:56 1064960Robert A. Paveza


This is what I'm sending with 0x51.

Glad to see bnetdocs is online  =)  I'll see if I can get some more info there.  Thanks for the help!

--Rob

[Edit: removed cdkey information; in the future, you really ought to do this yourself if you care about your key.  Also deleted the ASCII representation of the binary portion of the dump.]
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.

MyndFyre

Got that fixed (there was an extra NULL terminator in there), but now I'm getting the invalid version error code from the 0x51 reply.  I'm using BNLS, so I am not sure about what the problem could be.  Any ideas?
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.

Arta

Got the correct version byte? Are you putting the informatiuon from BNLS into the packet correctly?