Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: MasterMT on April 24, 2003, 09:47 AM

Title: Creating An Account
Post by: MasterMT on April 24, 2003, 09:47 AM
Is there any documentation anywhere that could help me to learn how to create bnet accounts using the 0x1E, 0x12, 0x06, 0x07, 0x2D. 0x30/36 connection with my Bot? Perhaps someone could post how/when it's done?
Title: Re:Creating An Account
Post by: Camel on April 24, 2003, 11:36 AM
what the heck are you logging in with, jstr?
0x3D will work with 0x1E login (tested with JSTR =P)

SendPacket &H3D, CalcHashBuf(Password) & UserName & Chr(0)
Title: Re:Creating An Account
Post by: Mesiah / haiseM on April 24, 2003, 12:36 PM
stop showing that off, u know nobody has calchashbuf!!!
Title: Re:Creating An Account
Post by: Camel on April 24, 2003, 01:05 PM
^_^

it's X() in bnetauth if you want to do it "the wrong way"
Title: Re:Creating An Account
Post by: MasterMT on April 24, 2003, 04:01 PM
I'm still new to the whole bnet login thing, so perhaps you can tell me the 0x50 equivalent in the 0x1E way of loging in? Meaning when would I send the 0x3D? I'm using SEXP. The bot is made in VB.
Title: Re:Creating An Account
Post by: Camel on April 24, 2003, 07:19 PM
0x3D replaces 0x29
Title: Re:Creating An Account
Post by: Arta on April 27, 2003, 02:26 PM
www.valhallalegends.com/arta/bnetdocs/ has all the information you'll need.

The logon sequence you mentioned is very old and will only work for Diablo 1 and it's shareware equivalent. If you want to log on using current clients you'll need to use SID_AUTH_INFO (0x50) and SID_AUTH_CHECK (0x51) and soforth. I'd recommend using the new version, as it's not signficantly harder, and allows you to do more - the old login will only work for DRTL/DSHR, wearas the new one will work for Warcraft II, Starcraft, Broodwar, DiabloII, and LoD - all of which use the same packets, with minor changes - thus saving yourself a lot of work in the longrun.
Title: Re:Creating An Account
Post by: TheMinistered on April 27, 2003, 03:40 PM
Quotestop showing that off, u know nobody has calchashbuf!!!

Let's see whose fault is that? Your own!  I swear, i'm sure you can find publicly released source code of a hashing function in c++ for this, or you can disassemble it and reverse it yourself.  Either way shouldn't be to much trouble.  Then you can directly code it in visual basic (reverse method), or you can directly port it to visual basic (c++ method).  There is one problem, visual basic lacks built-in support for all bitwise operations.  However, you can implement them using a couple methods.
Title: Re:Creating An Account
Post by: Camel on April 27, 2003, 05:32 PM
Quote from: Arta[vL] on April 27, 2003, 02:26 PMthe old login will only work for DRTL/DSHR
and JSTR

Quote from: TheMinistered on April 27, 2003, 03:40 PMvisual basic lacks built-in support for all bitwise operations.
just shifting ops..and technicly adding/subtracting too -_-
Title: Re:Creating An Account
Post by: Banana fanna fo fanna on April 27, 2003, 05:37 PM
Quote from: Camel on April 27, 2003, 05:32 PM
Quote from: Arta[vL] on April 27, 2003, 02:26 PMthe old login will only work for DRTL/DSHR
and JSTR

No.
Title: Re:Creating An Account
Post by: Arta on April 27, 2003, 05:42 PM
Quote from: Maddox on April 27, 2003, 03:21 PM
You can still use 0x07, and then use 0x29 for SC/BW, D2 and WAR2.

Not since last patch, you can't (afaik)
Title: Re:Creating An Account
Post by: Mesiah / haiseM on April 27, 2003, 05:42 PM
my brood wars client still uses 0x29 and 0x36 for some unkown reason, and every client can still use that login sequence (besides d2xp, and war3 of course)
Title: Re:Creating An Account
Post by: Arta on April 27, 2003, 05:45 PM
hmm, ok then, my mistake :)
Title: Re:Creating An Account
Post by: Mesiah / haiseM on April 27, 2003, 08:03 PM
+1 for arta admitting mistake, most moderators try to cover it up with language u cant understand :P
Title: Re:Creating An Account
Post by: MasterMT on April 28, 2003, 01:28 PM
I've decided to just convert the connection from the old way to the new way, but after I send 0x51 it just closes my connection. Am I doing it wrong or is it a problem in my code?

Sent: 0x50
Recv: 0x25
Sent: 0x25
Recv: 0x50
Sent: 0x51
Title: Re:Creating An Account
Post by: MasterMT on April 28, 2003, 02:13 PM
Here's the code I'm currently using for my version packet

Function CreateVersionPacket(hash As String, MPQName As String) As String
   Dim version As Long
   Dim Checksum As Long
   Dim ExeInfo As String
   Dim result As Long
   Dim VersionByte As Long
   Dim path As String
   Dim GameExe As String
   path = App.path & "\STAR\"
   VersionByte = &HC7
   GameExe = "Starcraft.exe"
   ExeInfo = Space$(256)

   result = CheckRevision(path & GameExe, path & "storm.dll", path & "battle.snp", hash, version, Checksum, ExeInfo, MPQName)

   NullTruncString ExeInfo

   If Not FileExists(path & GameExe) Then

       CreateVersionPacket = INVALID_VERSION_PACKET

   Else

       CreateVersionPacket = "68XI" & StrReverse("SEXP") & MKL(VersionByte) & MKL(version) & MKL(Checksum) & ExeInfo & Chr$(0)

   End If

End Function
Title: Re:Creating An Account
Post by: Camel on April 28, 2003, 09:46 PM
Quote from: St0rm.iD on April 27, 2003, 05:37 PM
Quote from: Camel on April 27, 2003, 05:32 PM
Quote from: Arta[vL] on April 27, 2003, 02:26 PMthe old login will only work for DRTL/DSHR
and JSTR

No.
uh, yes...
Title: Re:Creating An Account
Post by: Mesiah / haiseM on April 29, 2003, 01:53 PM
Quote from: Camel on April 28, 2003, 09:46 PM
Quote from: St0rm.iD on April 27, 2003, 05:37 PM
Quote from: Camel on April 27, 2003, 05:32 PM
Quote from: Arta[vL] on April 27, 2003, 02:26 PMthe old login will only work for DRTL/DSHR
and JSTR

No.
uh, yes...

No. Not only does one of my bots still use it, but my brood wars client does still.
Title: Re:Creating An Account
Post by: Camel on April 29, 2003, 03:08 PM
Quote from: MesiaH on April 29, 2003, 01:53 PM
Quote from: Camel on April 28, 2003, 09:46 PM
Quote from: St0rm.iD on April 27, 2003, 05:37 PM
Quote from: Camel on April 27, 2003, 05:32 PM
Quote from: Arta[vL] on April 27, 2003, 02:26 PMthe old login will only work for DRTL/DSHR
and JSTR

No.
uh, yes...

No. Not only does one of my bots still use it, but my brood wars client does still.

who are you saying no to?
and btw, i know it's possible to use the old login sequence with, afaik, any single cd keyed product