Valhalla Legends Forums Archive | Battle.net Bot Development | Yet another person with BNLS trouble (fixed)

AuthorMessageTime
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?
October 11, 2004, 1:14 PM
Kp
[quote author=TangoFour link=topic=9096.msg83940#msg83940 date=1097500468]
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?[/quote]

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.
October 11, 2004, 1:50 PM
TangoFour
Stealthbot:
[code]
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                ........ ...
[/code]

My client:
[code]
00000000  07 00 10 07 00 00 00                            .......
                                                                              00000000  0b 00 10 07 00 00 00 11  00 00 00                ........ ...

[/code]

(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:

[code]
case BNLS.REQUESTVERSIONBYTE:
int productID = b.getInt();
if (productID == BNLS.PRODUCT_WARCRAFT3)
{
                                        ....
}
else
{
throw new IOException();
}
[/code]
October 11, 2004, 2:00 PM
Soul Taker
[quote author=TangoFour link=topic=9096.msg83951#msg83951 date=1097503252]
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:

[code]
case BNLS.REQUESTVERSIONBYTE:
int productID = b.getInt();
if (productID == BNLS.PRODUCT_WARCRAFT3)
{
                                        ....
}
else
{
throw new IOException();
}
[/code]
[/quote]
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?
October 11, 2004, 3:18 PM
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.

October 11, 2004, 3:49 PM

Search