Valhalla Legends Forums Archive | Battle.net Bot Development | BNLS_HASHDATA (0x0B) Troubles..

AuthorMessageTime
Quarantine
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
[code]
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
[/code]

Here is the BnetDocs format: (S->C)

[pre]
(DWORD[5]) The data hash.

Optional:
(DWORD) Cookie. Same as the cookie from the request.
[/pre]
July 9, 2005, 9:35 AM
UserLoser.
[code]
.Add DataLen + 1
[/code]

Will work.  I'm assuming so, anyways, since your buffer class probably will add on a null byte at the end after Data is appended since it's a string
July 9, 2005, 11:26 AM
Quarantine
Wow, that fixed it. Thanks.
July 9, 2005, 11:39 AM

Search