• Welcome to Valhalla Legends Archive.
 

BnetAuth.dll Documentation..

Started by AnThRaX-SOI, April 20, 2003, 03:02 PM

Previous topic - Next topic

AnThRaX-SOI

Anyone know where I could find some good documentation on BnetAuth.dll? I searched the forums and couldn't find anything... Thanks in advance.

Noodlez

i'm pretty sure bnetauth wasn't intended for use by just anyone...hence the one letter function names

Mesiah / haiseM

hence the reason bnetauth was originally made by stu, with full function names and source was released, and along the way somebody edited it (raihain i think?) thus having one letter names...
]HighBrow Innovations
Coming soon...

AIM Online Status: 

Camel

#3
search on goodle for the source

[edit] and then port the calchashbuf function (that's basicly all you need aside from cd key decode and checkrevision to get on bnet)

(using quote because code wont let me highlight -_-)
QuotePublic Sub SendCreateAccount(UserName As String, Password As String)
   SendPacket &H3D, CalcHashBuf(Password) & UserName & Chr(0)
End Sub

Public Function HashPass(ByVal Password As String, Key As Long, Seed As Long, PrependKey As Boolean) As String
   Dim HashOut As String * 20
   HashOut = CalcHashBuf(Password)
   HashPass = MKL(Seed) & MKL(Key)
   HashPass = IIf(PrependKey, HashPass, MKL(Seed)) & CalcHashBuf(HashPass & HashOut)
End Function

Function HashThisCDKey(Cdkey As String, Seed As Long) As String
   Dim ProductID As Long, Val1 As Long, Val2 As Long
   Dim HashOut As String
   If DecodeCDKey(Cdkey, ProductID, Val1, Val2) = False Then
       Addtext ColAnError, "CD Key decode failed!" & vbCrLf, True
       Disconnect
       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
QuotePublic Function ConnectMCP(Realm As String, Optional Seed As Long = 1, Optional Password As String = "password")
   SendPacket &H3E, HashPass(Password, ServerHash, Seed, False) & Realm & Chr(0)
End Function
Quote
...
SendPassVia0x29:
           SendPacket &H29, _
               HashPass(frmSetup.uPass, ServerHash, ServerHash, True) & _
               frmSetup.uLogin & Chr(0)
...

AnThRaX-SOI

Ok, I searched google with different variations of bnetauth source and bnetauth and so on... It couldn't find anything... And I'm going to take an educated guess and say that what is posted above isn't the full source code.

Anyways, Is there a better .dll to use instead of the BnetAuth.dll?

Camel

ideally, no dlls would be better...but then again, i used them for almost 2 years (>_<)