Valhalla Legends Forums Archive | Battle.net Bot Development | WAR3 BNLS help [VB6]

AuthorMessageTime
KkBlazekK
Ok. I have a problem with wc3. I have done all the connection packets and all that jazz, but when I send 0x02 . I get a different result then all the other bots, but I send the same thing.

My Bots 0x02
[code]
16 00 02 4B 6B 29 42 6C 61 7A 65 28 6B 4B 00 ** ** ** ** ** ** 00    ...Kk)Blaze(kK.******
[/code]
Stealthbots 0x02
[code]
16 00 02 4B 6B 29 42 6C 61 7A 65 28 6B 4B 00 ** ** ** ** ** ** 00    ...Kk)Blaze(kK.******
[/code]

My Response of 0x02
[code]
23 00 02 81 7F 7C 48 3D 54 B4 73 11 3E F5 71 71          #....|H=T.s.>.qq
CD A4 E7 D8 00 9A 4B 7F 9C 5A 23 53 A7 F0 24 6E          ......K..Z#S..$n
47 3F 77                                                G?w
[/code]

Stealthbots Response of 0x02
[code]
23 00 02 30 36 0E D0 85 09 03 81 CF 3B 19 3C C9          #..06.......;.<.
CA CE 31 2B 50 B7 D1 BC F8 C7 E2 3A 66 C8 E3 9C          ..1+P......:f...
E5 AA E5                                                ...
[/code]

My Code for 0x02
[code]
        Packet.InsertNTString INFO.Username 'Kk)Blaze(kK
        Packet.InsertNTString INFO.Password '******
        Packet.SendBNLSPacket &H2
[/code]

[code]
Public Function SendPacket(PacketID As Byte)
If frmMain.Socket.State = sckConnected Then
frmMain.Socket.SendData Chr(&HFF) & Chr(PacketID) & MakeWORD(Len(Buffer) + 4) & Buffer
Clear
End If
End Function
[/code]

[code]
Public Function SendBNLSPacket(PacketID As Byte)
If frmMain.sckBNLS.State = sckConnected Then
frmMain.sckBNLS.SendData MakeWORD(Len(Buffer) + 3) & Chr(PacketID) & Buffer
Clear
End If
End Function
[/code]
I don't understand why I would get a different result from sending the same thing....
Any help would be appreciated...
October 10, 2004, 4:00 AM
Skywing
You will always get a different result every time you request a logon challenge.  This is the expected behavior.
October 10, 2004, 4:08 AM
KkBlazekK
Well, the problem is that everytime my bot connects, It gives invalid password no matter what..

My 0x53
[code]
Packet.InsertNonNTString Mid(Data, 4)
Packet.InsertNTString INFO.Username
Packet.SendPacket &H53
[/code]

My 0x03

[code]
        Packet.InsertNonNTString Mid(Data, 9)
        Packet.SendBNLSPacket &H3
[/code]

My 0x54
[code]
            Packet.InsertNonNTString Mid(Data, 4)
            Packet.SendPacket &H54
[/code]

Parsing of 0x54
[code]
Case &H54
    Select Case GetWORD(Mid(Data, 5, 1))
        Case &H0
            INFO.Connected = True
                    AddInfo "[BlazeBot] ", vbCyan, "BNET: Login Successfull", vbGreen
                          BNET "0x0A"
                          BNET "0x0B"
                          BNET "0x0C"
        Case &H1
                    AddError "[BlazeBot] ", vbCyan, "BNET: Logon failed!", vbRed
                    Disconnect
        Case &H2
                    AddError "[BlazeBot] ", vbCyan, "BNET: Incorrect Password!", vbRed
                    Disconnect
        Case &H3
                    AddInfo "[BlazeBot] ", vbCyan, "BNET: Login Successfull", vbGreen
                          BNET "0x0A"
                          BNET "0x0B"
                          BNET "0x0C"
        Case &HF
                    AddError "[BlazeBot] ", vbCyan, "BNET: Login Error!", vbRed
                    Disconnect
        Case Else
        AddError StrToHex(Data), vbMagenta
        End Select
[/code]

Packet Log for log-in

[code]

1  192.168.1.100:1609  63.161.183.207:9367  7  Send 
0000  07 00 10 07 00 00 00                              .......

2  63.161.183.207:9367  192.168.1.100:1609  11  Recv 
0000  0B 00 10 07 00 00 00 11 00 00 00                  ...........

3  192.168.1.100:1610  63.241.83.13:6112  60  Send 
0000  01 FF 50 33 00 00 00 00 00 36 38 58 49 33 52 41    ..P3.....68XI3RA
0010  57 11 00 00 00 00 00 00 00 00 00 00 00 00 00 00    W...............
0020  00 00 00 00 00 00 00 00 00 43 41 4E 00 43 61 6E    .........CAN.Can
0030  61 64 61 00 FF 25 08 00 00 00 00 00                ada..%......

4  63.241.83.13:6112  192.168.1.100:1610  8  Recv 
0000  FF 25 08 00 E3 F0 C5 56                            .%.....V

5  63.241.83.13:6112  192.168.1.100:1610  227  Recv 
0000  FF 50 E3 00 02 00 00 00 D6 4C 69 54 27 7F 40 00    .P.......LiT'.@.
0010  00 46 37 7B 91 E7 C3 01 49 58 38 36 76 65 72 33    .F7{....IX86ver3
0020  2E 6D 70 71 00 41 3D 37 35 36 31 36 35 31 39 33    .mpq.A=756165193
0030  20 42 3D 38 31 33 38 39 36 31 30 35 20 43 3D 34    B=813896105 C=4
0040  34 37 33 37 35 39 31 34 20 34 20 41 3D 41 5E 53    47375914 4 A=A^S
0050  20 42 3D 42 5E 43 20 43 3D 43 5E 41 20 41 3D 41    B=B^C C=C^A A=A
0060  5E 42 00 F7 F9 67 A6 A0 93 85 48 39 58 B6 61 98    ^B...g....H9X.a.
0070  DE 6D DF EE 9B 1D 39 B8 57 69 87 CF 36 AE EF 43    .m....9.Wi..6..C
0080  E2 F8 F4 19 0A 6A 1B 0A F0 F7 03 3F D6 EA 75 9B    .....j.....?..u.
0090  93 0A 31 EA AD 4F 13 D5 4E A8 6C C2 1B DF 8A C9    ..1..O..N.l.....
00A0  BF 88 D7 26 AE 0F 3D 9B 77 A7 04 44 42 41 C1 BE    ...&..=.w..DBA..
00B0  5B D2 FE 73 93 F0 6C 0F 60 5A 43 62 58 FA 41 F2    [..s..l.`ZCbX.A.
00C0  D5 B4 9B 4C 43 EC 94 74 7C D8 06 DE DE A5 76 FE    ...LC..t|.....v.
00D0  F3 8B 19 E5 2D CB FB B1 F7 1D 74 B9 31 26 3D 43    ....-.....t.1&=C
00E0  2D 02 2B                                          -.+

6  192.168.1.100:1609  63.161.183.207:9367  202  Send 
0000  CA 00 09 07 00 00 00 03 00 00 00 41 3D 37 35 36    ...........A=756
0010  31 36 35 31 39 33 20 42 3D 38 31 33 38 39 36 31    165193 B=8138961
0020  30 35 20 43 3D 34 34 37 33 37 35 39 31 34 20 34    05 C=447375914 4
0030  20 41 3D 41 5E 53 20 42 3D 42 5E 43 20 43 3D 43    A=A^S B=B^C C=C
0040  5E 41 20 41 3D 41 5E 42 00 F7 F9 67 A6 A0 93 85    ^A A=A^B...g....
0050  48 39 58 B6 61 98 DE 6D DF EE 9B 1D 39 B8 57 69    H9X.a..m....9.Wi
0060  87 CF 36 AE EF 43 E2 F8 F4 19 0A 6A 1B 0A F0 F7    ..6..C.....j....
0070  03 3F D6 EA 75 9B 93 0A 31 EA AD 4F 13 D5 4E A8    .?..u...1..O..N.
0080  6C C2 1B DF 8A C9 BF 88 D7 26 AE 0F 3D 9B 77 A7    l........&..=.w.
0090  04 44 42 41 C1 BE 5B D2 FE 73 93 F0 6C 0F 60 5A    .DBA..[..s..l.`Z
00A0  43 62 58 FA 41 F2 D5 B4 9B 4C 43 EC 94 74 7C D8    CbX.A....LC..t|.
00B0  06 DE DE A5 76 FE F3 8B 19 E5 2D CB FB B1 F7 1D    ....v.....-.....
00C0  74 B9 31 26 3D 43 2D 02 2B 00                      t.1&=C-.+.

7  63.161.183.207:9367  192.168.1.100:1609  50  Recv 
0000  32 00 09 01 00 00 00 64 11 00 01 EF 0F 5D 09 57    2......d.....].W
0010  61 72 33 2E 65 78 65 20 30 39 2F 31 35 2F 30 34    ar3.exe 09/15/04
0020  20 32 32 3A 34 32 3A 31 36 20 31 35 36 38 32 31    22:42:16 156821
0030  31 00                                              1.

8  192.168.1.100:1609  63.161.183.207:9367  34  Send 
0000  22 00 00 00 ** ** ** ** ** ** ** ** ** ** ** **    "...************
0010  ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** **    *****************
0020  ** 00                                              *.

9  63.161.183.207:9367  192.168.1.100:1609  47  Recv 
0000  2F 00 01 01 00 00 00 7B 02 AA 67 1A 00 00 00 0E    /......{..g.....
0010  00 00 00 F6 BD 61 00 00 00 00 00 D2 A1 8F 6F D4    .....a........o.
0020  96 E7 E5 39 79 08 B1 7A A4 F8 C1 11 AC 0F A0      ...9y..z.......

10  192.168.1.100:1610  63.241.83.13:6112  104  Send 
0000  FF 51 68 00 7B 02 AA 67 64 11 00 01 EF 0F 5D 09    .Qh.{..gd.....].
0010  01 00 00 00 00 00 00 00 1A 00 00 00 0E 00 00 00    ................
0020  F6 BD 61 00 00 00 00 00 D2 A1 8F 6F D4 96 E7 E5    ..a........o....
0030  39 79 08 B1 7A A4 F8 C1 11 AC 0F A0 57 61 72 33    9y..z.......War3
0040  2E 65 78 65 20 30 39 2F 31 35 2F 30 34 20 32 32    .exe 09/15/04 22
0050  3A 34 32 3A 31 36 20 31 35 36 38 32 31 31 00 42    :42:16 1568211.B
0060  6C 61 7A 65 42 6F 74 00                            lazeBot.

11  63.241.83.13:6112  192.168.1.100:1610  9  Recv 
0000  FF 51 09 00 00 00 00 00 00                        .Q.......

12  192.168.1.100:1609  63.161.183.207:9367  22  Send 
0000  16 00 02 4B 6B 29 42 6C 61 7A 65 28 6B 4B 00 **    ...Kk)Blaze(kK.*
0010  ** ** ** ** ** 00                                  *****.

13  63.161.183.207:9367  192.168.1.100:1609  35  Recv 
0000  23 00 02 9F 49 4C A7 9E 9E FB 9D DD 04 02 F3 0D    #...IL..........
0010  EC FE 93 82 A0 79 1A 35 09 CD 1E 93 17 43 D4 50    .....y.5.....C.P
0020  E2 6F 3D                                          .o=

14  192.168.1.100:1610  63.241.83.13:6112  48  Send 
0000  FF 53 30 00 9F 49 4C A7 9E 9E FB 9D DD 04 02 F3    .S0..IL.........
0010  0D EC FE 93 82 A0 79 1A 35 09 CD 1E 93 17 43 D4    ......y.5.....C.
0020  50 E2 6F 3D 4B 6B 29 42 6C 61 7A 65 28 6B 4B 00    P.o=Kk)Blaze(kK.

15  63.241.83.13:6112  192.168.1.100:1610  72  Recv 
0000  FF 53 48 00 00 00 00 00 53 DE 56 A4 7F 04 15 56    .SH.....S.V....V
0010  37 2F FE E9 B3 34 1A 12 0B A5 ED AE AA 77 CF FD    7/...4.......w..
0020  AC 19 CC 57 6C B4 2E 89 DA 50 21 3A 43 A2 3F DF    ...Wl....P!:C.?.
0030  08 71 30 B6 68 BD E3 04 D2 AA 59 99 8B 87 65 30    .q0.h.....Y...e0
0040  89 5A 7F DA 20 0B 02 74                            .Z.. ..t

16  192.168.1.100:1609  63.161.183.207:9367  67  Send 
0000  43 00 03 53 DE 56 A4 7F 04 15 56 37 2F FE E9 B3    C..S.V....V7/...
0010  34 1A 12 0B A5 ED AE AA 77 CF FD AC 19 CC 57 6C    4.......w.....Wl
0020  B4 2E 89 DA 50 21 3A 43 A2 3F DF 08 71 30 B6 68    ....P!:C.?..q0.h
0030  BD E3 04 D2 AA 59 99 8B 87 65 30 89 5A 7F DA 20    .....Y...e0.Z..
0040  0B 02 74                                          ..t

17  63.161.183.207:9367  192.168.1.100:1609  23  Recv 
0000  17 00 03 BE 3F A9 BC 19 BA 0B 5E 9C EE AD 9A 0A    ....?.....^.....
0010  13 68 F3 D6 65 00 09                              .h..e..

18  192.168.1.100:1610  63.241.83.13:6112  24  Send 
0000  FF 54 18 00 BE 3F A9 BC 19 BA 0B 5E 9C EE AD 9A    .T...?.....^....
0010  0A 13 68 F3 D6 65 00 09                            ..h..e..

19  63.241.83.13:6112  192.168.1.100:1610  28  Recv 
0000  FF 54 1C 00 02 00 00 00 00 00 00 00 00 00 00 00    .T..............
0010  00 00 00 00 00 00 00 00 00 00 00 00                ............

[/code]

October 10, 2004, 4:09 AM
UserLoser.
So supply a correct password
October 10, 2004, 5:06 PM
KkBlazekK
I am sending the same password as stealthbot is for my acount, but I always get the wrong password..
October 10, 2004, 5:24 PM
Kp
[quote author=Blaze link=topic=9075.msg83862#msg83862 date=1097429047]I am sending the same password as stealthbot is for my acount, but I always get the wrong password..[/quote]

Either you are incorrect in this belief, or your client is mangling BNLS's response before sending to battle.net.  Check that your messages to BNLS are byte-for-byte the same as Stealthbot's (we can't do this since you blotted out your cdkey and password).  If they are, then verify that you are copying the correct parts of BNLS' response to the correct locations for outbound data.

Oh, and stop using VB.
October 10, 2004, 5:41 PM
KkBlazekK
[quote author=Kp link=topic=9075.msg83863#msg83863 date=1097430093]
Check that your messages to BNLS are byte-for-byte the same as Stealthbot's
[/quote]

They are the same
[quote author=Kp link=topic=9075.msg83863#msg83863 date=1097430093]
(we can't do this since you blotted out your cdkey and password).
[/quote]

Can you blame me?

[quote author=Kp link=topic=9075.msg83863#msg83863 date=1097430093]
If they are, then verify that you are copying the correct parts of BNLS' response to the correct locations for outbound data.
[/quote]

I am following the packets just like the bnls documentaion tells me too.

[quote author=Kp link=topic=9075.msg83863#msg83863 date=1097430093]
Oh, and stop using VB.
[/quote]

Blaze
Jr. Member
Posts: 144
VB (Learning [u]C++[/u])


Normally knowing me I made a mistake somewhere, I have debuged through my code time after time, trying new things, and getting IPBanned in the process. I'm going to keep trying, and Thank you for the advice with vb.
October 10, 2004, 10:54 PM
Kp
[quote author=Blaze link=topic=9075.msg83883#msg83883 date=1097448886]They are the same[/quote]

Good; it is likely a problem copying the bytes from BNLS' response to battle.net then.

[quote author=Blaze link=topic=9075.msg83883#msg83883 date=1097448886][quote author=Kp link=topic=9075.msg83863#msg83863 date=1097430093](we can't do this since you blotted out your cdkey and password).[/quote]Can you blame me?[/quote]No.  I'm just noting why I left the burden on you. :)

[quote author=Blaze link=topic=9075.msg83883#msg83883 date=1097448886][quote author=Kp link=topic=9075.msg83863#msg83863 date=1097430093]If they are, then verify that you are copying the correct parts of BNLS' response to the correct locations for outbound data.[/quote]I am following the packets just like the bnls documentaion tells me too.[/quote]I had expected you had already checked that.  What I meant for you to do was to compare Stealthbot's successful logon with your failed one, byte for byte (without reference to the BNLS specification).  That is, for each byte position in the message Stealthbot sends to battle.net, find the corresponding byte in BNLS' answer.  Then go to the dump of your logon and verify that the byte at that position in BNLS' answer to you appeared in the correct spot.  It's very slow in description, but a "blink" comparison should make it pretty fast to do.  Alternately, you could post that information, since we're only discussing the messages that are used after your password and username have already been processed (and thus you won't be giving away anything by posting these dumps).
October 10, 2004, 11:36 PM
KkBlazekK
[quote author=Kp link=topic=9075.msg83891#msg83891 date=1097451386]
That is, for each byte position in the message Stealthbot sends to battle.net, find the corresponding byte in BNLS' answer. Then go to the dump of your logon and verify that the byte at that position in BNLS' answer to you appeared in the correct spot. It's very slow in description, but a "blink" comparison should make it pretty fast to do.[/quote]

Ok, I'll do that the next time I am home.
October 11, 2004, 12:02 AM

Search