Valhalla Legends Forums Archive | Battle.net Bot Development | Create Account & Change Password

AuthorMessageTime
Pr0pHeT
Well I can't get this piece of shit to work, so I am asking for some help with getting Create Account and Change Password features to work on a binary bot.
August 14, 2003, 6:27 AM
Camel
What language are you working in?
What have you done so far?
Are you able to log in without creating an account?
Do you understand what goes on in hashing the password to log in?
Do you understand how hashing the password to log in is different from hashing the password to create an account/change an account's password?
August 14, 2003, 6:36 AM
CrAz3D
VB 6 code for BNET. You need to have the bnetauth.dll with the main bot EXE.
This goes under parse:
[code]Case &H3D
Select Case Asc(Mid(Data, 5, 1))
Case &H0
AddChat vbGreen, "Account created!"
form1.sckBnet.Close
form1.sckBnet.Connect varServer, 6112
Case &H1
AddChat vbRed, "Account create failed: name too short!"
form1.sckBnet.Close
Case &H2
AddChat vbRed, "Account create failed: invalid characters!"
form1.sckBnet.Close
Case &H3
AddChat vbRed, "Account create failed: bad words, you bad boy!"
form1.sckBnet.Close
Case &H4
AddChat vbRed, "Account create failed: account exists!"
form1.sckBnet.Close
Case Else
AddChat vbRed, "Account create failed: failed!"
form1.sckBnet.Close
End Select[/code]
This is it's own sub:
[code]Public Sub SendCreateAccount(username As String, Password As String)
Dim pbuffer As New PacketBuffer
Dim Result As Boolean
Dim AccountHash As String
Password = LCase(Password)
AccountHash = String(5 * 4, vbNullChar)
Result = x(AccountHash, Password)
If Result = True Then
pbuffer.InsertNonNTString AccountHash
pbuffer.InsertNTString username
pbuffer.sendPacket &H3D
Else
AddChat vbBlue, "Account create failed: result = false!"
form1.sckBnet.Close
End If
End Sub
[/code]
This is logon success/failed message:
[code] If Mid(Data, 5, 1) = Chr(1) Then
AddChat vbWhite, "[" & Time & "] ", vbGreen, " ---- Logon Was Successfull"
pbuffer.InsertNTString varUser
pbuffer.InsertBYTE 0
pbuffer.sendPacket &HA
pbuffer.InsertNonNTString varProduct
pbuffer.sendPacket &HB
pbuffer.InsertDWORD 2
pbuffer.InsertNTString varhome
pbuffer.sendPacket &HC
Else
AddChat vbWhite, "[" & Time & "] ", vbRed, " ---- Logon Failed"
SendCreateAccount varUser, varPass
form1.sckBnet.Close
End If
[/code]

This goes in a module or where ever:
[code] Public Declare Function x Lib "bnetauth.dll" Alias "X" (ByVal outbuf As String, ByVal Password As String) As Long[/code]
August 15, 2003, 12:15 AM
Arta
What happens when you try to create an account?
August 15, 2003, 6:53 AM
Camel
CrAz3D, please indent your code.
August 15, 2003, 11:29 PM
CrAz3D
K.

Arta, what do you mean?
August 16, 2003, 2:48 PM
UserLoser
I believe he means what happens when you send that. (0x3d)

Also, if your account was created successfully, then there's no reason to reconnect to Battle.net, just send your login packet (whichever you use 0x29 or 0x3a) right after your account was created.
August 16, 2003, 3:03 PM
CrAz3D
Ok, thnx UserLoser
August 16, 2003, 5:09 PM

Search