• Welcome to Valhalla Legends Archive.
 

What do i do next?

Started by BaDDBLooD, March 04, 2004, 11:07 PM

Previous topic - Next topic

BaDDBLooD

Some of you may have seen my earlier post about that BNLS connection.

I Finally got a Connection to BNLS Server, Sent my Username/Password.  Also got a Response saying that they were accepted.

What do i do next on my way to Connecting to bnet?
There are only two kinds of people who are really fascinating: people who know absolutely everything, and people who know absolutely nothing.

Dark-Feanor

Download CleanSlateBot.ocx from www.valhallalegends.com/cuphead and read the documentation on how to use it.
This is assuming that you already know Visual Basic.
- Feanor[xL]
clan exile
Firebot
iago: "caps lock is like cruise control for cool"

CrAz3D

Quote from: BaDDBLooD on March 05, 2004, 07:37 AM
i don't want to use Cleanslate bot...

i have WinsockBNLS, made a Connection to BNLS server.  Sent the ID/PASS to the bnls server, and got a response back.

What's the next step in Connecting to BNET?

Make a winsock for BNET & do:

winsockBNET.connect, SERVER (which is w/e), 6112


& then, upon the winsockBNET connecting, send x50 (basically location packet).
After this parse, or seperate, the data the battle.net sends back to you in the winsockBNET_DataArrival
rebundance - having or being in excess of sheer stupidity
(ré-bun-dance)
Quote from: Spht on June 22, 2004, 07:32 PMSlap.
Quote from: Adron on January 28, 2005, 09:17 AMIn a way, I believe that religion is inherently evil, which includes Christianity. I'd also say Christianity is eviller than Buddhism (has more potential for evil).
Quote from: iago on April 19, 2005, 01:06 PM
CrAz3D's ... is too big vertically, at least, too big with ... iago ...

MyndFyre

QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

Eric

#4
Quote from: BaDDBLooD on March 05, 2004, 12:24 PM
Please help me... What do i Send / Recieve next in My Login Sequence?

http://bnetdocs.valhallalegends.com/sequence.php

After logging into BNLS, the only purpose it serves is replacing the functions that are called in BnetAuth.dll along with the functions required for Warcraft III logon.

As I pointed out in your other post, if you don't understand BnetDocs, you probably won't understand the majority of this.  You should either study up on socket programming and packet creation/retrieval or use CleanSlateBot.

hismajesty

Quote from: Myndfyre on March 05, 2004, 11:18 AM
Quote from: DaRk-FeAnOr on March 05, 2004, 08:23 AM
Shut up assbag. Check out http://www.valhallalegends.com/yoni/stuff/BNLSProtocolSpec.asp

Don't be an ass.  If he bothers you that much just ignore him.  Damn.

He can't help being an ass; however, it WAS uncalled for.

ChR0NiC

#6
Quote from: BaDDBLooD on March 04, 2004, 11:07 PM
Some of you may have seen my earlier post about that BNLS connection.

I Finally got a Connection to BNLS Server, Sent my Username/Password.  Also got a Response saying that they were accepted.

What do i do next on my way to Connecting to bnet?

Well....next what you gotta do is tell BNLS what product you wish to use by doing this......


   Case &HF
       with Buffer
       .InsertDWORD GetBNLSByte()
       .SendBNLSPacket frmMain.sckBNLS, &H10
       End With



Public Function GetBNLSByte() As Long
Select Case varProduct
   Case "RATS"
       GetBNLSByte = &H1
   Case "PXES"
       GetBNLSByte = &H2
   Case "NB2W"
       GetBNLSByte = &H3
   Case "VD2D"
       GetBNLSByte = &H4
   Case "PX2D"
       GetBNLSByte = &H5
   Case Else
       AddChat vbRed, "Invalid Client version! Setting version as Starcraft!"
       GetBNLSByte = &H1
End Select
End Function


Anyways, that's what I use when receiving 0xF from BNLS......

Edit: This I believe is optional, you are only doing this I BELIEVE in which to request the verbyte in the response to 0x10, but it is a good thing to use, at least in my opinion


   Case &H10
       VerByte = GetDWORD(Mid(Data, 8, 4))
       WinSockBNET.Close
       WinSockBNET.Connect varServer, 6112


This is where you obtain the verbyte from BNLS, but you can use your own built in verbyte, you can get the current verbytes at BNET Docs.....(But I like getting the verbyte from BNLS because SkyWing usually figures out when a verbyte is changed before I do.)

MyndFyre

Here's what I suggest:

Get EternalChat or StealthBot, and then Ethereal or BNCSMon.  Monitor your BNCS+BNLS connections from there, and watch the order of packets sent to and from each BNCS and BNLS.

If you're using ethereal, the filter I use is:

port 6112 or port 9367

That way, you can see which packet it being sent when, and what data it has to have before sending.  This info is SOMEWHAT contained in the BNLS docs, but if you do it this way, you get a really good idea of what's going on.  That's how I did.
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

ChR0NiC

Quote from: BaDDBLooD on March 05, 2004, 09:54 PM
that's what i needed.. Thanks

Just for people who do not know what to do next, usually when starting your connection to BNET, the first thing you do is send 0x50....

And glad I could be of help BaddBlood. :)

UserLoser.

Quote from: ChR0NiC on March 06, 2004, 01:35 PM
Quote from: BaDDBLooD on March 05, 2004, 09:54 PM
that's what i needed.. Thanks

Just for people who do not know what to do next, usually when starting your connection to BNET, the first thing you do is send 0x50....

And glad I could be of help BaddBlood. :)

The first thing you do is tell the server what type of client you are (1: Game client, 2: FTP, 3: Chat)

ChR0NiC

Quote from: UserLoser. on March 06, 2004, 02:03 PM
The first thing you do is tell the server what type of client you are (1: Game client, 2: FTP, 3: Chat)

I assumed he knew that o.O

ChR0NiC

Quote from: BaDDBLooD on March 06, 2004, 03:56 PM
k, What do i send to Tell Bnet what i am using, game, chat, or ftp?

And can i get a "Layout" for 0x50.. BNETDOC's Doesn't explain it very well, in my opinion that is...

Form1.WinsockBNET.SendData Chr(1) is using Game, I have not done Chat or FTP, but I am guessing they are similar.

0x50 is quite simple, but I won't do it for you.

(DWORD)       Protocol ID (0)
(DWORD)       Platform ID
(DWORD)       Program ID
(DWORD)       Version Byte
(DWORD)       Product language
(DWORD)       Local IP for NAT compatibility*
(DWORD)       Time zone bias*
(DWORD)       Locale ID*
(DWORD)       Language ID*
(STRING)       Country abreviation
(STRING)       Country

I can TRY walk you through this.....

BNET's protocol ID = SID_NULL or in VB terms &H0
Platform ID = A DWORD specifying the client's platform (Macintosh, PC, etc).  "6X8I" is usually used for this and the Program ID is your product EG: "PXES"
Version Byte =  the verbyte which you retrieved from BNLS using a DWORD.
Product language = can be ignored by using SID_NULL (&H0)
Local IP for NAT compatibility* = can be ignored by using SID_NULL (&H0
Time zone bias* = can be ignored by using SID_NULL (&H0)
Locale ID* = can be ignored by using SID_NULL (&H0)
Language ID* = can be ignored by using SID_NULL (&H0)
Country abreviation = "USA" or the country of your choice's abbreviated
Country = "United States" or the country of your choice.
Then  of course you once you combine all the data together you send it with the Packet ID of 0x50.
Buffer.SendPacket &H50

well.....I said I wouldn't do it for you, but it looks like I pretty much did lol....
There are ways to to do Time Zone, Locale ID, Language ID and other ones, but since you are just trying to get connected there is no use on trying to figure those out until you learn more.

ChR0NiC

#12
Quote from: BaDDBLooD on March 06, 2004, 04:27 PM
ok.. doing good.

What does (STRING) Mean, and Which String do i use?  There is like 5 in the Packetbuffer..

if you could explain what each does, and when to use them, that'd be Great!

Well for Country Abbrev and Country, you gotta use Null Terminated Strings.
should be in your packetbuffer under InsertNTString

A Null Terminated String is a string that is terminated (ended) with a null character. EG: vbNullChar aka Chr(0)

ChR0NiC

#13
Wait for your responses then act of them.
Next you will receive 0x25 and then followed by 0x50.
You usually respond to 0x25 but it is not ESSENTIAL to respond to it.
You respond to 0x50 by sending 0x51, which is usually extremely hard but BNLS makes it pretty easy to do for you. I want you to figure out 0x25 (if you choose to do it) on your own.

ChR0NiC


Public Sub ParseBNET(Data As String)
Select Case Asc(Mid(Data, 2, 1))
Case &H50
End Select


Just to make a little correction