Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: Ryan Marcus on August 27, 2005, 08:35 AM

Title: Critque Me Please
Post by: Ryan Marcus on August 27, 2005, 08:35 AM
I am a intermediate/advance REALbasic (similar to Visual Basic, but cross-platform) with a beginning knowledge of TCP/IP.

I got into Starcraft about 4 years ago, and have been playing avidly since (Blizzard injects crack though the mouse, or something...)

I worked for a while with iago on JavaOp, and decided to take a crack at it myself (although I will still be writing plugins for JavaOp).

I downloaded a few examples, converted them from VB to RB, and took a look. I quickly figured out it was going to be harder then it looks, and that I needed 2 connections, BNET and BNLS, not just one.

So I checked out BnetDocs (GJ Arga) and wrote a basic BNLS socket. I am sure there is a better way to do what I am doing, so please, tell me.

DataAvailable Event:

ParseData(me.ReadAll)
// me refers to the socket
// ReadAll is the equivalent of GetData(Var, String).


ParseData Method, Parameters data as string:

  Select Case Asc(Mid(Data, 3, 1))
  case GetPacketIDBNLS("CDKEY")
  case GetPacketIDBNLS("LOGONCHALLENGE")
  case GetPacketIDBNLS("LOGONPROOF")
  case GetPacketIDBNLS("CREATEACCOUNT")
  case GetPacketIDBNLS("CHANGECHALLENGE")
  case GetPacketIDBNLS("CHANGEPROOF")
  case GetPacketIDBNLS("UPGRADECHALLENGE")
  case GetPacketIDBNLS("UPGRADEPROOF")
  case GetPacketIDBNLS("VERSIONCHECK")
  case GetPacketIDBNLS("CONFIRMLOGON")
  case GetPacketIDBNLS("HASHDATA")
  case GetPacketIDBNLS("CDKEY_EX")
  case GetPacketIDBNLS("CHOOSENLSREVISION")
  case GetPacketIDBNLS("AUTHORIZE")
  case GetPacketIDBNLS("AUTHORIZEPROOF")
  case GetPacketIDBNLS("REQUESTVERSIONBYTE")
  case GetPacketIDBNLS("VERIFYSERVER")
  case GetPacketIDBNLS("RESERVESERVERLOTS")
  case GetPacketIDBNLS("SERVERLOGONCHALLENGE")
  case GetPacketIDBNLS("SERVERLOGONPROOF")
  end Select

// GetPacketIDBNLS returns the correct values.



I am also working on a packet builder, but I just wanted to get that part done. Are there better ways? Am I just completely wrong?



Thanks in advance, Ryan Marcus.
Title: Re: Critque Me Please
Post by: hismajesty on August 27, 2005, 09:17 AM
Arga didn't do anything with BnetDocs. :)
Title: Re: Critque Me Please
Post by: l2k-Shadow on August 27, 2005, 12:43 PM
Just use a locally hashed connection and eliminate the use of BNLS and another socket all together.
Title: Re: Critque Me Please
Post by: Yegg on August 27, 2005, 03:18 PM
l2k-shadow. How can you be certain he knows enough about using the Battle.net binary files?

Title: Re: Critque Me Please
Post by: l2k-Shadow on August 27, 2005, 10:29 PM
Quote from: Yegg on August 27, 2005, 03:18 PM
l2k-shadow. How can you be certain he knows enough about using the Battle.net binary files?

If he is making a Battle.net related program, he should have certain amount of knowledge about hash files. If he doesn't then he can download countless sources using a locally hashed connection and use a hashing library like BNCSUtil (http://bncsutil.ionws.com) which is open source and contains a public VB example which would be easily ported over to RB. IMO hashing is easier and quicker to code than a BNLS connection.
Title: Re: Critque Me Please
Post by: UserLoser. on August 28, 2005, 06:30 PM
Quote from: Ryan Marcus on August 28, 2005, 06:24 PM
Hmm.. Are you sure its not Arga? Oh well..

Somehow, I got four replies, not a single one relating to my post ;).

However, thanks for the good ideas. I will have to look into local hashing.

I thought the main reason to use BNLS was that you did not have to update your bots hashes.. or is this bogus?

It's Arta, not Arga.  And sorry, I don't have any input for you.