Ok here's my sub for 0x31: (im sending it right after i get a success login and before 0x0A)
Public Sub Send0x31()
Dim OldPass As String
Dim NewPass As String
Dim lngToken As Long
OldPass = LCase(Declarations.Password)
NewPass = LCase(Declarations.ChangePassTo)
lngToken = GetTickCount()
With PBuffer
.InsertDWORD lngToken
.InsertDWORD Declarations.lngSrvToken
.InsertNonNTString BNCSutil.doubleHashPassword(OldPass, lngToken, Declarations.lngSrvToken)
.InsertNonNTString BNCSutil.doubleHashPassword(NewPass, lngToken, Declarations.lngSrvToken)
.InsertNTString Declarations.Username
.SendPacket &H31
End With
End Sub
If im not hashing it right or sending it at the wrong time, plz tell me cause im puzzled.
New password should be a single hash not a double.
This should be sent after a successful Cd-Key and version check, but before logging onto Battle.net via SID_LOGONRESPONSE (http://bnetdocs.valhallalegends.com/content.php?Section=m&Code=5) or SID_LOGONRESPONSE2 (http://bnetdocs.valhallalegends.com/content.php?Section=m&Code=367). Like stated above, make sure you're sending Battle.net a singly hashed password because if you do what you're doing, your password is not hashed correctly and what you think your password is will not be what it actually is meant to be.
ok this is what i now have for the sub, however every time i try to change the password it fails: i have it made to wehre the bot asks for the new password and sends it to BNET right after i get a version checked passed from S>0x51
Public Sub Send0x31()
Dim OldPass As String
Dim NewPass As String
Dim lngToken As Long
OldPass = LCase(Declarations.Password)
NewPass = LCase(Declarations.ChangePassTo)
lngToken = GetTickCount()
With PBuffer
.InsertDWORD lngToken
.InsertDWORD Declarations.lngSrvToken
.InsertNonNTString BNCSutil.hashPassword(OldPass)
.InsertNonNTString BNCSutil.hashPassword(NewPass)
.InsertNTString Declarations.Username
.SendPacket &H31
End With
End Sub
it worked for one account when did double hash but it changed the password to something i don't know lol, so plz help
You double hash the old password and just single hash the new password.
heres my new sub and STILL unable to change password :'( :'(
Public Sub Send0x31()
Dim OldPass As String
Dim NewPass As String
Dim lngToken As Long
OldPass = LCase(Declarations.Password)
NewPass = LCase(Declarations.ChangePassTo)
lngToken = GetTickCount()
With PBuffer
.InsertDWORD lngToken
.InsertDWORD Declarations.lngSrvToken
.InsertNonNTString BNCSutil.doubleHashPassword(BNCSutil.hashPassword(OldPass), lngToken, Declarations.lngSrvToken)
.InsertNonNTString BNCSutil.hashPassword(NewPass)
.InsertNTString Declarations.Username
.SendPacket &H31
End With
End Sub
Oh sorry, I guess I worded that wrong, do this:
.InsertNonNTString BNCSutil.doubleHashPassword(OldPass, lngToken, Declarations.lngSrvToken)
.InsertNonNTString BNCSutil.hashPassword(NewPass)
heh hero, i lkie ur sig thnigie. wehn i raed i fnid taht to be true.
Thanks, so I take it that worked?
Yup, works fine now! ;D