Are there any tutorials about connecting to Battle.net? I would like to make an application that can chat on Battle.net as well as create a bot, but I have found nothing that tells me where to connect to and what to do afterwards. I am a somewhat competent programmer, but this would be my first Internet application.
-Newtfeet
Clean Slate Bot and Cuphead included a tutorial. Your also gonna need a BNLS account and password.
Quote from: Tubby on August 16, 2003, 10:52 AM
Clean Slate Bot and Cuphead included a tutorial. Your also gonna need a BNLS account and password.
Where can I get these? Isn't there any tutorial that is available separately from bot downloads? Also, isn't it possible to connect to Battle.net without BNLS?
www.valhallalegends.com/cuphead
And yes through local hashing
http://forum.valhallalegends.com/phpbbs/index.php?board=11;action=display;threadid=425
http://forum.valhallalegends.com/phpbbs/index.php?board=25;action=display;threadid=1976
Read those before you go any further.
!~!HaZaRD!~!
Thanks guys. However, I am trying to write a bot from scratch (without BNLS), and I won't be using VB. Does CupHead come with tutorials on the Battle.net protocol?
-Newtfeet
CupHead is a person =P
Quote from: Soul Taker on August 18, 2003, 11:34 AM
CupHead is a person =P
Yeah, I noticed that right after I posted. Sorry, CupHead. ;)
For protocol documentation, I'd suggest BnetDocs (https://www.valhallalegends.com/arta/bnetdocs/).
Quote from: Kp on August 18, 2003, 01:42 PM
For protocol documentation, I'd suggest BnetDocs (https://www.valhallalegends.com/arta/bnetdocs/).
Thanks, but I was aware of that. I am looking for tutorials, not documentation. I mostly just need to know how to start (where to connect to, what to send to log in, etc.).
Quote from: Newtfeet on August 18, 2003, 10:36 AM
Thanks guys. However, I am trying to write a bot from scratch (without BNLS), and I won't be using VB. Does CupHead come with tutorials on the Battle.net protocol?
-Newtfeet
what lang will you be using??..
Quote from: Newtfeet on August 18, 2003, 01:46 PMThanks, but I was aware of that. I am looking for tutorials, not documentation. I mostly just need to know how to start (where to connect to, what to send to log in, etc.).
Connect to any valid BNCS, send control-a ("\1" in C/C++) to specify binary logon, then send your product's initial handshake, which is SID_AUTH_INFO unless you're doing something old like War2 or Diablo. The server will respond with SID_AUTH_INFO, to which you send SID_AUTH_CHECK. It answers back with a SID_AUTH_CHECK specifying whether it will accept you or not (reasons for failuire include bad game version, bad CD key, CD key in use). Once you have those working, post back and I'll dig up my notes on the rest of the sequence (or you could monitor the game's traffic on your own).
Let me get this straight. You are trying to build a hashed Battle.Net bot in C++ with no prior experience of any kind?
!~!HaZaRD!~!
Quote from: RhiNo on August 18, 2003, 02:22 PMwhat lang will you be using??..
REALbasic.
http://www.realsoftware.com/realbasic/ (http://www.realsoftware.com/realbasic/)
Quote from: Kp on August 18, 2003, 02:59 PMConnect to any valid BNCS, send control-a ("\1" in C/C++) to specify binary logon, then send your product's initial handshake, which is SID_AUTH_INFO unless you're doing something old like War2 or Diablo. The server will respond with SID_AUTH_INFO, to which you send SID_AUTH_CHECK. It answers back with a SID_AUTH_CHECK specifying whether it will accept you or not (reasons for failuire include bad game version, bad CD key, CD key in use). Once you have those working, post back and I'll dig up my notes on the rest of the sequence (or you could monitor the game's traffic on your own).
I wish there were awards for "Most Helpful Post in This Thread So Far". :) Just one question: what is a BNCS? I assume that is a Battle.net server? I thought I saw that you connect to uswest.battle.net, useast.battle.net, asia.battle.net, europe.battle.net? Thanks!
EDIT:
Quote from: HaZarD on August 18, 2003, 03:37 PM
Let me get this straight. You are trying to build a hashed Battle.Net bot in C++ with no prior experience of any kind?
Define 'experience'. I am not using C++, I have programmed before and, IMHO, am good at it, but this is my first Internet (i.e. using sockets) application and this is my first time using hashes.
You obviously aren't versed on Battle.Net protocols. You want tutorials instead of documentation. You don't want to use the simpler langauge of vB to grasp an understanding before taking on C++. You don't want to use BNLS which, in the opinion of some, is easier to understand than hashing. You don't want to use CSB or its tutorials to gain a better understanding of protocols and basic programming. Do you even understand how to program in C++ at all? I'm not talking about random number generators to simulate a dice roll either. You might want to start at the beginning rather than trying to skip ahead a few chapters.
!~!HaZaRD!~!
Quote from: HaZarD on August 18, 2003, 03:47 PM
You obviously aren't versed on Battle.Net protocols. You want tutorials instead of documentation. You don't want to use the simpler langauge of vB to grasp an understanding before taking on C++. You don't want to use BNLS which, in the opinion of some, is easier to understand than hashing. You don't want to use CSB or its tutorials to gain a better understanding of protocols and basic programming. Do you even understand how to program in C++ at all? I'm not talking about random number generators to simulate a dice roll either. You might want to start at the beginning rather than trying to skip ahead a few chapters.
I am not using C++. I am using REALbasic (see my above post). I want tutorials as no documentation seems to tell me how to connect to Battle.net. I may use BNLS until I get a hash algorithm working., as you seem to be so vehemently opposed to me making a calculation. I suppose I should have told you that I'm doing this on a Mac, so I doubt CSB will help me.
I think you can find stuff here: http://www.gamegosu.net/ (Kain's web site)
Quote from: SNiFFeR on August 18, 2003, 04:03 PM
I think you can find stuff here: http://www.gamegosu.net/ (Kain's web site)
Thanks. I saw that before, but forgot to bookmark it. Also, I just noticed something. On the BnetDocs, the BNLS Checksum Algorithm information that I assumed was how to compute the hash to get on Battle.net I now realize that it says BNLS, not BNCS. Is this required to connect to BNLS, or Battle.net?
Using the BNetDocs along with some creativity and common sense should be enough to help you with understanding BNet protocols.
!~!HaZaRD!~!
Quote from: HaZarD on August 18, 2003, 04:21 PM
Using the BNetDocs along with some creativity and common sense should be enough to help you with understanding BNet protocols.
Ok, thanks for the tips! About the checksum algorithm in the BnetDocs (see above post), do you have any answers?
The BNLS checksum algorithm is for connecting to BNLS, yes. There are 2 hashing algorithms involved in connecting to BNCS.
The first is CheckRevision. This is used to verify that you have a correct version of whatever game you're emulating. CheckRevision performs a check of your main game files (or 'hash files') which vary from game to game. For Starcraft, they're starcraft.exe, storm.dll, and battle.snp.
The second is a modified version of the SHA-1 hashing algorithm. This is used to protect sensitive information - namely, your CD Key and Password - in transit. It means that anyone who intercepted your packets while they were being sent to Battle.net would not be able to read your CD Key or Password. It also means that Battle.net does not 'know' your password - it is never stored in plain text.
Source code for both of these functions is fairly widely distributed. There are also a variety of DLLs (not that they'll be any use to you) that export them. BNLS also supports them both. The advantage of BNLS is that you don't need to have any hash files locally - BNLS takes care of it for you. If you do it locally you'll need the hash files for the product you're emulating. Using BNLS also means you have to establish 2 connections instead of one. This may or may not be a problem.
Quote from: Arta[vL] on August 18, 2003, 04:44 PM
The BNLS checksum algorithm is for connecting to BNLS, yes. There are 2 hashing algorithms involved in connecting to BNCS.
The first is CheckRevision. This is used to verify that you have a correct version of whatever game you're emulating. CheckRevision performs a check of your main game files (or 'hash files') which vary from game to game. For Starcraft, they're starcraft.exe, storm.dll, and battle.snp.
The second is a modified version of the SHA-1 hashing algorithm. This is used to protect sensitive information - namely, your CD Key and Password - in transit. It means that anyone who intercepted your packets while they were being sent to Battle.net would not be able to read your CD Key or Password. It also means that Battle.net does not 'know' your password - it is never stored in plain text.
Source code for both of these functions is fairly widely distributed. There are also a variety of DLLs (not that they'll be any use to you) that export them. BNLS also supports them both. The advantage of BNLS is that you don't need to have any hash files locally - BNLS takes care of it for you. If you do it locally you'll need the hash files for the product you're emulating. Using BNLS also means you have to establish 2 connections instead of one. This may or may not be a problem.
I see, thanks! I didn't know that BNLS was so useful. I guess I'll be using it.
BTW, Arta, my BnetDocs password seems to have become useless. I've registered as Newtfeet, could you check it out? My 'session has expired or become invalid.'
That happens if you're idle for too long. Just log in again.
Quote from: Arta[vL] on August 18, 2003, 05:32 PM
That happens if you're idle for too long. Just log in again.
Ah, but it seems that in this case, 'too long' is 1 second. No matter how many times I log in, it still says the same thing.
Enable cookies.
Tip to Arta: when a user logs in check if they have cookies enabled (by trying to store one) and warn them if they don't.
Quote from: Arta[vL] on August 18, 2003, 05:38 PM
Enable cookies.
:) Thanks. I did have them on, but only for sites I navigate to. For some reason, BnetDocs didn't count as being 'navigated' to.
Quote from: HaZarD on August 18, 2003, 03:47 PM
You obviously aren't versed on Battle.Net protocols. You want tutorials instead of documentation. You don't want to use the simpler langauge of vB to grasp an understanding before taking on C++. You don't want to use BNLS which, in the opinion of some, is easier to understand than hashing. You don't want to use CSB or its tutorials to gain a better understanding of protocols and basic programming. Do you even understand how to program in C++ at all? I'm not talking about random number generators to simulate a dice roll either. You might want to start at the beginning rather than trying to skip ahead a few chapters.
!~!HaZaRD!~!
Nowhere does it say he is using C++, he just stated he is using REALBasic. Also, CSB does not help any understanding of battle.net protocol.
Quote from: Maddox on August 18, 2003, 06:32 PMNowhere does it say he is using C++, he just stated he is using REALBasic. Also, CSB does not help any understanding of battle.net protocol.
Thanks, you said what I was itching to say, at the expense of being rude. It's not as rude if someone else says it. (No offense meant to either party, of course. ;))