Valhalla Legends Forums Archive | Battle.net Bot Development | WAR3 works on USWest, but not USEast ?

AuthorMessageTime
tA-Kane
I'm having some very weird trouble...

My bot is able to connect just fine to WAR3 on USWest, but when it tries connecting to WAR3 on USEast, it gets disconnected (and last night, I was IP banned for an hour, after a number of tries).

What's even more weird, is that an older version of my client is able to connect to the USEast gateway.

I've tried different accounts, and all of them disconnect me.

I'd think it was something I'd done to the new version, but it's able to connect to USWest...

I packetlogged the connections, and they're pretty much identical. The differences between the one that works and the one that doesn't is that one's connecting to .126, while the other is connecting to .127, and then the one that works work is not sending SID_PING replies, whereas the one that doesn't work is.

But that shouldn't matter, should it? I later (after packetlogging) set up my older client to not send ping replies, and to use the other server, and it's still able to connect.


Here's the packetlog for the connection that works:
http://linkware.clan-mac.com/kanebot/misc/private/works.txt

And here's the packetlog for the connection that doesn't work:
http://linkware.clan-mac.com/kanebot/misc/private/doesntwork.txt

Perhaps someone here could point me in a new direction?
March 28, 2004, 5:46 PM
CrAz3D
I've encountered same problem. Doesn't work on WAR3 but it works on SEXP, such strangeness.
March 28, 2004, 7:19 PM
Myndfyr
I am happy to report that I was able to log onto US East with Warcraft III: The Reign of Chaos via my bot.
March 28, 2004, 8:58 PM
tA-Kane
I know it's (very likely) the 0x0A because I've done some more testing after I had created that thread, and Battle.net does not disconnect me until I send my 0x0A.

Also, the problem has now appeared on my older clients, and on STAR.

I suspect that it's not a problem with my code, because it's happening for both of us, and for my older client which was previously able to connect perfectly to Battle.net.

Instead, I think it's a server problem, because Battle.net even disconnected its own game client... though not at 0x0A, but after joining the default channel (in my case, it was War2BNE USA-1), and downloading the userlist.

Also, it's worth noting that I've had this problem before (about a year ago), but it disappeared without any code changes on my part... and obviously, it's now back again.
March 28, 2004, 10:46 PM
ChR0NiC
Maybe you did not register an email with the account on East but you did with the account on West. Or it is trying to get you to decide whether you are going to register or cancel?

Just a suggestion that I thought of when testing my bot for the same problem..

Edit: Actually I was able to successfully log on to East and West :)
March 28, 2004, 10:53 PM
tA-Kane
[quote author=ChR0NiC link=board=17;threadid=6036;start=0#msg52268 date=1080514416]Maybe you did not register an email with the account on East but you did with the account on West.[/quote]No, my bot automatically sends the email packets when requested by Battle.net

Both my USWest and my USEast accounts have previously had their emails set before this.
March 28, 2004, 10:55 PM
o.OV
But according to your packet log.. you were successfullly logged in after sending 0x0A.

[code]
Send data (6 bytes).
<00000100< FF 0A 06 00 00 00
......

Send data (8 bytes).
<00000106< FF 0B 08 00 57 41 52 33
....WAR3

Receive data (29 bytes).
>000006D5> FF 0A 1D 00 74 41 2D 4B 61 6E 65 23 32 00 33 52
....tA-Kane#2.3R
>000006E5> 41 57 20 30 00 74 41 2D 4B 61 6E 65 00
AW 0.tA-Kane.

Receive orderly release indication (T_ORDREL_IND = 132).

Send orderly release request (T_ORDREL_REQ = 109).

Send unbind request (T_UNBIND_REQ = 110).
[/code]
March 28, 2004, 10:59 PM
ChR0NiC
yeah it seems like you are just not sending 0xC......
I don't understand why you would be IP Banned once successfully logged on.
March 28, 2004, 11:01 PM
BaDDBLooD
YOu can be ipbanned if you send Flag: 0x02 for 0x0C

try editing that :P

EDIT: i forget the reason though..
March 29, 2004, 12:36 AM
o.OV
[quote author=BaDDBLooD link=board=17;threadid=6036;start=0#msg52291 date=1080520572]
YOu can be ipbanned if you send Flag: 0x02 for 0x0C

try editing that :P

EDIT: i forget the reason though..
[/quote]

I use flag 0x02 all the time. if the channel is restricted or I just can't get in then it sends me to the void.
March 29, 2004, 1:16 AM
tA-Kane
[quote author=ChR0NiC link=board=17;threadid=6036;start=0#msg52274 date=1080514910]
yeah it seems like you are just not sending 0xC......[/quote]I don't have a chance to send 0x0C... I get disconnected almost immediately after sending 0x0A (I say almost because I'm usually able to send 0x0B before receiving the orderly disconnect... but once, it was received before my bot had finished sending 0x0B, so the packetlog ended up displaying "Received orderly disconnected request, sent 0x0B packet, sent orderly disconnect acknowledgement".).
[quote author=ChR0NiC link=board=17;threadid=6036;start=0#msg52274 date=1080514910]I don't understand why you would be IP Banned once successfully logged on.[/quote]Me neither.

I've noticed that the accounts which are mutual friends receive "Your friend tA-Kane has entered Battle.net.", immediately followed by "Your friend tA-Kane has exited Battle.net." But that's more annoying than anything else. If Battle.net is going to immediately disconnect me after logging in, it shouldn't annoy friends with "friend x has logged in, logged out" :-\

Edit: fixed some quoting tags
March 29, 2004, 1:48 AM
LoRd
I've had this happen quite a few times. I think it's some form of a lower level IP ban, but I don't know for sure, nor do I know what causes it.
March 29, 2004, 7:19 AM
Skywing
Note that there are certain protocol violations which cause the server to wait until you have completed logging on to disconnect you.
March 29, 2004, 3:00 PM
UserLoser.
This happened to me one day on Warcraft II, I posted back a while ago on these forums and I believe the response I got was that I was reconnecting too much on the same name & CD-key, but I don't know how true that is
March 30, 2004, 12:59 AM
o.OV
[quote author=UserLoser. link=board=17;threadid=6036;start=0#msg52541 date=1080608357]
This happened to me one day on Warcraft II, I posted back a while ago on these forums and I believe the response I got was that I was reconnecting too much on the same name & CD-key, but I don't know how true that is
[/quote]

Reconnecting too many times on the same cdkey does get a person ipbanned.
It ipbans as soon as the key hash is sent
and bnet's response is that the key is invalid.
I'm sure it isn't the same situation that ta-kane has.
March 30, 2004, 1:11 AM
tA-Kane
[quote author=o.OV link=board=17;threadid=6036;start=0#msg52551 date=1080609089]It ipbans as soon as the key hash is sent
and bnet's response is that the key is invalid.
I'm sure it isn't the same situation that ta-kane has.[/quote]It's not.

I'm getting disconnected (and about 1/2 to 1/3 of the time, IP banned for an hour) when I send 0x0A.

Since I'm not able to run WarCraft 3, I'm not able to do packetlogging myself.

Instead, I had a friend packetlog his connection (admittedly, it's W3XP instead of WAR3, but should that make a difference?). And now I've modified my code to emulate very closely (it would require quite an overhaul of my code to make it any closer) according to what I see, and I'm still getting IP banned.

Either I don't see what's wrong, or Battle.net's too picky :P

I wonder why only USEast is banning me, and not ANY other gateway?

I suppose the difference would be that the account for each gateway is different (even though the username/password/email is the same, each gateway would presumably hold different account data). One notable difference is that tA-Kane@Azeroth is a member of a clan, whereas all other accounts are not.

But then, why is mAc-RoX@Azeroth also getting the problem, because it's not a member of a clan?

It's the these reasons combined that makes me think it's a problem with USEast's server.

Unless I'm being totally oblivious, even noobish? :-[


Edit: Meanwhile, I'm IP banned YET AGAIN, so I have to wait another HOUR before I can verify that mAc-RoX@Azeroth is definitely exhibiting the same problem :'(
March 30, 2004, 1:52 AM
o.OV
Have you tried not sending a channel list request packet?

Add-On:
I seriously doubt 0x0A is the problem if you are getting a proper reply.

Though skywing did mention something about protocol violation not disconnecting the client until logged in.. I don't know if that is the case.

Are you absolutely positive nothing else is being sent after 0x0A without your knowledge?

The out going buffer is malformed perhaps?
March 30, 2004, 2:25 AM
iago
I was going to suggest that you should send somebody else your bot and see if the same thing happens to them. Then I realized you use a stupid OS.

Do you know anybody else who can run it and try it out?
March 30, 2004, 3:21 AM
Kp
I've never logged a war3 connection, but one thing that immediately jumps out at me from the MBB dump is that you're sending both strings empty in 0xA. Since I've never looked at war3, I don't know if that's correct for it - however, it's definitely not correct for Starcraft/Brood War (or Diablo, but SC/BW is a closer relative of War3 than Diablo). Under SC, the first string is a reiteration of your account name and the second is blank (under Diablo, the second is your statstring - but since games can no longer choose their own statstring, it's now set to ""). I suggest taking a closer look at the exact contents of your friend's trace around that message (and possibly even post it here, after editing out his cdkey info).
March 30, 2004, 4:23 AM
ChR0NiC
[quote author=UserLoser. link=board=17;threadid=6036;start=0#msg52541 date=1080608357]
This happened to me one day on Warcraft II, I posted back a while ago on these forums and I believe the response I got was that I was reconnecting too much on the same name & CD-key, but I don't know how true that is
[/quote]

[quote author=o.OV link=board=17;threadid=6036;start=0#msg52551 date=1080609089]
Reconnecting too many times on the same cdkey does get a person ipbanned.
It ipbans as soon as the key hash is sent
and bnet's response is that the key is invalid.
I'm sure it isn't the same situation that ta-kane has.
[/quote]

You couldn't be closer to being off-topic.......
March 30, 2004, 4:49 AM
tA-Kane
[quote author=ChR0NiC link=board=17;threadid=6036;start=15#msg52596 date=1080622142]You couldn't be closer to being off-topic.......[/quote]He might not be able to, but you could.

[quote author=Kp link=board=17;threadid=6036;start=15#msg52590 date=1080620614]I've never logged a war3 connection, but one thing that immediately jumps out at me from the MBB dump is that you're sending both strings empty in 0xA. Since I've never looked at war3, I don't know if that's correct for it - however, it's definitely not correct for Starcraft/Brood War (or Diablo, but SC/BW is a closer relative of War3 than Diablo). Under SC, the first string is a reiteration of your account name and the second is blank (under Diablo, the second is your statstring - but since games can no longer choose their own statstring, it's now set to ""). I suggest taking a closer look at the exact contents of your friend's trace around that message (and possibly even post it here, after editing out his cdkey info).
[/quote]This is another friend's WAR3 packet log froma year ago that I origionally used to add WAR3 support to my bot:
http://linkware.clan-mac.com/kanebot/misc/private/war3-3-20-03.txt

This is the first friend I told you about's W3XP packet log:
http://linkware.clan-mac.com/kanebot/misc/private/w3xp-3-29-04.txt

And then this is the packetlog of my bot just 15 minutes ago:
http://linkware.clan-mac.com/kanebot/misc/private/mbb-war3-3-30-04.txt

I'm emulating the W3XP connection as closely as possible because I'm going to assume the (major) differences between the WAR3 and the W3XP connection was added after I got my first WAR3 packetlog.

However, you'll notice that even on my packetlog that I linked to earlier, I was getting IP banned, and I was more following the WAR3 connection than the W3XP connection, minus sending 0x45 and the filetime requests (the filetime requests shouldn't make a difference, though? oh well, it's just that much closer to emulating the W3XP connection).

Kp, I had already thought about the 0x0A packet being empty, but you'll notice that in BOTH of the games' packetlogs, it's empty.
March 30, 2004, 7:30 AM
tA-Kane
30 minutes ago: http://linkware.clan-mac.com/kanebot/misc/private/still%20broken.txt

I'm still getting disconnected when logging in..., and thusly could still use some help.
April 2, 2004, 5:31 AM
Soul Taker
[quote author=Skywing link=board=17;threadid=6036;start=0#msg52417 date=1080572455]
Note that there are certain protocol violations which cause the server to wait until you have completed logging on to disconnect you.
[/quote]
A long time ago, I used to occasionally do something wrong with login stuff, and it would wait until I had logged in and joined a channel, and the instant I sent a chat command, would disconnect me. Incredibly frustrating!
April 2, 2004, 10:14 AM
Soul Taker
[quote author=tA-Kane link=board=17;threadid=6036;start=15#msg53160 date=1080883913]
30 minutes ago: http://linkware.clan-mac.com/kanebot/misc/private/still%20broken.txt

I'm still getting disconnected when logging in..., and thusly could still use some help.
[/quote]
[pre]Send data (58 bytes).
<00000001< FF 50 3A 00 00 00 00 00 36 38 58 49 33 52 41 57 .P:.....68XI3RAW
<00000011< 0E 00 00 00 53 55 6E 65 27 FF 10 AC B0 41 44 04 ....SUne'....AD.
<00000021< 09 04 00 00 09 04 00 00 00 41 53 55 55 6E 69 74 .........ASUUnit
<00000031< 65 64 20 53 74 61 74 65 73 00 ed States.[/pre]
Looks like there's no null terminator on your country abbreviation. Dunno if that's the problem of course.
Edit: and it's being sent as a DWORD?
April 2, 2004, 10:16 AM
UserLoser.
Kane: Why do you use IX86? Shouldn't you be using PMAC or XMAC? :P
April 2, 2004, 10:31 PM
LoRd
[quote author=UserLoser. link=board=17;threadid=6036;start=15#msg53253 date=1080945084]
Kane: Why do you use IX86? Shouldn't you be using PMAC or XMAC? :P
[/quote]
Does BNLS have *MAC support?
April 3, 2004, 2:41 AM
Skywing
[quote author=LoRd[nK] link=board=17;threadid=6036;start=15#msg53279 date=1080960087]
[quote author=UserLoser. link=board=17;threadid=6036;start=15#msg53253 date=1080945084]
Kane: Why do you use IX86? Shouldn't you be using PMAC or XMAC? :P
[/quote]
Does BNLS have *MAC support?
[/quote]
No. I don't have up-to-date version check files for the Mac product versions, and the autopatcher doesn't support the Mac patch format.
April 3, 2004, 9:10 AM
iago
[quote author=Soul Taker link=board=17;threadid=6036;start=15#msg53177 date=1080900983]
[quote author=tA-Kane link=board=17;threadid=6036;start=15#msg53160 date=1080883913]
30 minutes ago: http://linkware.clan-mac.com/kanebot/misc/private/still%20broken.txt

I'm still getting disconnected when logging in..., and thusly could still use some help.
[/quote]
[pre]Send data (58 bytes).
<00000001< FF 50 3A 00 00 00 00 00 36 38 58 49 33 52 41 57 .P:.....68XI3RAW
<00000011< 0E 00 00 00 53 55 6E 65 27 FF 10 AC B0 41 44 04 ....SUne'....AD.
<00000021< 09 04 00 00 09 04 00 00 00 41 53 55 55 6E 69 74 .........ASUUnit
<00000031< 65 64 20 53 74 61 74 65 73 00 ed States.[/pre]
Looks like there's no null terminator on your country abbreviation. Dunno if that's the problem of course.
Edit: and it's being sent as a DWORD?
[/quote]

Actually, it would read the country code as ASUU then, and the country as "nited States". Perhaps that's why it doesn't ban you when you try to join the channel and it notices that you sent an invalid country?
April 3, 2004, 10:21 AM
Adron
[quote author=Soul Taker link=board=17;threadid=6036;start=15#msg53176 date=1080900876]
A long time ago, I used to occasionally do something wrong with login stuff, and it would wait until I had logged in and joined a channel, and the instant I sent a chat command, would disconnect me. Incredibly frustrating!
[/quote]

I wonder if I didn't suggest that at some time.
April 3, 2004, 12:23 PM
Myndfyr
[quote author=iago link=board=17;threadid=6036;start=15#msg53316 date=1080987699]
[quote author=Soul Taker link=board=17;threadid=6036;start=15#msg53177 date=1080900983]
[quote author=tA-Kane link=board=17;threadid=6036;start=15#msg53160 date=1080883913]
30 minutes ago: http://linkware.clan-mac.com/kanebot/misc/private/still%20broken.txt

I'm still getting disconnected when logging in..., and thusly could still use some help.
[/quote]
[pre]Send data (58 bytes).
<00000001< FF 50 3A 00 00 00 00 00 36 38 58 49 33 52 41 57 .P:.....68XI3RAW
<00000011< 0E 00 00 00 53 55 6E 65 27 FF 10 AC B0 41 44 04 ....SUne'....AD.
<00000021< 09 04 00 00 09 04 00 00 00 41 53 55 55 6E 69 74 .........ASUUnit
<00000031< 65 64 20 53 74 61 74 65 73 00 ed States.[/pre]
Looks like there's no null terminator on your country abbreviation. Dunno if that's the problem of course.
Edit: and it's being sent as a DWORD?
[/quote]

Actually, it would read the country code as ASUU then, and the country as "nited States". Perhaps that's why it doesn't ban you when you try to join the channel and it notices that you sent an invalid country?
[/quote]

No, I went through and counted the bytes, it would be read in as
[code]
cid db 'USA',0
[/code]

Besides, it would ban him here if he had an invalid country, not at 0x0a.
April 3, 2004, 4:30 PM
Soul Taker
[quote author=Adron link=board=17;threadid=6036;start=15#msg53321 date=1080994991]
[quote author=Soul Taker link=board=17;threadid=6036;start=15#msg53176 date=1080900876]
A long time ago, I used to occasionally do something wrong with login stuff, and it would wait until I had logged in and joined a channel, and the instant I sent a chat command, would disconnect me. Incredibly frustrating!
[/quote]

I wonder if I didn't suggest that at some time.
[/quote]
It's a good idea because it makes it harder to figure out what you did wrong... but a bad idea because it really got annoying :P
April 4, 2004, 5:27 PM
tA-Kane
My hard drive crashed, so I've been unable to access the net for a while, and I'm on my dad's laptop for now.

[quote author=tA-Kane link=board=17;threadid=6036;start=15#msg52614 date=1080631805]http://linkware.clan-mac.com/kanebot/misc/private/war3-3-20-03.txt
http://linkware.clan-mac.com/kanebot/misc/private/w3xp-3-29-04.txt
[/quote][quote author=Soul Taker link=board=17;threadid=6036;start=15#msg53177 date=1080900983]Looks like there's no null terminator on your country abbreviation. Dunno if that's the problem of course.
Edit: and it's being sent as a DWORD?
[/quote]I had noticed that the WAR3 and W3XP packet logs are sending the country codes as DWORDS, so I figured I should do the same. It didn't fix the problem though.

[quote author=iago link=board=17;threadid=6036;start=15#msg53316 date=1080987699]Actually, it would read the country code as ASUU then, and the country as "nited States". Perhaps that's why it doesn't ban you when you try to join the channel and it notices that you sent an invalid country?
[/quote]Actually, if it was reading the country code as a string, it would read it in as an empty string (since as a DWORD, there's a NULL byte preceeding 'ASU'), and then the country name would then be "ASUUnited States". But, I do not beleive the country code is sent as a string, at least not in WAR3 or W3XP.

Perhaps someone could send me a packetlog (two or three would be better, for comparison reasons) of their WarCraft 3 game's connection?
April 5, 2004, 8:28 PM
Myndfyr
[quote author=tA-Kane link=board=17;threadid=6036;start=30#msg53587 date=1081196923]
My hard drive crashed, so I've been unable to access the net for a while, and I'm on my dad's laptop for now.
Perhaps someone could send me a packetlog (two or three would be better, for comparison reasons) of their WarCraft 3 game's connection?
[/quote]

Straight out of an Ethereal packet capture of Warcraft III: The Frozen Throne (NOT my bot) -- the BNCS packet starts at 0x37 (the rest is protocol information):

[code]
0000 00 0c 41 89 cc 76 02 a0 cc 67 d5 59 08 00 45 00 ..A..v...g.Y..E.
0010 00 62 77 c9 40 00 80 06 b6 4c c0 a8 01 69 3f f0 .bw.@....L...i?.
0020 ca 7e 07 48 17 e0 70 43 52 b8 bd a9 3c 78 50 18 .~.H..pCR...<xP.
0030 44 70 f8 4e 00 00 ff 50 3a 00 00 00 00 00 36 38 Dp.N...P:.....68
0040 58 49 50 58 33 57 0e 00 00 00 53 55 6e 65 c0 a8 XIPX3W....SUne..
0050 01 69 a4 01 00 00 09 04 00 00 09 04 00 00 55 53 .i............US
0060 41 00 55 6e 69 74 65 64 20 53 74 61 74 65 73 00 A.United States.
[/code]

Looks like it's a null-terminated string, not a DWORD, to me.

[observation] Perhaps this is a flaw in the Mac version of WC3? [/observation]

[edit=5]Come to think of it, BnetDocs specifies it as a String:
[quote]
Packet ID: 0x50
Direction: Client -> Server (Sent)
Format:
(DWORD)       Protocol ID (0)
(DWORD)       Platform ID
(DWORD)       Program ID
(DWORD)       Version Byte
(DWORD)       Product language
(DWORD)       Local IP for NAT compatibility*
(DWORD)       Time zone bias*
(DWORD)       Locale ID*
(DWORD)       Language ID*
(STRING)       Country abreviation
(STRING)       Country
[/quote]
[/edit]
April 5, 2004, 10:06 PM
tA-Kane
[quote author=Myndfyre link=board=17;threadid=6036;start=30#msg53603 date=1081202777]Looks like it's a null-terminated string, not a DWORD, to me.[/quote]It looks like it, just like IX86 and STAR used to look like non-null-terminated strings... Maybe it is indeed a string for IX86, or maybe it's actually a DWORD, but one of the platforms got the endian incorrect?

[quote author=Myndfyre link=board=17;threadid=6036;start=30#msg53603 date=1081202777]Perhaps this is a flaw in the Mac version of WC3?[/quote]Perhaps it is.

[quote author=Myndfyre link=board=17;threadid=6036;start=30#msg53603 date=1081202777]Come to think of it, BnetDocs specifies it as a String[/quote]If it's indeed a DWORD, it wouldn't be the first time BnetDocs is wrong, I think. BnetDocs, after all, is based on what information users give it, and not on official information from Blizzard, so it would be easy to get information wrong.

Also, it would make sense for the country abbreviation to be a DWORD, since that would make the offset to the country name ("United States") an exact position, instead of needing to get the (assumably possibly arbitrary) length of the country abbreviation to be able to get the country name.


Anyways, I "corrected" the country abbreviation, but I'm still getting disconnected at logon, so I assume the problem is not in my 0x50 packet... does anyone see any problems (even subtle ones) that I do not?

Half an hour ago: http://linkware.clan-mac.com/kanebot/misc/private/mbb-war3-4-10.txt
April 10, 2004, 5:02 PM
K
I think you can pretty much assume the country abbreviation will be three letters, since it appears to be the country's ISO ALPHA-3 code.
April 11, 2004, 1:24 AM
tA-Kane
So is no one able to figure it out? Because I'm stumped. :-[
April 14, 2004, 12:59 PM
Myndfyr
[quote author=tA-Kane link=board=17;threadid=6036;start=30#msg55045 date=1081947595]
So is no one able to figure it out? Because I'm stumped. :-[
[/quote]

I've gotten randomly disconnected from Bnet while on Warcraft III several times, but it seems to be random server maintenance, because my three connections (WC3, Diablo II, and Starcraft, all on different clients), all disconnect at about the same time.
April 14, 2004, 10:54 PM

Search