• Welcome to Valhalla Legends Archive.
 

WAR3 BNLS help [VB6]

Started by Blaze, October 09, 2004, 11:00 PM

Previous topic - Next topic

Blaze

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

16 00 02 4B 6B 29 42 6C 61 7A 65 28 6B 4B 00 ** ** ** ** ** ** 00     ...Kk)Blaze(kK.******

Stealthbots 0x02

16 00 02 4B 6B 29 42 6C 61 7A 65 28 6B 4B 00 ** ** ** ** ** ** 00     ...Kk)Blaze(kK.******


My Response of 0x02

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


Stealthbots Response of 0x02

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                                                 ...


My Code for 0x02

        Packet.InsertNTString INFO.Username 'Kk)Blaze(kK
        Packet.InsertNTString INFO.Password '******
        Packet.SendBNLSPacket &H2



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



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

I don't understand why I would get a different result from sending the same thing....
Any help would be appreciated...
Quote
Mitosis: Haha, Im great arent I!
hismajesty[yL]: No

Skywing

You will always get a different result every time you request a logon challenge.  This is the expected behavior.

Blaze

#2
Well, the problem is that everytime my bot connects, It gives invalid password no matter what..

My 0x53

Packet.InsertNonNTString Mid(Data, 4)
Packet.InsertNTString INFO.Username
Packet.SendPacket &H53


My 0x03


        Packet.InsertNonNTString Mid(Data, 9)
        Packet.SendBNLSPacket &H3


My 0x54

            Packet.InsertNonNTString Mid(Data, 4)
            Packet.SendPacket &H54


Parsing of 0x54

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


Packet Log for log-in



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                ............



Quote
Mitosis: Haha, Im great arent I!
hismajesty[yL]: No

UserLoser.

So supply a correct password

Blaze

I am sending the same password as stealthbot is for my acount, but I always get the wrong password..
Quote
Mitosis: Haha, Im great arent I!
hismajesty[yL]: No

Kp

Quote from: Blaze on October 10, 2004, 12:24 PMI am sending the same password as stealthbot is for my acount, but I always get the wrong password..

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.
[19:20:23] (BotNet) <[vL]Kp> Any idiot can make a bot with CSB, and many do!

Blaze

#6
Quote from: Kp on October 10, 2004, 12:41 PM
Check that your messages to BNLS are byte-for-byte the same as Stealthbot's

They are the same
Quote from: Kp on October 10, 2004, 12:41 PM
(we can't do this since you blotted out your cdkey and password).

Can you blame me?

Quote from: Kp on October 10, 2004, 12:41 PM
If they are, then verify that you are copying the correct parts of BNLS' response to the correct locations for outbound data.

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

Quote from: Kp on October 10, 2004, 12:41 PM
Oh, and stop using VB.

Blaze
Jr. Member
Posts: 144
VB (Learning C++)


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.
Quote
Mitosis: Haha, Im great arent I!
hismajesty[yL]: No

Kp

Quote from: Blaze on October 10, 2004, 05:54 PMThey are the same

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

Quote from: Blaze on October 10, 2004, 05:54 PM
Quote from: Kp on October 10, 2004, 12:41 PM(we can't do this since you blotted out your cdkey and password).
Can you blame me?
No.  I'm just noting why I left the burden on you. :)

Quote from: Blaze on October 10, 2004, 05:54 PM
Quote from: Kp on October 10, 2004, 12:41 PMIf they are, then verify that you are copying the correct parts of BNLS' response to the correct locations for outbound data.
I am following the packets just like the bnls documentaion tells me too.
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).
[19:20:23] (BotNet) <[vL]Kp> Any idiot can make a bot with CSB, and many do!

Blaze

Quote from: Kp on October 10, 2004, 06:36 PM
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.

Ok, I'll do that the next time I am home.
Quote
Mitosis: Haha, Im great arent I!
hismajesty[yL]: No