Valhalla Legends Forums Archive | Battle.net Bot Development | Re: When and how to send 0x31 (VB)?

AuthorMessageTime
Antarctica
Ok here's my sub for 0x31: (im sending it right after i get a success login and before 0x0A)


[code]
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
[/code]


If im not hashing it right or sending it at the wrong time, plz tell me cause im puzzled.
August 19, 2006, 5:44 PM
l2k-Shadow
New password should be a single hash not a double.
August 19, 2006, 7:12 PM
UserLoser
This should be sent after a successful Cd-Key and version check, but before logging onto Battle.net via SID_LOGONRESPONSE or SID_LOGONRESPONSE2.  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.
August 19, 2006, 7:17 PM
Antarctica
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

[code]
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
[/code]

it worked for one account when did double hash but it changed the password to something i don't know lol, so plz help
August 19, 2006, 10:41 PM
HeRo
You double hash the old password and just single hash the new password.
August 19, 2006, 11:00 PM
Antarctica
heres my new sub and STILL unable to change password  :'( :'(

[code]
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
[/code]
August 19, 2006, 11:17 PM
HeRo
Oh sorry, I guess I worded that wrong, do this:

[code]
        .InsertNonNTString BNCSutil.doubleHashPassword(OldPass, lngToken, Declarations.lngSrvToken)
        .InsertNonNTString BNCSutil.hashPassword(NewPass)
[/code]
August 19, 2006, 11:20 PM
Antarctica
heh hero, i lkie ur sig thnigie.  wehn i raed i fnid taht to be true.
August 19, 2006, 11:22 PM
HeRo
Thanks, so I take it that worked?
August 20, 2006, 1:06 AM
Antarctica
Yup, works fine now!  ;D
August 20, 2006, 4:45 AM

Search