• Welcome to Valhalla Legends Archive.
 

Yet another person with BNLS trouble (fixed)

Started by TangoFour, October 11, 2004, 08:14 AM

Previous topic - Next topic

TangoFour

Well, to cut straight to the chase:

BNLS is rejecting my connection. The connection stops just after I send the 0x10 packet (version byte request). I've packetlogged my own connection, and compared it to Stealthbot logging in.

The only difference is that Stealthbot first authenticates, and I'm trying to perform an anonymous login (as detailed in the spec), so my client simply skips the BNLS 0x0e and 0x0f packet.

I've tried both bnls.valhallalegends.com and www.valhallalegends.com as BNLS server - not that it makes much of a difference since both resolve to the same IP address.

Any thoughts?

Kp

Quote from: TangoFour on October 11, 2004, 08:14 AM
BNLS is rejecting my connection. The connection stops just after I send the 0x10 packet (version byte request). I've packetlogged my own connection, and compared it to Stealthbot logging in.

The only difference is that Stealthbot first authenticates, and I'm trying to perform an anonymous login (as detailed in the spec), so my client simply skips the BNLS 0x0e and 0x0f packet.

I've tried both bnls.valhallalegends.com and www.valhallalegends.com as BNLS server - not that it makes much of a difference since both resolve to the same IP address.

Any thoughts?

Post packet logs of both connections, including the BNLS IP+port used by that connection.  Cut the Stealthbot connection log off after it sends the 0x10 message, since we don't need your username/password/cdkey.
[19:20:23] (BotNet) <[vL]Kp> Any idiot can make a bot with CSB, and many do!

TangoFour

#2
Stealthbot:

00000000  0b 00 0e 73 74 65 61 6c  74 68 00                ...steal th.
                                                                              00000000  07 00 0e 99 fd 4e 62                             ...™ýNb
0000000B  07 00 0f 10 8f 49 c6                             .....I.
                                                                              00000007  07 00 0f 00 00 00 00                             .......
00000012  07 00 10 07 00 00 00                             .......
                                                                              0000000E  0b 00 10 07 00 00 00 11  00 00 00                ........ ...


My client:

00000000  07 00 10 07 00 00 00                             .......
                                                                              00000000  0b 00 10 07 00 00 00 11  00 00 00                ........ ...



(This time I am getting a response, I didn't earlier)

I found the problem though - I recently changed my code for incoming packets to handle packets sticking together, but it seems I never tested it. I forgot to set the Buffer to use Little Endian which caused my BNLS handling code to report an invalid version:


case BNLS.REQUESTVERSIONBYTE:
int productID = b.getInt();
if (productID == BNLS.PRODUCT_WARCRAFT3)
{
                                         ....
}
else
{
throw new IOException();
}

Soul Taker

Quote from: TangoFour on October 11, 2004, 09:00 AM
I found the problem though - I recently changed my code for incoming packets to handle packets sticking together, but it seems I never tested it. I forgot to set the Buffer to use Little Endian which caused my BNLS handling code to report an invalid version:


case BNLS.REQUESTVERSIONBYTE:
int productID = b.getInt();
if (productID == BNLS.PRODUCT_WARCRAFT3)
{
                                         ....
}
else
{
throw new IOException();
}

I don't understand.  Why are you requesting the correct version, then not using it if your client doesn't agree with it?  And you said you were comparing packet logs, didn't you notice that BNLS had responded?
Also, you said the connection to BNLS was being rejected, now say it was an invalid version thing?

TangoFour

Upon my first packet log, I indeed did not receive anything - the packet log I posted was my second.

As for the code posted - it says to disconnect if the version byte I received was not for WarCraft 3 (should be impossible but still) - in this case it report the version to be a value above 1 million, which clearly isn't the correct code for WarCraft 3 (which was caused by it not being read as Little Endian).

I never said it was an invalid version thing - I initially thought BNLS was rejecting my connection, and after that concluded that it wasn't processing my received code as Little Endian.