Valhalla Legends Forums Archive | Battle.net Bot Development | BNLS 0x09 Won't Respond to Me

AuthorMessageTime
R.a.B.B.i.T
For a while now I have been unable to get a response from BNLS (or JBLS, for that matter) from 0x09.  I have checked my code time and again, but I don't see anything wrong with it (below).  Anyone know why this might be happening?

[code]    MPQName = Mid(szData, 25, 12)
    MPQNumber = Val(Mid(MPQName, 8, 1))
    InsertDWORD GetBNLSByte()
    InsertDWORD CLng(MPQNumber)
    InsertNTString HashVals
    SendPacket BNLS, &H9[/code]
December 7, 2004, 2:52 AM
The-FooL
Thats the right info to send, check for dumb things such as if the packet is actually sent, or if there is information in the variables.
December 7, 2004, 3:00 AM
Mephisto
Paste packet log please; not a lot we can do without it.
December 7, 2004, 3:03 AM
R.a.B.B.i.T
[quote]15  192.168.***.***:2312  63.241.83.109:6112  1  Send 
0000  01                                                .

16  192.168.***.***:2312  63.241.83.109:6112  58  Send 
0000  FF 50 3A 00 00 00 00 00 36 38 58 49 50 58 45 53    .P:.....68XIPXES
0010  C9 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
0020  00 00 00 00 00 00 00 00 55 53 41 00 55 6E 69 74    ........USA.Unit
0030  65 64 20 53 74 61 74 65 73 00                      ed States.

17  192.168.***.***:2312  63.241.83.109:6112  8  Send 
0000  FF 25 08 00 00 00 00 00                            .%......

18  63.241.83.109:6112  192.168.***.***:2312  107  Recv 
0000  FF 25 08 00 1C 1C 2F 57 FF 50 63 00 00 00 00 00    .%..../W.Pc.....
0010  93 13 1A A4 5E 9B 12 00 00 A0 99 7D 91 E7 C3 01    ....^......}....
0020  49 58 38 36 76 65 72 34 2E 6D 70 71 00 41 3D 36    IX86ver4.mpq.A=6
0030  30 37 31 30 33 35 36 35 20 42 3D 38 39 32 37 34    07103565 B=89274
0040  30 39 33 39 20 43 3D 31 34 36 33 36 35 30 32 35    0939 C=146365025
0050  20 34 20 41 3D 41 2B 53 20 42 3D 42 2B 43 20 43    4 A=A+S B=B+C C
0060  3D 43 2B 41 20 41 3D 41 2B 42 00                  =C+A A=A+B.

19  192.168.***.***:2311  63.161.183.202:9367  74  Send 
0000  4A 00 09 02 00 00 00 04 00 00 00 41 3D 36 30 37    J..........A=607
0010  31 30 33 35 36 35 20 42 3D 38 39 32 37 34 30 39    103565 B=8927409
0020  33 39 20 43 3D 31 34 36 33 36 35 30 32 35 20 34    39 C=146365025 4
0030  20 41 3D 41 2B 53 20 42 3D 42 2B 43 20 43 3D 43    A=A+S B=B+C C=C
0040  2B 41 20 41 3D 41 2B 42 00 00                      +A A=A+B..[/quote]
December 7, 2004, 3:26 AM
Newby
We're not concerned with your local IP eh?
December 7, 2004, 3:56 AM
UserLoser.
[quote author=R.a.B.B.i.T link=topic=9807.msg91328#msg91328 date=1102389978]
19  192.168.***.***:2311  63.161.183.202:9367  74  Send 
0000  4A 00 09 02 00 00 00 04 00 00 00 41 3D 36 30 37    J..........A=607
0010  31 30 33 35 36 35 20 42 3D 38 39 32 37 34 30 39    103565 B=8927409
0020  33 39 20 43 3D 31 34 36 33 36 35 30 32 35 20 34    39 C=146365025 4
0030  20 41 3D 41 2B 53 20 42 3D 42 2B 43 20 43 3D 43    A=A+S B=B+C C=C
0040  2B 41 20 41 3D 41 2B 42 00 00                      +A A=A+B..[/quote]
[quote][/quote]

You're supplying an extra-unneeded byte at the end
December 7, 2004, 4:00 AM
Cyberpenguin
[quote author=R.a.B.B.i.T link=topic=9807.msg91321#msg91321 date=1102387936]
For a while now I have been unable to get a response from BNLS (or JBLS, for that matter) from 0x09.  I have checked my code time and again, but I don't see anything wrong with it (below).  Anyone know why this might be happening?

[code]    MPQName = Mid(szData, 25, 12)
    MPQNumber = Val(Mid(MPQName, 8, 1))
    InsertDWORD GetBNLSByte()
    InsertDWORD CLng(MPQNumber)
    InsertNTString HashVals
    SendPacket BNLS, &H9[/code]
[/quote]

hmm
[code]With PBuffer
                    .InsertDWORD GetBNLSByte()
                    .InsertDWORD CLng(Val(Mid(Mid(data, 25, 12), 8, 1)))
                    .InsertNTString Mid(data, 38, Len(data) - 2)
                    .SendBNLSPacket &H9
                End With[/code]
December 7, 2004, 4:43 AM
UserLoser.
[quote author=Cyberpenguin link=topic=9807.msg91343#msg91343 date=1102394635]
[quote author=R.a.B.B.i.T link=topic=9807.msg91321#msg91321 date=1102387936]
For a while now I have been unable to get a response from BNLS (or JBLS, for that matter) from 0x09.  I have checked my code time and again, but I don't see anything wrong with it (below).  Anyone know why this might be happening?

[code]    MPQName = Mid(szData, 25, 12)
    MPQNumber = Val(Mid(MPQName, 8, 1))
    InsertDWORD GetBNLSByte()
    InsertDWORD CLng(MPQNumber)
    InsertNTString HashVals
    SendPacket BNLS, &H9[/code]
[/quote]

hmm
[code]With PBuffer
                    .InsertDWORD GetBNLSByte()
                    .InsertDWORD CLng(Val(Mid(Mid(data, 25, 12), 8, 1)))
                    .InsertNTString Mid(data, 38, Len(data) - 2)
                    .SendBNLSPacket &H9
                End With[/code]
[/quote]

What happens if the server requires the use of an MPQ with a name such as "IX86versioning1.mpq"?  Your code will no longer work and probably break.  That's a bad way to do things (hardcoding values which may change)
December 7, 2004, 4:45 AM
Cyberpenguin
i only login with D2Lod/classic, and it hasent "broken" for me once. But if you would like to post a suggestion, i would be glad to hear it. This is just the way ive always done it, ive never had problems so i dont see any need to change it :P
December 7, 2004, 6:18 AM
Zakath
Consider the way I do it, which makes no assumptions about the length of the strings:

[code]strcpy( MPQName, (LPTSTR)(data + 24));
strcpy( ChecksumFormula, (LPTSTR)(data + strlen(MPQName) + 25));[/code]

Not only will it not break if the MPQ archive has a different sort of name, it also is shorter and cleaner.
December 7, 2004, 6:59 AM
Kp
[quote author=Zakath link=topic=9807.msg91349#msg91349 date=1102402770]
Consider the way I do it, which makes no assumptions about the length of the strings:

[code]strcpy( MPQName, (LPTSTR)(data + 24));
strcpy( ChecksumFormula, (LPTSTR)(data + strlen(MPQName) + 25));[/code]

Not only will it not break if the MPQ archive has a different sort of name, it also is shorter and cleaner.
[/quote]

What happens when BNCS sends you an extremely long MPQname?  IIRC, real clients allow some absurd length like 256 just for the MPQname field.  From your code, it's hard to tell if you're doing any validation on the string length.
December 7, 2004, 8:02 PM
Zakath
I have space buffered up (not shown, above what I pasted).
December 7, 2004, 8:35 PM
R.a.B.B.i.T
Thanks for the info, removing the extra byte gets me a response, but troubles are further down the line :\
December 7, 2004, 11:02 PM

Search