• Welcome to Valhalla Legends Archive.
 

[VB6] SID_AUTH_INFO

Started by Sorc.Polgara, July 02, 2004, 08:10 PM

Previous topic - Next topic

Sorc.Polgara

It won't work for me...


Private Sub mnuConnect_Click()

   Dim sckHost As String
   Dim sckPort As Long

   sckHost = "useast.battle.net"
   sckPort = 6112
   
   ws.Connect sckHost, sckPort

End Sub

Private Sub ws_Connect()

   lstStatus.AddItem "Connected"

   SID_AUTH_INFO

End Sub

Private Sub SID_AUTH_INFO()

   Dim PBuf As New PacketBuffer

   PBuf.InsertDWORD 0
   PBuf.InsertNonNTString "68XI"
   PBuf.InsertNonNTString "RATS"
   PBuf.InsertDWORD &HC9
   PBuf.InsertDWORD 0
   PBuf.InsertDWORD 0
   PBuf.InsertDWORD 0
   PBuf.InsertDWORD 0
   PBuf.InsertDWORD 0
   PBuf.InsertNTString "USA"
   PBuf.InsertNTString "United States"
   PBuf.SendPacket ws, &H32
   
End Sub



I'm using the PacketBuffer Class by DarkMinion

I am recieving no response from the server.

The packet is suppose to be the SID_AUTH_INFO (0x50) B.Net packet

Quote
(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

Dunno what I doing wrong.

I used BnetDocs.... but I must be doing some wrong...

BaDDBLooD

i believe it is 0x50 not 0x32 ( &H50 )
There are only two kinds of people who are really fascinating: people who know absolutely everything, and people who know absolutely nothing.

MyndFyre

Quote from: BaDDBLooD on July 02, 2004, 08:14 PM
i believe it is 0x50 not 0x32 ( &H50 )

Hehehehe, 0x32 == 50d.  LoL.  ;)
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.

Sorc.Polgara

#3
Ok, I fixed the message ID to &H50 but it still doesn't seem to work... I get no response. :\

I'm not quite sure what the version byte for StarCraft is... it changes so what is the current one atm?


Ummm  the BnetDocs and the BNLSProtocolSpec.txt say different things about the SID_AUTH_INFO packet...

BNLSProtocolSpec.txt

(DWORD) Protocol ID. Always 0.
(DWORD) Platform ID. Valid platform IDs are: 'IX86' (Intel x86), 'PMAC' (Macintosh generic), 'XMAC' (Macintosh OS-X).
(DWORD) Product ID. Valid product IDs are: 'STAR', 'SEXP', 'W2BN', 'D2DV', 'D2XP', 'JSTR', 'WAR3'.
(DWORD) Version byte.**
(DWORD) Product language.*
(DWORD) Local IP, for NAT compatibility.*
(LONG) Time zone bias multiplied by -60, for example, GMT-8 gets the value 480: (-8*-60).*
(DWORD) Locale ID. Value returned by GetSystemDefaultLCID.*
(DWORD) Language ID. Value returned by GetSystemDefaultLangID.*
(String) Country abbreviation, such as "USA".
(String) Country name, such as "United States".

* This field doesn't really matter and may just be 0.



BnetDocs

(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

*These fields can be set to zero without breaking logon.


The BNLSProtocolSpec.txt says that the Time zone bias is a (LONG) but BnetDocs says its a (DWORD)...

GoSuGaMING

#4
current verByte for sc = &C9 or 201 in Decimal ^^