• Welcome to Valhalla Legends Archive.
 

BNLS_HASHDATA (0x0B) Troubles..

Started by Warrior, July 09, 2005, 04:35 AM

Previous topic - Next topic

Warrior

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.
Quote from: effect on March 09, 2006, 11:52 PM
Islam is a steaming pile of fucking dog shit. Everything about it is flawed, anybody who believes in it is a terrorist, if you disagree with me, then im sorry your wrong.

Quote from: Rule on May 07, 2006, 01:30 PM
Why don't you stop being American and start acting like a decent human?

UserLoser.


.Add DataLen + 1


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

Warrior

Quote from: effect on March 09, 2006, 11:52 PM
Islam is a steaming pile of fucking dog shit. Everything about it is flawed, anybody who believes in it is a terrorist, if you disagree with me, then im sorry your wrong.

Quote from: Rule on May 07, 2006, 01:30 PM
Why don't you stop being American and start acting like a decent human?