Hello. I could use some help with the 0x31 [change password] packet. I am coding in VB6 and using BnetAuth.dll.
This is what I have so far:
Public Sub SendChangePassword()
Dim Result As Boolean
Dim AccountHash As String
Dim Result2 As Boolean
Dim ClientKEY As Long
Dim AccountHash2 As String
AccountHash = String(5 * 4, vbNullChar)
Result = X(AccountHash, varPassword)
ClientKEY = GetTickCount()
AccountHash2 = String(5 * 4, vbNullChar)
Result2 = X(AccountHash2, varNewPass)
Result2 = X(AccountHash2, X2(ClientKEY) & X2(ServerKey) & 'X2 = Argument Not optionalAccountHash2)
AccountHash2 = X(ClientKEY) & X2(ServerKey) & AccountHash2 'X2 = Argument Not optional
If Result = True And Result2 = True Then
InsertDWORD ClientKEY
InsertDWORD ServerKey
InsertNonNTString AccountHash2
InsertNonNTString AccountHash
InsertNTString varAccount
SendPacket &H31
Else
AddChat frmMain.rtbChat, vbRed, "Password change failed, Could not hash!!!"
frmMain.Winsock.Close
End If
End Sub
However, something along the marked lines doesn't work with BnetAuth.dll. Does anyone know how to correct this problem?
Any help is greatly appriciated!
Looks like this line is wrong:
Result2 = X(AccountHash2, X2(ClientKEY) & X2(ServerKey) & 'X2 = Argument Not optionalAccountHash2)
I don't know VB but i'd suggest:
Result2 = X(AccountHash2, X2(ClientKEY) & X2(ServerKey))
That last '&' before the comment looks wrong to me.
Why are you posting under my handle?
Quote from: DaRk-FeAnOr on October 14, 2003, 01:21 PM
Why are you posting under my handle?
Haha, a wannabe Feanor. All the fake UserLoser's are gone now that i have UserLoser on both East, and West, along with Europe/Asia. With the only exception of UserLoser@Lordaeron.
It is eRRoR notice the post is similar? Just an extra reason why he sucks. :-\
I still can't get this to work. How do I get the ServerKey and what is it?
Does anyone send 0x31 on their bot and know how to do this?
Quote from: Feanor on October 14, 2003, 07:13 PM
I still can't get this to work. How do I get the ServerKey and what is it?
Does anyone send 0x31 on their bot and know how to do this?
The server sends you the serverkey in either 0x50 or 0x51, I forget which exactly.
Quote from: DaRk-FeAnOr on October 14, 2003, 01:21 PM
Why are you posting under my handle?
It's not as if you created the actual original name Feanor. (Silmarillion)
Quote from: iago on October 14, 2003, 07:31 PM
The server sends you the serverkey in either 0x50 or 0x51, I forget which exactly.
0x50