Valhalla Legends Forums Archive | Battle.net Bot Development | BnetAuth.dll Documentation..

AuthorMessageTime
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.
April 20, 2003, 8:02 PM
Noodlez
i'm pretty sure bnetauth wasn't intended for use by just anyone...hence the one letter function names
April 21, 2003, 12:03 AM
MesiaH
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...
April 21, 2003, 12:39 AM
Camel
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 -_-)
[quote]Public Sub SendCreateAccount(UserName As String, Password As String)
SendPacket &H3D, [color=Red]CalcHashBuf[/color](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 = [color=Red]CalcHashBuf[/color](Password)
HashPass = MKL(Seed) & MKL(Key)
HashPass = IIf(PrependKey, HashPass, MKL(Seed)) & [color=Red]CalcHashBuf[/color](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 = [color=Red]CalcHashBuf[/color](HashOut)

HashThisCDKey = _
MKL(Len(Cdkey)) & _
MKL(ProductID) & _
MKL(Val1) & _
MKL(0) & _
HashOut
End Function[/quote]
[quote]Public Function ConnectMCP(Realm As String, Optional Seed As Long = 1, Optional Password As String = "password")
SendPacket &H3E, [color=Red]HashPass[/color](Password, ServerHash, Seed, False) & Realm & Chr(0)
End Function[/quote]
[quote]
...
SendPassVia0x29:
SendPacket &H29, _
[color=Red]HashPass[/color](frmSetup.uPass, ServerHash, ServerHash, True) & _
frmSetup.uLogin & Chr(0)
...[/quote]
April 21, 2003, 2:26 PM
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?
April 22, 2003, 2:46 PM
Camel
ideally, no dlls would be better...but then again, i used them for almost 2 years (>_<)
April 22, 2003, 4:58 PM

Search