Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: Turbo on November 22, 2003, 06:22 PM

Title: Create Account For BnetAuth users out there
Post by: Turbo on November 22, 2003, 06:22 PM

Private Declare Function CreateAccount Lib "bnetauth.dll" (ByVal outbuf As String, ByVal password As String) As Long


Public Sub caCreateAccount()
Dim cahash As String
   cahash = String(5 * 4, vbNullChar)
   Call CreateAccount(cahash , varPassword)

   Packet.InsertNonNTString cahash
   Packet.InsertNTString varAccount
   Packet.SendPacket &H3D
End Sub
Title: Re:Create Account For BnetAuth users out there
Post by: Stealth on November 22, 2003, 06:24 PM
You're hashing the password into the variable cahash, then attaching accounthash to the outgoing packet, thus getting absolutely nowhere. I'd recommend adding Option Explicit to the top of your module so you can't reference variables without declaring them, it'll probably help you avoid errors like that in the future.
Title: Re:Create Account For BnetAuth users out there
Post by: Maddox on November 22, 2003, 07:18 PM
Quote from: Stealth on November 22, 2003, 06:24 PM
You're hashing the password into the variable cahash, then attaching accounthash to the outgoing packet, thus getting absolutely nowhere. I'd recommend adding Option Explicit to the top of your module so you can't reference variables without declaring them, it'll probably help you avoid errors like that in the future.

What are you talking about?
Title: Re:Create Account For BnetAuth users out there
Post by: Kp on November 22, 2003, 07:36 PM
Quote from: Maddox on November 22, 2003, 07:18 PM
What are you talking about?

Look at the edit times.  After Stealth told him about it, he changed the code.
Title: Re:Create Account For BnetAuth users out there
Post by: Maddox on November 22, 2003, 10:57 PM
Quote from: Kp on November 22, 2003, 07:36 PM
Quote from: Maddox on November 22, 2003, 07:18 PM
What are you talking about?

Look at the edit times.  After Stealth told him about it, he changed the code.

Damn edit, should be disabled after a certain number of minutes.
Title: Re:Create Account For BnetAuth users out there
Post by: Adron on November 24, 2003, 11:02 AM
That's stupid. Edits shouldn't be disabled. This was an example posted for people to use; if there's a flaw in the example it should be corrected. People shouldn't have to read all the way to the bottom of a possibly 10 page long thread to find out that there was a bug in the original example posted.
Title: Re:Create Account For BnetAuth users out there
Post by: Skywing on November 24, 2003, 11:20 AM
Quote from: Adron on November 24, 2003, 11:02 AM
That's stupid. Edits shouldn't be disabled. This was an example posted for people to use; if there's a flaw in the example it should be corrected. People shouldn't have to read all the way to the bottom of a possibly 10 page long thread to find out that there was a bug in the original example posted.
It would, however, be nice if the poster had left a note explaining what they had changed.
Title: Re:Create Account For BnetAuth users out there
Post by: Adron on November 24, 2003, 12:12 PM
Quote from: Skywing on November 24, 2003, 11:20 AM
It would, however, be nice if the poster had left a note explaining what they had changed.

Absolutely. I mostly do that when I edit posts, i.e. add it any time I think someone might wonder.
Title: Re:Create Account For BnetAuth users out there
Post by: Kp on November 24, 2003, 02:34 PM
Quote from: Adron on November 24, 2003, 12:12 PM
Quote from: Skywing on November 24, 2003, 11:20 AM
It would, however, be nice if the poster had left a note explaining what they had changed.

Absolutely. I mostly do that when I edit posts, i.e. add it any time I think someone might wonder.

and if everybody was polite enough to do that, it wouldn't be necessary to go blocking edits after a certain period of time.  As a minor workaround to our workaround, moderators could still edit his source to fix it once he decides what he wants it to be.