• Welcome to Valhalla Legends Archive.
 

bNetAuth.dll / Hash.dll

Started by Unkn0wn_X, April 30, 2003, 08:31 AM

Previous topic - Next topic

Unkn0wn_X

I'm trying to convert from the 0x1E method to the 0x50 method and I'm having problems with the 0x51 packet. The way to hash cdkeys seems to have changed but I'm not finding anything to help me. I've found this code on the forum, but I don't know most of it. EncryptValue = pbuffer.GetDWORD(left$(PacketData,4) was my way of getting the Seed value from 0x28 before, but now I'm not sure which packet it comes in even.

And the variable ServerHash, I dunno what it represents.

Is there a way to change..

Function HashThisCDKey(Cdkey As String, Seed As Long, ServerHash As String) As String
   Dim ProductID As Long, Val1 As Long, Val2 As Long, CDR As Long
   Dim hashout As String
   
   If DecodeCDKey(Cdkey, ProductID, Val1, Val2) = False Then
       Exit Function
   End If

   hashout = MKL(Seed) & _
   ServerHash & _
   MKL(ProductID) & _
   MKL(Val1) & _
   MKL(0) & _
   MKL(Val2)

   hashout = CalcHashBuf(hashout)

   HashThisCDKey = _
       MKL(Len(Cdkey)) & _
       MKL(ProductID) & _
       MKL(Val1) & _
       MKL(0) & _
       hashout
End Function


into something usable that doesn't require the calchashbuf function? If not, then is there a version of bnetauth.dll available for download with the calchashbuf function already set as a dll exported function?

Can someone help me with this? or perhaps give me a url that'd help me to just learn the new cdkey hashing method on my own so i don't have to use someone else's code?

Banana fanna fo fanna


tA-Kane

Macintosh programmer and enthusiast.
Battle.net Bot Programming: http://www.bash.org/?240059
I can write programs. Can you right them?

http://www.clan-mac.com
http://www.eve-online.com

Camel

calchashbuf is equivalent to X in bnetauth.dll