• Welcome to Valhalla Legends Archive.
 

I think I'm doing something wrong for WC3

Started by MyndFyre, November 05, 2003, 05:12 PM

Previous topic - Next topic

MyndFyre

Unfortunately, I can't get WC3 to run on my laptop, and that is the only machine I can packetlog on (as crappy as it is, I still only use dialup).

I'm using the same connection algorithm (I'm using the NLS) for Starcraft, BW, WC2, and Diablo 2 Classic as I am for WC3.  However, I'm getting two errors when trying to connect with WC3: the BNLS VerifyServer message returns negatory, and the 0x3A message to Battle.net is returning 0x203 (invalid password).

Are the servers for Warcraft III separate?  I've just been connecting to useast.battle.net.

Thanks in advance!

--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.

Skywing

Quote from: Myndfyre on November 05, 2003, 05:12 PM
Unfortunately, I can't get WC3 to run on my laptop, and that is the only machine I can packetlog on (as crappy as it is, I still only use dialup).

I'm using the same connection algorithm (I'm using the NLS) for Starcraft, BW, WC2, and Diablo 2 Classic as I am for WC3.  However, I'm getting two errors when trying to connect with WC3: the BNLS VerifyServer message returns negatory, and the 0x3A message to Battle.net is returning 0x203 (invalid password).

Are the servers for Warcraft III separate?  I've just been connecting to useast.battle.net.

Thanks in advance!

--Rob
As UserLoser pointed out, you must use SID_AUTH_ACCOUNT* with NLS 1 and above.

BNLS's implementation of the server signature checker is correct, so it's likely that you're giving it an invalid parameter.

Note that you should provide the server IPv4 address in network byte order.

MyndFyre

#2
So then, this is the order I'm getting through the BNLS specs and what you told me.  Is this right?

(some other BNLS commands like 0x0e and 0x0f, I can't remember what else)
BNCS 0x50
BNCS 0x25 (on request)
BNCS 0x51
BNLS 0x02
BNCS 0x53
BNLS 0x03
BNCS 0x54
BNCS *possibly* 0x57

Is that right?  I don't believe I'm using *any* of those packets right now, except 0x50, 0x25, and 0x51.

Thanks for the help!

--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.

Freeware

#3
Verifying a Server signature is OPTIONAL btw
If you need some source help, I believe Craz3d posted some working BNLS Warcraft III source code, search.

CrAz3D

rebundance - having or being in excess of sheer stupidity
(ré-bun-dance)
Quote from: Spht on June 22, 2004, 07:32 PMSlap.
Quote from: Adron on January 28, 2005, 09:17 AMIn a way, I believe that religion is inherently evil, which includes Christianity. I'd also say Christianity is eviller than Buddhism (has more potential for evil).
Quote from: iago on April 19, 2005, 01:06 PM
CrAz3D's ... is too big vertically, at least, too big with ... iago ...

Skywing

Quote from: Freeware on November 05, 2003, 09:14 PM
Verifying a Server signature is OPTIONAL btw
If you need some source help, I believe Craz3d posted some working BNLS Warcraft III source code, search.
Note that it's best to verify the signature to ensure that the Battle.net server you're connecting to is really what it claims to be, even though it's "optional".

Maddox

#6
Quote from: Skywing on November 05, 2003, 10:41 PM
Quote from: Freeware on November 05, 2003, 09:14 PM
Verifying a Server signature is OPTIONAL btw
If you need some source help, I believe Craz3d posted some working BNLS Warcraft III source code, search.
Note that it's best to verify the signature to ensure that the Battle.net server you're connecting to is really what it claims to be, even though it's "optional".

I used to verify it but it BNLS would sometimes return false even if the server was valid. I believe you said this was a battle.net bug, Skywing.
asdf.

Kp

Quote from: Maddox on November 06, 2003, 12:51 AM
Quote from: Skywing on November 05, 2003, 10:41 PM
Note that it's best to verify the signature to ensure that the Battle.net server you're connecting to is really what it claims to be, even though it's "optional".
I used to verify it but it BNLS would sometimes return false even if the server was valid. I believe you said this was a battle.net bug, Skywing.
Although it is presently optional, making it mandatory would be a great and cheap way to trip up clients like yours, Maddox.  Just make the server fail 1/(large number) attempts, and if anyone proceeds after the signature is wrong, ban them.  War3 and strict emulations of it will have given up when the signature was bad, so only clients which ignored it proceed.
[19:20:23] (BotNet) <[vL]Kp> Any idiot can make a bot with CSB, and many do!

Skywing

#8
Quote from: Maddox on November 06, 2003, 12:51 AM
Quote from: Skywing on November 05, 2003, 10:41 PM
Quote from: Freeware on November 05, 2003, 09:14 PM
Verifying a Server signature is OPTIONAL btw
If you need some source help, I believe Craz3d posted some working BNLS Warcraft III source code, search.
Note that it's best to verify the signature to ensure that the Battle.net server you're connecting to is really what it claims to be, even though it's "optional".

I used to verify it but it BNLS would sometimes return false even if the server was valid. I believe you said this was a battle.net bug, Skywing.
I've seen this happen with a frequency of far less than once 100 events (and I've not seen it happen for the past few months, now, come to think of it).  Given that the official client also gives up under these conditions, it would be a good idea for yours to do so as well.

Freeware

I never said you should not verify the server, I just said thats probably not your reason for the failure to login. Let me restate it: Verification of the server signature is optional, but you should do it anyway.

MyndFyre

Thanks for the help fellas.  Now here's my next problem - when I resolve the server (useast.battle.net), I get back a list of about 10 IP addresses.  I don't need to worry about it when connecting (because .NET uses the IPEndPoint class), but if I want to verify the server, which IP address do I pick?
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.

K

The one you connected to? If you're using a TcpClient to connect, don't use the Connect() method that accepts a string as the hostname, resolve the hostname first, and then use the Connect() method that accepts an IPEndPoint.  Now you know which one you've connected to.

MyndFyre

I'm not using a TcpClient, I'm using the Socket straight-up.  I use an IPEndPoint pointing to useast.battle.net:6112.

I'll modify this post when I get home later with the code in front of me.
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.

Adron

You should be able to somehow query which remote address you are currently connected to.

Using the regular socket APIs, the function is called "getpeername". Look for something similar in what you use.

TcpClient.Client.RemoteEndPoint seems to be it.