Okay... I think I get it now. Are the 9 dwords sent back still in the same order for 0x51, or what is the order of the 9Dwords? It is not in the bnls proto spec.. I looked..
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts MenuQuote from: Skywing on February 07, 2007, 07:55 PMQuote from: Jaquio on February 07, 2007, 05:49 PM
They both return the same thing? The Hashed CDKey data but 0x0C returns the Session key. Which I have no clue what it is used for...
Did you read the documentation in the BNLS protocol specification (linked previously by MyndFyre) as it pertains to BNLS_CDKEY and BNLS_CDKEY_EX (in particular)? It makes clear what the usage of that field is.
Quote from: BNLS Protocol Spec
BNLS_CDKEY_EX (0x0c)
--------------------
This message will encrypt your CD-key or CD-keys using the given flags.
(DWORD) Cookie. This value has no special meaning to the server and will simply be echoed to the client in the response.
(BYTE) Amount of CD-keys to encrypt. Must be between 1 and 32.
(DWORD) Flags.*
(DWORD or DWORDs) Server session key(s), depending on the flags.
(Optional DWORD or DWORDs) Client session key(s), depending on the flags.
(String or strings) CD-keys. No dashes or spaces. The client can use multiple types of CD-keys in the same packet.
* The flags may be zero, or any bitwise combination of the defined flags.
Currently, the following flags are defined:
#define CDKEY_SAME_SESSION_KEY (0x01)
#define CDKEY_GIVEN_SESSION_KEY (0x02)
#define CDKEY_MULTI_SERVER_SESSION_KEYS (0x04)
#define CDKEY_OLD_STYLE_RESPONSES (0x08)
CDKEY_SAME_SESSION_KEY (0x01):
This flag specifies that all the returned CD-keys will use the same client session key.
When used in combination with CDKEY_GIVEN_SESSION_KEY (0x02), a single client session key is specified immediately after the server session key(s).
When used without CDKEY_GIVEN_SESSION_KEY (0x02), a client session key isn't sent in the request, and the server will create one.
When not used, each CD-key gets its own client session key.
This flag has no effect if the amount of CD-keys to encrypt is 1.
CDKEY_GIVEN_SESSION_KEY (0x02):
This flag specifies that the client session keys to be used are specified in the request.
When used in combination with CDKEY_SAME_SESSION_KEY (0x01), a single client session key is specified immediately after the server session key(s).
When used without CDKEY_SAME_SESSION_KEY (0x01), an array of client session keys (as many as the amount of CD-keys) is specified.
When not used, client session keys aren't included in the request.
CDKEY_MULTI_SERVER_SESSION_KEYS (0x04):
This flag specifies that each CD-key has its own server session key.
When specified, an array of server session keys (as many as the amount of CD-keys) is specified.
When not specified, a single server session key is specified.
This flag has no effect if the amount of CD-keys to encrypt is 1.
CDKEY_OLD_STYLE_RESPONSES (0x08):
Specifies that the response to this packet is a number of BNLS_CDKEY (0x01) responses, instead of a BNLS_CDKEY_EX (0x0c) response.
The responses are guaranteed to be in the order of the CD-keys' appearance in the request.
Note that when this flag is specified, the Cookie cannot be echoed. (It must still be included in the request.)
Note: When using Lord of Destruction, two CD-keys are encrypted, and they must share the same client session key.
There are several ways to do this:
One way is to provide both CD-keys in BNLS_CDKEY_EX (0x0c) using the flag CDKEY_SAME_SESSION_KEY (0x01).
Another way is to use BNLS_CDKEY (0x01) to encrypt the first CD-key, then use BNLS_CDKEY_EX (0x0c) using the flag CDKEY_GIVEN_SESSION_KEY (0x02) to encrypt the second CD-key with the same client session key.
Response:
---------
When the flags don't contain CDKEY_OLD_STYLE_RESPONSES (0x08), the response is a BNLS_CDKEY_EX (0x0c) message:
(DWORD) Cookie. Same as the value sent to the server in the request.
(BYTE) Amount of CD-keys that were requested.
(BYTE) Amount of CD-keys that were successfully encrypted.
(DWORD) Bit mask for the success code of each CD-key. Each bit of the 32 bits in this DWORD is 1 for success or 0 for failure. The least significant bit specifies the success code of the first CD-key provided. Bits that exceed the amount of CD-keys provided are set to 0.
The following fields repeat for each successful CD-key (they do not exist for failed CD-keys):
(DWORD) Client session key.
(9 DWORDs) CD-key data.
Connected to bnls.valhallalegends.com:9367
Sent:BNLS_REQUESTVERSIONBYTE(0x10)
Received:BNLS_REQUESTVERSIONBYTE(0x10)
Connected to useast.battle.net:6112
Sent:SID_AUTH_INFO(0x50)
Received:SID_PING(0x25)
Sent:SID_PING(0x25)
Received:SID_AUTH_INFO(0x50)
Sent:BNLS_VERSIONCHECKEX2(0x1A)
Received:BNLS_VERSIONCHECKEX2(0x1A)
Sent:BNLS_CDKEY_EX(0x0C)
Received:BNLS_CDKEY_EX(0x0C)
Sent:SID_AUTH_CHECK(0x51)
Received:SID_AUTH_CHECK(0x51)
CDKey is for wrong product!
GLOBAL DISCONNECT!
Public Function PBNET(strData As String, lngLength As Long)
Dim strPID As Byte, lngPLen As Long, strExtra As String
With PD
lngPLen = 0
.SetData strData
If .rBYTE = &HFF Then
strPID = .rBYTE 'PacketID
Debug.Print "Received:" & GetPacketName(strPID, "BNCS") & "(" & Hex(strPID) & ")"
lngPLen = .rWORD 'Packet Length
If lngLength > lngPLen Or lngPLen > lngLength Then
If lngLength > lngPLen Then
strExtra = Right(strData, (lngLength - lngPLen))
Else
strExtra = Right(strData, (lngPLen - lngLength))
End If
End If
End If
Select Case strPID
Case &H25
.InsertDWORD .rDWORD
.SendBNCSPacket &H25
Case &H50
If .rDWORD = 0 Then BD.UseNLS = False Else BD.UseNLS = True 'Logon Type
BD.ServerToken = .rDWORD 'ServerToken
BD.UDPValue = .rDWORD 'UDPValue
BD.MPQFT = .rFILETIME(True) 'MPQ Filetime
BD.MPQName = .rNTString 'MPQ Filename
BD.ValueString = .rNTString 'ValueString
.InsertDWORD &H5
.InsertDWORD &H0
.InsertDWORD BD.ClientToken
.InsertNonNTString BD.MPQFT
.InsertNTString BD.MPQName
.InsertNTString BD.ValueString
.SendBNLSPacket &H1A
Case &H51
Select Case .rDWORD
Case &H0
Debug.Print "Success!"
Case &H100
Debug.Print "Old Game Version!"
GlobalDisc
Case &H101
Debug.Print "Invalid Version!"
GlobalDisc
Case &H102
Debug.Print "Game version must be downgraded!"
GlobalDisc
Case &H200
Debug.Print "Invalid CDKey!"
GlobalDisc
Case &H201
Debug.Print "CDKey is in use by " & .rNTString
GlobalDisc
Case &H202
Debug.Print "CDKey is banned!"
GlobalDisc
Case &H203
Debug.Print "CDKey is for wrong product!"
GlobalDisc
End Select
End Select
End With
If Len(strExtra) >= 1 Then
PBNET strExtra, Len(strExtra)
End If
End Function
Public Function PBNLS(strData As String, lngLength As Long)
Dim strPID As Byte, lngPLen As Long, strExtra As String, intI As Integer, intX As Integer, intY As Integer
With PD
lngPLen = 0
.SetData strData
lngPLen = .rWORD
strPID = .rBYTE
Debug.Print "Received:" & GetPacketName(strPID, "BNLS") & "(" & Hex(strPID) & ")"
If lngLength > lngPLen Or lngPLen > lngLength Then
If lngLength > lngPLen Then
strExtra = Right(strData, (lngLength - lngPLen))
Else
strExtra = Right(strData, (lngPLen - lngLength))
End If
End If
Select Case strPID
Case &HC
.rDWORD
intI = .rBYTE
intX = .rBYTE
.rDWORD
If intX = 2 Then
BD.CDKeySes1 = .rDWORD
BD.CDKeyHash1 = .rVOID(36)
BD.CDKeySes2 = .rDWORD
BD.CDKeyHash2 = .rVOID(36)
Else
BD.CDKeySes1 = .rDWORD
BD.CDKeyHash1 = .rVOID(36)
End If
.InsertDWORD BD.ClientToken '(DWORD) Client Token
.InsertDWORD BD.Version '(DWORD) EXE Version
.InsertDWORD BD.Checksum '(DWORD) EXE Hash
.InsertDWORD &H2 '(DWORD) Number of keys in this packet
.InsertDWORD &H0 '(BOOLEAN) Using Spawn (32-bit)
'For Each Key:
.InsertDWORD Len(BD.CDKey1) '(DWORD) Key Length
'.InsertDWORD &H10 '(DWORD) CD key's product value
'.InsertDWORD &HA '(DWORD) CD key's public value
'.InsertDWORD &H0 '(DWORD) Unknown (0)
.InsertNonNTString BD.CDKeyHash1 '(DWORD[5]) Hashed Key Data
.InsertDWORD Len(BD.CDKey2) '(DWORD) Key Length
'.InsertDWORD &H11 '(DWORD) CD key's product value
'.InsertDWORD &HA '(DWORD) CD key's public value
'.InsertDWORD &H0 '(DWORD) Unknown (0)
.InsertNonNTString BD.CDKeyHash2 '(DWORD[5]) Hashed Key Data
.InsertNTString BD.EXEInfo '(STRING) Exe Information
.InsertNTString "Jaquio" '(STRING) CD Key owner name
.SendBNCSPacket &H51
Case &H10
If .rDWORD > 0 Then
BD.VersionByte = .rDWORD
frmMain.sckBNET.Connect BD.BNETServ, 6112
Else
Debug.Print GetPacketName(strPID, "BNLS") & " FAILED!"
GlobalDisc
End If
Case &H1A
If .rDWORD > 0 Then
BD.Version = .rDWORD
BD.Checksum = .rDWORD
BD.EXEInfo = .rNTString
.rDWORD 'Cookie
.rDWORD 'Verbyte
.InsertDWORD BD.ClientToken
.InsertBYTE 2
.InsertDWORD &H0
.InsertDWORD BD.ServerToken
'.InsertDWORD BD.ServerToken
.InsertNTString BD.CDKey1
.InsertNTString BD.CDKey2
.SendBNLSPacket &HC
Else
Debug.Print GetPacketName(strPID, "BNLS") & " FAILED!"
GlobalDisc
End If
End Select
End With
If Len(strExtra) >= 1 Then
PBNLS strExtra, Len(strExtra)
End If
End Function
Quote from: MyndFyre[vL] on February 07, 2007, 05:18 PM
Investigate BNLS_CDKEY and BNLS_CDKEY_EX.
'Recv'd 0x0C
.rDWORD
intI = .rBYTE
intX = .rBYTE
.rDWORD
If intX = 2 Then
BD.CDKeySes1 = .rDWORD
BD.CDKeyHash1 = .rVOID(36)
BD.CDKeySes2 = .rDWORD
BD.CDKeyHash2 = .rVOID(36)
Else
BD.CDKeySes1 = .rDWORD
BD.CDKeyHash1 = .rVOID(36)
End If
.InsertDWORD BD.ClientToken '(DWORD) Client Token
.InsertDWORD BD.Version '(DWORD) EXE Version
.InsertDWORD BD.Checksum '(DWORD) EXE Hash
.InsertDWORD &H2 '(DWORD) Number of keys in this packet
.InsertDWORD &H0 '(BOOLEAN) Using Spawn (32-bit)
'For Each Key:
.InsertDWORD Len(BD.CDKey1) '(DWORD) Key Length
'(DWORD) CD key's product value
'(DWORD) CD key's public value
'.InsertDWORD &H0 '(DWORD) Unknown (0)
.InsertNonNTString BD.CDKeyHash1 '(DWORD[5]) Hashed Key Data
.InsertDWORD Len(BD.CDKey2) '(DWORD) Key Length
'.InsertDWORD &H0 '(DWORD) Unknown (0)
.InsertNonNTString BD.CDKeyHash2 '(DWORD[5]) Hashed Key Data
.InsertNTString BD.EXEInfo '(STRING) Exe Information
.InsertNTString "Jaquio" '(STRING) CD Key owner name
.SendBNCSPacket &H51
'Sent 0x0C
Case &H1A
If .rDWORD > 0 Then
BD.Version = .rDWORD
BD.Checksum = .rDWORD
BD.EXEInfo = .rNTString
.rDWORD 'Cookie
.rDWORD 'Verbyte
.InsertDWORD BD.ClientToken
.InsertBYTE 2
.InsertDWORD &H1
.InsertDWORD BD.ServerToken
.InsertDWORD BD.ServerToken
.InsertNTString BD.CDKey1
.InsertNTString BD.CDKey2
.SendBNLSPacket &HC
Else
Debug.Print GetPacketName(strPID, "BNLS") & " FAILED!"
GlobalDisc
End If
1 192.168.1.105:2513 63.161.183.205:9367 7 Send
0000 07 00 10 05 00 00 00 .......
2 63.161.183.205:9367 192.168.1.105:2513 11 Recv
0000 0B 00 10 05 00 00 00 0B 00 00 00 ...........
3 192.168.1.105:2514 63.240.202.139:6112 59 Send
0000 01 FF 50 3A 00 00 00 00 00 36 38 58 49 50 58 32 ..P:.....68XIPX2
0010 44 0B 00 00 00 00 00 00 00 00 00 00 00 00 00 00 D...............
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.
4 63.240.202.139:6112 192.168.1.105:2514 8 Recv
0000 FF 25 08 00 94 D7 38 21 .%....8!
5 63.240.202.139:6112 192.168.1.105:2514 104 Recv
0000 FF 50 68 00 00 00 00 00 56 AD E9 10 EB 89 25 00 .Ph.....V.....%.
0010 00 4D 89 7E 99 CB C6 01 76 65 72 2D 49 58 38 36 .M.~....ver-IX86
0020 2D 36 2E 6D 70 71 00 42 3D 32 37 36 32 36 32 37 -6.mpq.B=2762627
0030 39 33 37 20 41 3D 31 35 34 37 34 37 34 38 30 31 937 A=1547474801
0040 20 43 3D 33 37 37 34 34 32 36 35 36 32 20 34 20 C=3774426562 4
0050 41 3D 41 2B 53 20 42 3D 42 5E 43 20 43 3D 43 5E A=A+S B=B^C C=C^
0060 41 20 41 3D 41 2B 42 00 A A=A+B.
6 192.168.1.105:2513 63.161.183.205:9367 114 Send
0000 72 00 1A 05 00 00 00 00 00 00 00 20 6B 43 03 32 r.......... kC.2
0010 39 38 30 35 34 36 35 20 32 31 32 32 39 32 37 33 9805465 21229273
0020 36 30 76 65 72 2D 49 58 38 36 2D 36 2E 6D 70 71 60ver-IX86-6.mpq
0030 00 42 3D 32 37 36 32 36 32 37 39 33 37 20 41 3D .B=2762627937 A=
0040 31 35 34 37 34 37 34 38 30 31 20 43 3D 33 37 37 1547474801 C=377
0050 34 34 32 36 35 36 32 20 34 20 41 3D 41 2B 53 20 4426562 4 A=A+S
0060 42 3D 42 5E 43 20 43 3D 43 5E 41 20 41 3D 41 2B B=B^C C=C^A A=A+
0070 42 00 B.
7 63.161.183.205:9367 192.168.1.105:2513 58 Recv
0000 3A 00 1A 01 00 00 00 00 0B 00 01 A2 F0 9E 0F 47 :..............G
0010 61 6D 65 2E 65 78 65 20 30 38 2F 31 37 2F 30 35 ame.exe 08/17/05
0020 20 30 31 3A 31 32 3A 33 37 20 32 31 32 39 39 32 01:12:37 212992
0030 30 00 20 6B 43 03 0B 00 00 00 0. kC.....
'0x0C removed
10 192.168.1.105:2514 63.240.202.139:6112 118 Send
0000 FF 25 08 00 94 D7 38 21 FF 51 6E 00 20 6B 43 03 .%....8!.Qn. kC.
0010 00 0B 00 01 A2 F0 9E 0F 02 00 00 00 00 00 00 00 ................
0020 10 00 00 00 10 00 00 00 0A 00 00 00 B7 C5 7A 00 ..............z.
0030 00 00 00 00 4F 0B D3 19 76 92 8C 36 B1 99 17 AC ....O...v..6....
0040 17 AC 0E 19 45 13 F0 C9 10 00 00 00 47 61 6D 65 ....E.......Game
0050 2E 65 78 65 20 30 38 2F 31 37 2F 30 35 20 30 31 .exe 08/17/05 01
0060 3A 31 32 3A 33 37 20 32 31 32 39 39 32 30 00 4A :12:37 2129920.J
0070 61 71 75 69 6F 00 aquio.
11 63.240.202.139:6112 192.168.1.105:2514 9 Recv
0000 FF 51 09 00 03 02 00 00 00 .Q.......
BNLS_CDKey($CDKey, $ServerKey);
BNLS_VersionCheckEx2($Product, 0, $IX86FileTime, $IX86Filename, $CheckRevStr);
insert_int32($ClientKey);
insert_int32($VerHash);
insert_int32($CheckSum);
insert_int32(1); //Number of CD-Keys(1 for non-expansion games, 2 for expansion games)
insert_int32(0); //Using Spawn(0 - no, 1 - yes)
insert_int32(strlen($CDKey)); //CD-Key Length
insert_void($KeyHash); //CD-Key Hash
insert_string($EXEInfo); //EXE Info
insert_string("PHPBot v1.0"); //CD-Key Owner
BNCS_Send(0x51);
[BNLS] Connecting...
[BNLS] BNLS Server bnls.valhallalegends.com Connected on port 9367!
[BNLS] Sent:
07 00 10 02 00 00 00 .......
Length: 7
[BNLS] Getting verbyte...
[BNLS] Received:
0b 00 10 02 00 00 00 cf 00 00 00 ...........
Length: 11
[BNLS] Using verbyte:0xcf
[BNET] Connecting...
[BNET] BNET Server useast.battle.net Connected on port 6112!
[BNET] Sent:
ff 50 3a 00 00 00 00 00 36 38 58 49 50 58 45 53 .P:.....68XIPXES
cf 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 55 53 41 00 55 6e 69 74 ........USA.Unit
65 64 20 53 74 61 74 65 73 00 ed States.
Length: 58
[BNET] Requesting authorization..
[BNET] Received:
ff 25 08 00 d9 88 00 cb .%......
Length: 8
[BNET] Received:
ff 50 3e 00 00 00 00 00 7b 66 27 0b 5c a7 49 00 .P>.....{f'.\.I.
00 6e bc de 72 fc c6 01 6c 6f 63 6b 64 6f 77 6e .n..r...lockdown
2d 49 58 38 36 2d 31 35 2e 6d 70 71 00 9c 41 82 -IX86-15.mpq..A.
d1 77 8d fd 20 4a f1 97 d5 5c 1c 4e 29 00 .w.. J...\.N).
Length: 62
[BNET] Sent:
ff 25 08 00 d9 88 00 cb .%......
Length: 8
[BNET] Received authorization challenge.
[BNLS] Sent:
3d 00 1a 02 00 00 00 00 00 00 00 5c 08 e5 51 00 =..........\..Q.
6e bc de 72 fc c6 01 6c 6f 63 6b 64 6f 77 6e 2d n..r...lockdown-
49 58 38 36 2d 31 35 2e 6d 70 71 00 9c 41 82 d1 IX86-15.mpq..A..
77 8d fd 20 4a f1 97 d5 5c 1c 4e 29 00 w.. J...\.N).
Length: 61
[BNLS] Performing CheckRevision...
[BNLS] Received:
28 00 1a 01 00 00 00 01 00 0e 01 dc 46 63 b8 30 (...........Fc.0
d7 7d db b6 68 60 2a 8a 19 ea d8 d3 f9 3e 91 00 .}..h`*......>..
5c 08 e5 51 cf 00 00 00 \..Q....
Length: 40
[BNET] Sent:
ff 51 61 00 5c 08 e5 51 01 00 0e 01 dc 46 63 b8 .Qa.\..Q.....Fc.
01 00 00 00 00 00 00 00 0d 00 00 00 00 00 00 00 ................
0e 00 00 00 01 00 00 00 81 92 10 00 00 00 00 00 ................
55 ee 61 73 a6 2b b9 aa db bf 57 92 72 4a c9 41 U.as.+....W.rJ.A
89 d8 ba 94 30 d7 7d db b6 68 60 2a 8a 19 ea d8 ....0.}..h`*....
d3 f9 3e 91 00 50 48 50 42 6f 74 20 76 31 2e 30 ..>..PHPBot v1.0
00 .
Length: 97
[BNET] Attempting to answer challenge..
[BNET] Received:
ff 51 09 00 01 01 00 00 00 .Q.......
Length: 9
[BNET] Invalid version.
[BNLS] Connecting...
[BNLS] BNLS Server bnls.valhallalegends.com Connected on port 9367!
[BNLS] Sent:
07 00 10 03 00 00 00 .......
Length: 7
[BNLS] Getting verbyte...
[BNLS] Received:
0b 00 10 03 00 00 00 4f 00 00 00 .......O...
Length: 11
[BNLS] Using verbyte:0x4f
[BNET] Connecting...
[BNET] BNET Server useast.battle.net Connected on port 6112!
[BNET] Sent:
ff 50 3a 00 00 00 00 00 36 38 58 49 4e 42 32 57 .P:.....68XINB2W
4f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 O...............
00 00 00 00 00 00 00 00 55 53 41 00 55 6e 69 74 ........USA.Unit
65 64 20 53 74 61 74 65 73 00 ed States.
Length: 58
[BNET] Requesting authorization..
[BNET] Received:
ff 25 08 00 79 5c 6f 6a .%..y\oj
Length: 8
[BNET] Received:
ff 50 3e 00 00 00 00 00 15 d7 48 ca ec 21 43 00 .P>.......H..!C.
00 ea e4 c6 72 fc c6 01 6c 6f 63 6b 64 6f 77 6e ....r...lockdown
2d 49 58 38 36 2d 30 35 2e 6d 70 71 00 59 03 90 -IX86-05.mpq.Y..
e4 fb 2e e7 66 02 47 44 59 64 3e d3 86 00 ....f.GDYd>...
Length: 62
[BNET] Sent:
ff 25 08 00 79 5c 6f 6a .%..y\oj
Length: 8
[BNLS] Sent:
3d 00 1a 03 00 00 00 00 00 00 00 83 a0 a4 51 00 =.............Q.
ea e4 c6 72 fc c6 01 6c 6f 63 6b 64 6f 77 6e 2d ...r...lockdown-
49 58 38 36 2d 30 35 2e 6d 70 71 00 59 03 90 e4 IX86-05.mpq.Y...
fb 2e e7 66 02 47 44 59 64 3e d3 86 00 ...f.GDYd>...
Length: 61
[BNLS] Performing CheckRevision...
[BNLS] Received:
28 00 1a 01 00 00 00 00 02 00 02 b6 fa ff 22 27 (............."'
3d 31 01 e2 b3 14 2c 37 08 de 16 05 5e 62 f6 00 =1....,7....^b..
83 a0 a4 51 4f 00 00 00 ...QO...
Length: 40
[BNET] Sent:
ff 51 59 00 83 a0 a4 51 00 02 00 02 b6 fa ff 22 .QY....Q......."
01 00 00 00 00 00 00 00 11 00 00 00 04 00 00 00 ................
f6 2c 2b 00 00 00 00 00 a7 bd 4b 86 d5 8c a5 27 .,+.......K....'
2c a6 e6 11 c9 64 96 29 2d 8a b0 0e 27 3d 31 01 ,....d.)-...'=1.
e2 b3 14 2c 37 08 de 16 05 5e 62 f6 00 50 48 50 ...,7....^b..PHP
42 6f 74 20 76 31 2e 30 00 Bot v1.0.
Length: 89
[BNET] Attempting to answer challenge..
[BNET] Received:
ff 51 09 00 03 02 00 00 00 .Q.......
Length: 9
[BNET] Wrong product.
Quote from: Ringo on November 13, 2006, 03:18 AMQuote from: Jaquio on November 13, 2006, 03:10 AMThe problems right there I think, your nullstrings are double null'ed
[BNLS] Sent:
3f 00 1a 02 00 00 00 00 00 00 00 06 b9 b5 50 00 ?.............P.
09 ef c0 72 fc c6 01 6c 6f 63 6b 64 6f 77 6e 2d ...r...lockdown-
49 58 38 36 2d 30 33 2e 6d 70 71 00 00 29 e8 27 IX86-03.mpq..).'
3f b5 0a 9c 15 dd 94 76 70 25 f6 ce ea 00 00 ?......vp%.....
[EDIT]: Shouldnt BNLS rejected an over sized request like that?
Quote from: l2k-Shadow on November 12, 2006, 11:58 PM
BNLS_VERSIONCHECKEX2 requires
(STRING) Version check archive filename.
Battle.net->Client 0x50
ff 50 3e 00 00 00 00 00 20 48 ...K...P>..... H
0040 8c 78 f2 dd 28 00 00 90 82 c4 72 fc c6 01 6c 6f .x..(.....r...lo
0050 63 6b 64 6f 77 6e 2d 49 58 38 36 2d 30 34 2e 6d ckdown-IX86-04.m
0060 70 71 00 2f 20 52 8b b5 28 2f 7b 5b 21 4f 35 da pq./ R..(/{[!O5.
0070 e0 0a 1f 00 ....
Client->BNLS 0x1A
3d 00 1a 02 00 00 00 00 00 00 ......=.........
0040 00 00 00 00 00 00 90 82 c4 72 fc c6 01 6c 6f 63 .........r...loc
0050 6b 64 6f 77 6e 2d 49 58 38 36 2d 30 34 2e 6d 70 kdown-IX86-04.mp
0060 71 00 2f 20 52 8b b5 28 2f 7b 5b 21 4f 35 da e0 q./ R..(/{[!O5..
0070 0a 1f 00 ...
[BNLS] Connecting...
[BNLS] BNLS Server bnls.valhallalegends.com Connected on port 9367!
[BNLS] Sent:
07 00 10 02 00 00 00 .......
Length: 7
[BNLS] Getting verbyte...
[BNLS] Received:
0b 00 10 02 00 00 00 cf 00 00 00 ...........
Length: 11
[BNLS] Using verbyte:0xcf
[BNET] Connecting...
[BNET] BNET Server useast.battle.net Connected on port 6112!
[BNET] Sent:
ff 50 3a 00 00 00 00 00 36 38 58 49 50 58 45 53 .P:.....68XIPXES
cf 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 55 53 41 00 55 6e 69 74 ........USA.Unit
65 64 20 53 74 61 74 65 73 00 ed States.
Length: 58
[BNET] Requesting authorization..
[BNET] Received:
ff 25 08 00 ea 4a 03 10 .%...J..
Length: 8
[BNET] Received:
ff 50 3e 00 00 00 00 00 0f 26 63 c4 32 02 43 00 .P>......&c.2.C.
00 09 ef c0 72 fc c6 01 6c 6f 63 6b 64 6f 77 6e ....r...lockdown
2d 49 58 38 36 2d 30 33 2e 6d 70 71 00 29 e8 27 -IX86-03.mpq.).'
3f b5 0a 9c 15 dd 94 76 70 25 f6 ce ea 00 ?......vp%....
Length: 62
[BNET] Sent:
ff 25 08 00 ea 4a 03 10 .%...J..
Length: 8
[BNLS] Sent:
3f 00 1a 02 00 00 00 00 00 00 00 06 b9 b5 50 00 ?.............P.
09 ef c0 72 fc c6 01 6c 6f 63 6b 64 6f 77 6e 2d ...r...lockdown-
49 58 38 36 2d 30 33 2e 6d 70 71 00 00 29 e8 27 IX86-03.mpq..).'
3f b5 0a 9c 15 dd 94 76 70 25 f6 ce ea 00 00 ?......vp%.....
Length: 63
[BNLS] Performing CheckRevision...
[BNLS] Received:
28 00 1a 01 00 00 00 01 00 0e 01 ab 05 b4 13 81 (...............
ac 39 92 2d 9c 68 a6 c4 66 e1 04 df a3 93 76 00 .9.-.h..f.....v.
06 b9 b5 50 cf 00 00 00 ...P....
Length: 40
[BNET] Sent:
ff 51 59 00 06 b9 b5 50 01 00 0e 01 ab 05 b4 13 .QY....P........
01 00 00 00 00 00 00 00 0d 00 00 00 01 00 00 00 ................
81 92 10 00 00 00 00 00 3e ff 69 24 86 ed 26 bc ........>.i$..&.
f7 3c 2e c2 e3 1f 46 5d d0 e2 43 d6 81 ac 39 92 .<....F]..C...9.
2d 9c 68 a6 c4 66 e1 04 df a3 93 76 00 50 48 50 -.h..f.....v.PHP
42 6f 74 20 76 31 2e 30 00 Bot v1.0.
Length: 89
[BNET] Attempting to answer challenge..
[BNET] Received:
ff 51 09 00 01 01 00 00 00 .Q.......
Length: 9
[BNET] Invalid version.
Quote from: Skywing on November 12, 2006, 08:35 PMQuote from: Jaquio on November 12, 2006, 07:59 PMYou should use the new message as it moves the onus of figuring out the vercheck module differences onto BNLS instead of clients.
I get invalid version whenever I try using BNLS to connect. Any idea why? You still send the same things, but use BNLS_VERSIONCHECKEX2 instead?
Note that in the current implementation, there are now two digits of significant identifying information in the vercheck module filenames, instead of just one as used previously. If you are using the old, deprecated messages and only checking one digit, this will often result in bad version check data.
[BNLS] Sent:2d 00 1a 02 00 00 00 00 00 00 00 e6 5e f5 4f 00 -...........^.O.
14 5a dc 72 fc c6 01 31 34 00 00 a3 bd 3a 98 95 .Z.r...14....:..
b6 e0 c0 53 aa 6f c7 57 3c 6f c2 00 00 ...S.o.W
[BNLS] Performing CheckRevision...
[BNLS] Received: 28 00 1a 01 00 00 00 01 00 0e 01 73 64 80 e3 5e (..........sd..^
52 af 0b 3c 24 ae 11 9f a9 27 ff 3d 63 be bf 00 R..<$....'.=c...
e6 5e f5 4f cf 00 00 00 .^.O....
Length: 40
[BNET] Sent:ff 51 59 00 e6 5e f5 4f 01 00 0e 01 73 64 80 e3 .QY..^.O....sd..
01 00 00 00 00 00 00 00 0d 00 00 00 01 00 00 00 ................
81 92 10 00 00 00 00 00 bc 91 56 83 c8 50 56 85 ..........V..PV.
b9 a2 11 11 34 2e ef 7f 27 9b 3a 13 5e 52 af 0b ....4..'.:.^R..
3c 24 ae 11 9f a9 27 ff 3d 63 be bf 00 50 48 50 <$....'.=c...PHP
42 6f 74 20 76 31 2e 30 00 Bot v1.0.
Length: 89
[BNET] Attempting to answer challenge..
[BNET] Received: ff 51 09 00 01 01 00 00 00 .Q.......
Length: 9
[BNET] Invalid version.
Page created in 0.068 seconds with 16 queries.