• Welcome to Valhalla Legends Archive.
 

BNLS Troubles

Started by Warrior, February 06, 2005, 07:52 AM

Previous topic - Next topic

Warrior


SID_AUTH_INFO
1  192.168.1.47:3514  63.241.83.7:6112  59  Send 
0000  01 FF 50 3A 00 00 00 00 00 36 38 58 49 52 41 54    ..P:.....68XIRAT
0010  53 C9 00 00 00 00 00 00 00 00 00 00 00 00 00 00    S...............
0020  00 00 00 00 00 00 00 00 00 55 53 41 00 55 6E 69    .........USA.Uni
0030  74 65 64 20 53 74 61 74 65 73 00                   ted States.

SID_PING
2  63.241.83.7:6112  192.168.1.47:3514  8  Recv 
0000  FF 25 08 00 63 B7 13 B3                            .%..c...

SID_AUTH_INFO
3  63.241.83.7:6112  192.168.1.47:3514  99  Recv 
0000  FF 50 63 00 00 00 00 00 1A C2 9F 55 1C 97 2E 00    .Pc........U....
0010  00 27 2D 81 91 E7 C3 01 49 58 38 36 76 65 72 36    .'-.....IX86ver6
0020  2E 6D 70 71 00 41 3D 36 36 39 39 31 34 31 31 34    .mpq.A=669914114
0030  20 42 3D 33 37 33 34 37 39 30 39 39 20 43 3D 36     B=373479099 C=6
0040  31 37 33 35 36 36 31 32 20 34 20 41 3D 41 5E 53    17356612 4 A=A^S
0050  20 42 3D 42 2D 43 20 43 3D 43 2B 41 20 41 3D 41     B=B-C C=C+A A=A
0060  5E 42 00                                           ^B.

SID_PING
4  192.168.1.47:3514  63.241.83.7:6112  8  Send 
0000  FF 25 08 00 63 7B 13 00                            .%..c{..

BNLS_VERSIONCHECK
5  192.168.1.47:3515  63.161.183.202:9367  74  Send 
0000  4A 00 09 01 00 00 00 06 00 00 00 41 3D 36 36 39    J..........A=669
0010  39 31 34 31 31 34 20 42 3D 33 37 33 34 37 39 30    914114 B=3734790
0020  39 39 20 43 3D 36 31 37 33 35 36 36 31 32 20 34    99 C=617356612 4
0030  20 41 3D 41 5E 53 20 42 3D 42 2D 43 20 43 3D 43     A=A^S B=B-C C=C
0040  2B 41 20 41 3D 41 5E 42 00 00                      +A A=A^B..

BNLS_VERSIONCHECK
6  63.161.183.202:9367  192.168.1.47:3515  55  Recv 
0000  37 00 09 01 00 00 00 03 01 01 01 9C 9D 09 15 53    7..............S
0010  74 61 72 63 72 61 66 74 2E 65 78 65 20 30 35 2F    tarcraft.exe 05/
0020  32 36 2F 30 34 20 30 30 3A 34 36 3A 30 30 20 31    26/04 00:46:00 1
0030  30 34 38 35 37 36 00                               048576.

BNLS_CDKEY
7  192.168.1.47:3515  63.161.183.202:9367  92  Send 
0000  5C 00 01 01 00 00 00 06 00 00 00 41 3D 36 36 39    \..........A=669
0010  39 31 34 31 31 34 20 42 3D 33 37 33 34 37 39 30    914114 B=3734790
0020  39 39 20 43 3D 36 31 37 33 35 36 36 31 32 20 34    99 C=617356612 4
0030  20 41 3D 41 5E 53 20 42 3D 42 2D 43 20 43 3D 43     A=A^S B=B-C C=C
0040  2B 41 20 41 3D 41 5E 42 00 00 1C 79 2E 00 31 30    +A A=A^B...y..***
0050  XX XX XX XX XX XX XX XX XX XX XX XX                ***********.

BNLS_CDKEY
8  63.161.183.202:9367  192.168.1.47:3515  7  Recv 
0000  07 00 01 00 00 00 00                               .......   <------------


As you can see BNLS_CDKEY is returning false

I send my working CDKey and the ServerToken I recieve in 0x50 back to BNLS (it being the second DWORD in 0x50)

My Code for retrieving the ServerToken

ServerToken = GetDWORD(Mid(PacketData, 9, 4))


For those who dont know what GetDWORD is it simply fetches the first DWORD in the data.

Now after I recieve 0x09 from BNLS with a true value I go on to send 0x01 for my CDKey

Here is my code for sending 0x01


                   With PBuffer
                        .InsertDWORD CLng(ServerToken)
                        .InsertNTString Config.CDKey
                        .SendPacket &H1, BNLS
                    End With


Now here is where I parse 0x01 in my Parsing sub:


           Case &H1
                    CDKeyResult = GetDWORD(Left(PacketData, 4))
                If CDKeyResult = &H0 Then
                    AddChat vbRed, "BNLS CDKey Check failed!"
                        frmChat.sckBNET.Close
                        frmChat.sckBNLS.Close
                     Exit Sub
                 ElseIf CDKeyResult = &H1 Then
                    AddChat vbGreen, "BNLS CDKey Check passed!"
                End If


As you can see I have not finished parsing it yet since I havn't been able to get passed it always returning false. Any help on this is appreciated.

Edit: here is my code to send 0x09 (BNLS_VERSIONCHECK) if it makes a difference


                        With PBuffer
                            .InsertDWORD &H1 '(DWORD) Product ID
                            .InsertDWORD Mid(IX86VerFilename, 8, 1) '(DWORD) Version DLL digit
                            .InsertNTString ValueString '(STRING) Checksum formula.
                            .SendPacket &H9, BNLS 'BNLS_VERSION_CHECK
                        End With
Quote from: effect on March 09, 2006, 11:52 PM
Islam is a steaming pile of fucking dog shit. Everything about it is flawed, anybody who believes in it is a terrorist, if you disagree with me, then im sorry your wrong.

Quote from: Rule on May 07, 2006, 01:30 PM
Why don't you stop being American and start acting like a decent human?

UserLoser.

Quote from: Warrior on February 06, 2005, 07:52 AM

BNLS_VERSIONCHECK
5  192.168.1.47:3515  63.161.183.202:9367  74  Send 
0000  4A 00 09 01 00 00 00 06 00 00 00 41 3D 36 36 39    J..........A=669
0010  39 31 34 31 31 34 20 42 3D 33 37 33 34 37 39 30    914114 B=3734790
0020  39 39 20 43 3D 36 31 37 33 35 36 36 31 32 20 34    99 C=617356612 4
0030  20 41 3D 41 5E 53 20 42 3D 42 2D 43 20 43 3D 43     A=A^S B=B-C C=C
0040  2B 41 20 41 3D 41 5E 42 00 00                      +A A=A^B..

BNLS_CDKEY
7  192.168.1.47:3515  63.161.183.202:9367  92  Send 
0000  5C 00 01 01 00 00 00 06 00 00 00 41 3D 36 36 39    \..........A=669
0010  39 31 34 31 31 34 20 42 3D 33 37 33 34 37 39 30    914114 B=3734790
0020  39 39 20 43 3D 36 31 37 33 35 36 36 31 32 20 34    99 C=617356612 4
0030  20 41 3D 41 5E 53 20 42 3D 42 2D 43 20 43 3D 43     A=A^S B=B-C C=C
0040  2B 41 20 41 3D 41 5E 42 00 00 1C 79 2E 00 31 30    +A A=A^B...y..***
0050  XX XX XX XX XX XX XX XX XX XX XX XX                ***********.


This is too obvious.  Look at what you're sending for BNLS_CDKEY message..

Warrior

#2
Wow lol didn't even notice, thanks!

Edit: Found why that was happening: When I was sending messages to BNLS I was forgetting to clear the Buffer after each packet was sent. Thanks again UserLoser.
Quote from: effect on March 09, 2006, 11:52 PM
Islam is a steaming pile of fucking dog shit. Everything about it is flawed, anybody who believes in it is a terrorist, if you disagree with me, then im sorry your wrong.

Quote from: Rule on May 07, 2006, 01:30 PM
Why don't you stop being American and start acting like a decent human?

MyndFyre

#3
Quote from: BloodArrow on March 08, 2005, 08:44 AM
Information for noob: this big edit work is for what? For use sb bot with BNL server without Alternative BNLS Java server and with 1.18 path in wc3?

Any ppl can explain me about this?
Can you rephrase your question in English please?

[edit] I just saw this:
Quote from: BloodArrow on March 06, 2005, 12:57 PM
I don't speak English well (it is not my mother language), therefore I ask all you it excuses for the imperfections of language!
Not meaning to be rude, but you will need to rephrase your question somewhat more clearly.  I don't understand what you're asking.
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.