For the client I'm writing I send a packet to BNLS and it just simply ignores
the request for the data to be hashed
I tried it on JBLS and it worked fine, I know JBLS may be more leniant than BNLS but I really don't know what I'm doing wrong.
As always, help is appreciated.
Information: Language is VB6, client is Starcraft and my password
was converted to lowercase before sending
Code to build BNLS_HASHDATA
Public Function SendHashData(ByVal Data As String, ByVal DataLen As Long, ByVal HashType As Long)
Dim Cookie As Long
With Buffer
.Add DataLen
.Add HashType
.Add Data
If (HashType = HASH_DOUBLE) Then
.Add BNCSConstants.ClientToken
.Add BNCSConstants.ServerToken
ElseIf (HashType = HASH_COOKIE) Then
Cookie = GetTickCount
.Add Cookie
BNLSConstants.RequestedCookie = True
End If
.SendPacket BNLS, BNLS_HASHDATA
End With
End Function
Here is the BnetDocs format: (S->C)
(DWORD[5]) The data hash.
Optional:
(DWORD) Cookie. Same as the cookie from the request.
Wow, that fixed it. Thanks.