I have been following the login sequence listed on bnetdocs for W2BN/STAR/SEXP/etc, so my bot is sending them and expecting them in the same order. The only difference between my bot's sequence and bnetdocs' is my bot uses SID_LOGONRESPONSE2 instead of SID_LOGONRESPONSE.
So, after I recieve SID_LOGONRESPONSE2, I send SID_ENTERCHAT (0x0A). Here is an example packet my bot is sending:[Packet C->S] FF 0A 0E 00 53 4F 29 44 61 52 4B 28 00 00
After I send this, Battle.Net does not disconnect me, but it doesn't respond to the packet either. Also Battle.Net continues sending SID_PING. Any ideas as to why this may be happening?
Edit: I have also tried with SID_LOGONRESPONSE, and with sending SID_UDPPINGRESPONSE with the ASCII values corresponding to "bnet". Same result.
I have successfully implemented SID_LOGINRESPONSE (0x29 IIRC) and SID_LOGINRESPONSE2 (0x3a IIRC) in my bot and used SID_ENTERCHAT (0x0a) successfully with both.
If this helps at all, here's my bot's BNCS packet sequence:
C->S SID_AUTH_INFO 0x50
S->C SID_PING 0x25
C->S SID_PING 0x25
S->C SID_AUTH_INFO 0x50
C->S SID_AUTH_CHECK 0x51
S->C SID_AUTH_CHECK 0x51 - Passed.
C->S SID_LOGONRESPONSE2 0x3a
S->C SID_LOGONRESPONSE2 0x3a - Login accepted.
C->S SID_UDPPINGRESPONSE 0x14
C->S SID_ENTERCHAT 0x0a
Quote from: shadypalm88 on November 06, 2003, 09:48 PM
If this helps at all, here's my bot's BNCS packet sequence:
C->S SID_AUTH_INFO 0x50
S->C SID_PING 0x25
C->S SID_PING 0x25
S->C SID_AUTH_INFO 0x50
C->S SID_AUTH_CHECK 0x51
S->C SID_AUTH_CHECK 0x51 - Passed.
C->S SID_LOGONRESPONSE2 0x3a
S->C SID_LOGONRESPONSE2 0x3a - Login accepted.
C->S SID_UDPPINGRESPONSE 0x14
C->S SID_ENTERCHAT 0x0a
I love the lime/aqua theme.. I really do :)
Shady: you do realize you also need to join the channel, right? Use 0xc to do that. SID_ENTERCHAT doesn't actually put you in a channel (in fact, I'm not sure what it does for newer clients; with Diablo and DSHR, it was used to specify your logon name and statstring. After passwords were implemented, it still provided statstring.)
Yeah, I do realize that, but shouldn't this still give a reply, telling me if I'm a #2, etc, even on a CD-Key'd client? It's set to join the home channel after it recieves a reply, but I'll try beforehand, see if I don't get IP-banned.
Hell, nevermind, it joined the home channel. Thanks, that really had me stuck.
But, on a sidenote, should it be sending a reply?
I believe you do get a reply, but I don't recall for sure; however, if you look at the real clients, they slam out 0xa, 0xb, and 0xc all at once, then wait for the server to react.
Quote from: Kp on November 07, 2003, 04:03 PM
Shady: you do realize you also need to join the channel, right? Use 0xc to do that. SID_ENTERCHAT doesn't actually put you in a channel (in fact, I'm not sure what it does for newer clients; with Diablo and DSHR, it was used to specify your logon name and statstring. After passwords were implemented, it still provided statstring.)
I'm pretty sure I don't send a "join channel" message to Battle.net, just SID_ENTERCHAT upon authentication. It joins the game-default channel (for example, Brood War joins Brood War USA-1 or the like), or since I'm in a Warcraft III clan, it joins the clan channel. It also sends a SID_CHATEVENT (0x0f) with the join channel message that I joined the channel.
Quote from: Myndfyre on November 08, 2003, 12:11 AM
Quote from: Kp on November 07, 2003, 04:03 PM
Shady: you do realize you also need to join the channel, right? Use 0xc to do that. SID_ENTERCHAT doesn't actually put you in a channel (in fact, I'm not sure what it does for newer clients; with Diablo and DSHR, it was used to specify your logon name and statstring. After passwords were implemented, it still provided statstring.)
I'm pretty sure I don't send a "join channel" message to Battle.net, just SID_ENTERCHAT upon authentication. It joins the game-default channel (for example, Brood War joins Brood War USA-1 or the like), or since I'm in a Warcraft III clan, it joins the clan channel. It also sends a SID_CHATEVENT (0x0f) with the join channel message that I joined the channel.
You get to game-default and War3 clan channels by, in fact, sending 0x0c to join a channel.
Just following up... for some reason, after I made it send SID_JOINCHANNEL without waiting for SID_ENTERCHAT, I started getting SID_ENTERCHAT replies. I took off the one that didn't wait and everything works fine. Odd.