Valhalla Legends Forums Archive | Battle.net Bot Development | BNLS Troubles

AuthorMessageTime
Quarantine
[code]
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                              .......  <------------
[/code]

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
[code]
ServerToken = GetDWORD(Mid(PacketData, 9, 4))
[/code]

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

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

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

[code]
          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
[/code]

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

[code]
                        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
[/code]
February 6, 2005, 1:52 PM
UserLoser.
[quote author=Warrior link=topic=10450.msg98473#msg98473 date=1107697951]
[code]
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                ***********.
[/code]
[/quote]

This is too obvious.  Look at what you're sending for BNLS_CDKEY message..
February 6, 2005, 6:20 PM
Quarantine
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.
February 6, 2005, 8:06 PM
Myndfyr
[quote author=BloodArrow link=topic=10450.msg102830#msg102830 date=1110293043]
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?
[/quote]
Can you rephrase your question in English please?

[edit] I just saw this:
[quote author=BloodArrow link=topic=10834.msg102689#msg102689 date=1110135440]
I don't speak English well (it is not my mother language), therefore I ask all you it excuses for the imperfections of language!
[/quote]
Not meaning to be rude, but you will need to rephrase your question somewhat more clearly.  I don't understand what you're asking.
March 8, 2005, 3:20 PM

Search