Valhalla Legends Forums Archive | Battle.net Bot Development | Getting Started

AuthorMessageTime
Newtfeet
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
August 16, 2003, 3:25 PM
Tubby
Clean Slate Bot and Cuphead included a tutorial. Your also gonna need a BNLS account and password.
August 16, 2003, 3:52 PM
Newtfeet
[quote author=Tubby link=board=17;threadid=2355;start=0#msg18412 date=1061049161]
Clean Slate Bot and Cuphead included a tutorial. Your also gonna need a BNLS account and password.
[/quote]
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?
August 16, 2003, 11:53 PM
hismajesty
www.valhallalegends.com/cuphead

And yes through local hashing
August 16, 2003, 11:55 PM
DrivE
https://davnit.net/bnet/vL/phpbbs/index.php?board=11;action=display;threadid=425

https://davnit.net/bnet/vL/phpbbs/index.php?board=25;action=display;threadid=1976

Read those before you go any further.

!~!HaZaRD!~!
August 17, 2003, 12:09 AM
Newtfeet
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
August 18, 2003, 3:36 PM
Soul Taker
CupHead is a person =P
August 18, 2003, 4:34 PM
Newtfeet
[quote author=Soul Taker link=board=17;threadid=2355;start=0#msg18622 date=1061224486]
CupHead is a person =P
[/quote]
Yeah, I noticed that right after I posted. Sorry, CupHead. ;)
August 18, 2003, 6:31 PM
Kp
For protocol documentation, I'd suggest BnetDocs.
August 18, 2003, 6:42 PM
Newtfeet
[quote author=Kp link=board=17;threadid=2355;start=0#msg18632 date=1061232140]
For protocol documentation, I'd suggest BnetDocs.
[/quote]
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.).
August 18, 2003, 6:46 PM
RhiNo
[quote author=Newtfeet link=board=17;threadid=2355;start=0#msg18618 date=1061220996]
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
[/quote]

what lang will you be using??..
August 18, 2003, 7:22 PM
Kp
[quote author=Newtfeet link=board=17;threadid=2355;start=0#msg18633 date=1061232384]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]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).
August 18, 2003, 7:59 PM
DrivE
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!~!
August 18, 2003, 8:37 PM
Newtfeet
[quote author=RhiNo link=board=17;threadid=2355;start=0#msg18635 date=1061234537]what lang will you be using??..
[/quote]
REALbasic.
http://www.realsoftware.com/realbasic/

[quote author=Kp link=board=17;threadid=2355;start=0#msg18640 date=1061236771]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).
[/quote]
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 author=HaZarD link=board=17;threadid=2355;start=0#msg18641 date=1061239034]
Let me get this straight. You are trying to build a hashed Battle.Net bot in C++ with no prior experience of any kind?[/quote]
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.
August 18, 2003, 8:41 PM
DrivE
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!~!
August 18, 2003, 8:47 PM
Newtfeet
[quote author=HaZarD link=board=17;threadid=2355;start=0#msg18644 date=1061239644]
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.[/quote]
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.
August 18, 2003, 9:00 PM
SNiFFeR
I think you can find stuff here: http://www.gamegosu.net/ (Kain's web site)
August 18, 2003, 9:03 PM
Newtfeet
[quote author=SNiFFeR link=board=17;threadid=2355;start=15#msg18648 date=1061240609]
I think you can find stuff here: http://www.gamegosu.net/ (Kain's web site)
[/quote]
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?
August 18, 2003, 9:09 PM
DrivE
Using the BNetDocs along with some creativity and common sense should be enough to help you with understanding BNet protocols.

!~!HaZaRD!~!
August 18, 2003, 9:21 PM
Newtfeet
[quote author=HaZarD link=board=17;threadid=2355;start=15#msg18651 date=1061241698]
Using the BNetDocs along with some creativity and common sense should be enough to help you with understanding BNet protocols.[/quote]
Ok, thanks for the tips! About the checksum algorithm in the BnetDocs (see above post), do you have any answers?
August 18, 2003, 9:28 PM
Arta
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.
August 18, 2003, 9:44 PM
Newtfeet
[quote author=Arta[vL] link=board=17;threadid=2355;start=15#msg18655 date=1061243051]
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]
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.'
August 18, 2003, 9:55 PM
Arta
That happens if you're idle for too long. Just log in again.
August 18, 2003, 10:32 PM
Newtfeet
[quote author=Arta[vL] link=board=17;threadid=2355;start=15#msg18660 date=1061245920]
That happens if you're idle for too long. Just log in again.
[/quote]
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.
August 18, 2003, 10:34 PM
Arta
Enable cookies.
August 18, 2003, 10:38 PM
Camel
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.
August 18, 2003, 10:57 PM
Newtfeet
[quote author=Arta[vL] link=board=17;threadid=2355;start=15#msg18664 date=1061246338]
Enable cookies.
[/quote]
:) Thanks. I did have them on, but only for sites I navigate to. For some reason, BnetDocs didn't count as being 'navigated' to.
August 18, 2003, 11:04 PM
Maddox
[quote author=HaZarD link=board=17;threadid=2355;start=0#msg18644 date=1061239644]
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]

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.
August 18, 2003, 11:32 PM
Newtfeet
[quote author=Maddox link=board=17;threadid=2355;start=15#msg18672 date=1061249561]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]
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. ;))
August 18, 2003, 11:35 PM

Search