Valhalla Legends Forums Archive | Battle.net Bot Development | SOLVED: [VB6] Enter Chat Problem

AuthorMessageTime
PiaNKA
I started coding the connection to my bot today and got up through logging in.  When I added the 0x0A and 0x0C join chat packets, I get disconnected and temporarily IP banned.  I send these two packets after Battle.net confirms that my login worked in 0x3A:

[code]
With clsOut
    .InsertString Bots(Index).Username
    .InsertString ""
    .SendPacket frmMain.sckBNET(Index), &HA
    .InsertDWORD &H2
    .InsertString Bots(Index).HomeChannel
    .SendPacket frmMain.sckBNET(Index), &HC
End With
[/code]

I also get disconnected and IP banned when sending only 0x0A.  According to my packet logger, the hex dumps of these two are:

[code]
0000000000 FF 0A 0F 00 4B 6F 47 42 6F 74 34 2E 30 00 00 FF ....KoGBot4.0...
0000000010 0C 11 00 02 00 00 00 43 6C 61 6E 20 4B 6F 47 00 .......Clan KoG.
[/code]

My username is "KoGBot4.0" and I'm trying to get into the channel "Clan KoG".  Can anybody help me?
January 4, 2006, 1:28 AM
KkBlazekK
I've looked over everything there, and I can't seem to see anything wrong.  How about trying a non-forceful join of your clan channel (0x00 on 0x0C)?
January 4, 2006, 1:51 AM
JoeTheOdd
He also gets banned when only sending 0x0A.

I see nothing wrong with that. Asuming you're on WC3, see this.
January 4, 2006, 1:54 AM
PiaNKA
I'm on Starcraft: Broodwar, and yeah it is regardless of the join channel packet...I just have no idea how you could screw up such a small packet :-\
January 4, 2006, 2:30 AM
Ringo
[quote author=PiaNKA link=topic=13768.msg140364#msg140364 date=1136341803]
I'm on Starcraft: Broodwar, and yeah it is regardless of the join channel packet...I just have no idea how you could screw up such a small packet :-\
[/quote]
Is battle.net requesting you check extrawork.mpq on the logon? My guess is its some prelogon offence thats causeing it.
January 4, 2006, 2:38 AM
PiaNKA
Yeah that's what I'd be guessing as well, but I'm not receiving any unknown packets like that.  Are there any other reasons as to why it might do this?
January 4, 2006, 2:40 AM
l2k-Shadow
Those 2 packets seem correct along with the hex dumps. So the problem isn't in those two.. I suggest backtracing and seeing if you didn't mess up something on sending/handling 0x3A just in case.
January 4, 2006, 5:17 AM
Topaz
Bans for protocol violation usually happen immediately on SID_ENTERCHAT. Check your packets.
January 4, 2006, 6:28 AM
JoeTheOdd
[quote author=PiaNKA link=topic=13768.msg140364#msg140364 date=1136341803]
I'm on Starcraft: Broodwar, and yeah it is regardless of the join channel packet...I just have no idea how you could screw up such a small packet :-\
[/quote]

In that case you need to send 0x0B between 0x0A and 0x0C if you want to get a reply.

[quote]Bans for protocol violation usually happen immediately on SID_ENTERCHAT. Check your packets.[/quote]
Incorrect. Bans for protocol violation happen when you conduct the violation.
January 4, 2006, 1:03 PM
l2k-Shadow
[quote author=Joe link=topic=13768.msg140446#msg140446 date=1136379782]
[quote author=PiaNKA link=topic=13768.msg140364#msg140364 date=1136341803]
I'm on Starcraft: Broodwar, and yeah it is regardless of the join channel packet...I just have no idea how you could screw up such a small packet :-\
[/quote]

In that case you need to send 0x0B between 0x0A and 0x0C if you want to get a reply.
[/quote]

Definitely not, 0x0B is a totally optional packet which may be sent whenever after sending 0x0A, and it may be sent more than once. Starcraft sends this packet whenever you click the channel button.
January 4, 2006, 2:57 PM
Networks
Shouldn't he wait until he receives 0x0A?
January 4, 2006, 4:19 PM
Spilled[DW]
[quote author=l2k-Shadow link=topic=13768.msg140406#msg140406 date=1136351833]
Those 2 packets seem correct along with the hex dumps. So the problem isn't in those two.. I suggest backtracing and seeing if you didn't mess up something on sending/handling 0x3A just in case.
[/quote]

This on my opinion would be your best bet, Double check your 0x3A. Perhaps a packetlog of this?
January 4, 2006, 4:42 PM
Ringo
[quote author=PiaNKA link=topic=13768.msg140368#msg140368 date=1136342445]
Yeah that's what I'd be guessing as well, but I'm not receiving any unknown packets like that.  Are there any other reasons as to why it might do this?
[/quote]
S > C 0x3A responce might be wrong?
You might have gotten account success/failed mixed up, if so, that would ipban when sending 0x0A.
January 4, 2006, 4:45 PM
JoeTheOdd
[quote author=Networks link=topic=13768.msg140467#msg140467 date=1136391567]
Shouldn't he wait until he receives 0x0A?
[/quote]

Nope. I'm at school right now so I don't have the source code to JBBE, but I send 0x0A, immediatly followed by 0x0B, immediatly followed by 0x0C, and I have never once gotten IPBanned by doing that.

EDIT -
[quote]S > C 0x3A responce might be wrong?
You might have gotten account success/failed mixed up, if so, that would ipban when sending 0x0A.[/quote]
That's entirely possible. I think success/fail have some weird values, success being 0 and failure being 1, so that could have thrown him off.
January 4, 2006, 5:00 PM
PiaNKA
Yeah, you guys were right.  My parsing for 0x3A was correct, but when double hashing the password I was using the wrong client token. Whoops :) Thanks for your help though.
January 4, 2006, 10:50 PM
Topaz
[quote author=Joe link=topic=13768.msg140446#msg140446 date=1136379782]
[quote]Bans for protocol violation usually happen immediately on SID_ENTERCHAT. Check your packets.[/quote]
Incorrect. Bans for protocol violation happen when you conduct the violation.
[/quote]

[quote author=PiaNKA link=topic=13768.msg140516#msg140516 date=1136415018]
Yeah, you guys were right. My parsing for 0x3A was correct, but when double hashing the password I was using the wrong client token. Whoops :) Thanks for your help though.
[/quote]

I'm right!
January 4, 2006, 11:17 PM

Search