BNETDocs: Redux is no longer updated, this subdomain exists for archival purposes only. Visit the main site.

Navigation

Generate Code: All packets
Packets

Logon Sequences


This page documents the sequences of messages that must be sent, and should be received, in order to log on using a particular product. Products may be able to use methods other than the ones shown here: this page documents the sequences observed in the official clients. These sequences may vary from time to time, as product updates are released.

Prior to initating any of the game protocol logon sequences, you will need to send the game protocol byte (0x01).

Starcraft and expansion

C > S [0x50] SID_AUTH_INFO
S > C [0x25] SID_PING
C > S [0x25] SID_PING (optional)
S > C [0x50] SID_AUTH_INFO
C > S [0x51] SID_AUTH_CHECK
S > C [0x51] SID_AUTH_CHECK
Client gets icons file, TOS file, and server list file:
C > S [0x2D] SID_GETICONDATA (optional)
S > C [0x2D] SID_GETICONDATA (optional response)
C > S [0x33] SID_GETFILETIME (returned icons file name) (optional)
C > S [0x33] SID_GETFILETIME ("tos_USA.txt") (optional)
C > S [0x33] SID_GETFILETIME ("bnserver.ini") (optional)
S > C [0x33] SID_GETFILETIME (one for each request)
Connection to BNFTP to do file downloads
C > S [0x3A] SID_LOGONRESPONSE2
S > C [0x3A] SID_LOGONRESPONSE2
C > S [0x14] SID_UDPPINGRESPONSE (optional)
(then enter chat)

Diablo II and expansion

C > S [0x50] SID_AUTH_INFO
S > C [0x25] SID_PING
C > S [0x25] SID_PING (optional)
S > C [0x50] SID_AUTH_INFO
C > S [0x51] SID_AUTH_CHECK
S > C [0x51] SID_AUTH_CHECK
Client gets TOS file:
C > S [0x33] SID_GETFILETIME ("tos_USA.txt") (optional)
S > C [0x33] SID_GETFILETIME (one for each request)
Connection to BNFTP to do file downloads
C > S [0x3A] SID_LOGONRESPONSE2
S > C [0x3A] SID_LOGONRESPONSE2
Client does realm logon here for closed Battle.net:
C > S [0x40] SID_QUERYREALMS2
S > C [0x40] SID_QUERYREALMS2
C > S [0x3E] SID_LOGONREALMEX
S > C [0x3E] SID_LOGONREALMEX
Connection to MCP server
C > S [0x0B] SID_GETCHANNELLIST
C > S [0x0A] SID_ENTERCHAT
S > C [0x0B] SID_GETCHANNELLIST
S > C [0x0A] SID_ENTERCHAT
C > S [0x46] SID_NEWS_INFO (optional)
S > C [0x46] SID_NEWS_INFO (optional response)
(game client waits until user clicks Enter Chat)
C > S [0x0C] SID_JOINCHANNEL (D2 First Join if no home channel set)
S > C [0x0F] SID_CHATEVENT
(etc...)

Warcraft II BNE

C > S [0x1E] SID_CLIENTID2
C > S [0x12] SID_LOCALEINFO
C > S [0x06] SID_STARTVERSIONING
S > C [0x1D] SID_LOGONCHALLENGEEX
S > C [0x25] SID_PING
C > S [0x25] SID_PING (optional)
S > C [0x06] SID_STARTVERSIONING
C > S [0x07] SID_REPORTVERSION
S > C [0x07] SID_REPORTVERSION
C > S [0x14] SID_UDPPINGRESPONSE (optional)
C > S [0x36] SID_CDKEY2
S > C [0x36] SID_CDKEY2
Client gets icons file, TOS file, and server list file:
C > S [0x2D] SID_GETICONDATA (optional)
S > C [0x2D] SID_GETICONDATA (optional response)
C > S [0x33] SID_GETFILETIME (returned icons file name) (optional)
C > S [0x33] SID_GETFILETIME ("tos_USA.txt") (optional)
C > S [0x33] SID_GETFILETIME ("bnserver.ini") (optional)
S > C [0x33] SID_GETFILETIME (one for each request)
Connection to BNFTP to do file downloads
C > S [0x29] SID_LOGONRESPONSE
S > C [0x29] SID_LOGONRESPONSE
(then enter chat)

Warcraft III and expansion

C > S [0x50] SID_AUTH_INFO
S > C [0x25] SID_PING
C > S [0x25] SID_PING (optional)
S > C [0x50] SID_AUTH_INFO
C > S [0x51] SID_AUTH_CHECK
S > C [0x51] SID_AUTH_CHECK
Client gets icons file, TOS file, and server list file:
C > S [0x2D] SID_GETICONDATA (optional)
S > C [0x2D] SID_GETICONDATA (optional response)
C > S [0x33] SID_GETFILETIME (returned icons file name) (optional)
C > S [0x33] SID_GETFILETIME ("tos_USA.txt") (optional)
C > S [0x33] SID_GETFILETIME ("bnserver.ini") (optional)
S > C [0x33] SID_GETFILETIME (one for each request)
Connection to BNFTP to do file downloads

C > S [0x53] SID_AUTH_ACCOUNTLOGON
S > C [0x53] SID_AUTH_ACCOUNTLOGON
C > S [0x54] SID_AUTH_ACCOUNTLOGONPROOF
S > C [0x54] SID_AUTH_ACCOUNTLOGONPROOF
C > S [0x45] SID_NETGAMEPORT (optional)
C > S [0x0A] SID_ENTERCHAT
S > C [0x0A] SID_ENTERCHAT
C > S [0x44] SID_WARCRAFTGENERAL (WID_TOURNAMENT) (optional)
S > C [0x44] SID_WARCRAFTGENERAL (WID_TOURNAMENT) (optional response)
C > S [0x46] SID_NEWS_INFO (optional)
S > C [0x46] SID_NEWS_INFO (optional response)
(game client waits until user clicks Enter Chat)
C > S [0x0C] SID_JOINCHANNEL (First Join, "W3")
S > C [0x0F] SID_CHATEVENT
(etc...)

Warcraft III Demo

C > S [0x50] SID_AUTH_INFO
S > C [0x25] SID_PING
C > S [0x25] SID_PING (optional)
S > C [0x50] SID_AUTH_INFO
C > S [0x51] SID_AUTH_CHECK
S > C [0x51] SID_AUTH_CHECK
C > S [0x53] SID_AUTH_ACCOUNTLOGON*
S > C [0x54] SID_AUTH_ACCOUNTLOGONPROOF
C > S [0x45] SID_NETGAMEPORT (optional)
(*Note: W3DM does not enter chat, nor does it validate account passwords.)

Starcraft Shareware

C > S [0x05] SID_CLIENTID
C > S [0x12] SID_LOCALEINFO (optional)
C > S [0x2B] SID_SYSTEMINFO (optional)
C > S [0x06] SID_STARTVERSIONING
S > C [0x05] SID_CLIENTID
S > C [0x28] SID_LOGONCHALLENGE
S > C [0x25] SID_PING
C > S [0x25] SID_PING (optional)
S > C [0x06] SID_STARTVERSIONING
C > S [0x07] SID_REPORTVERSION
S > C [0x07] SID_REPORTVERSION
C > S [0x29] SID_LOGONRESPONSE
S > C [0x29] SID_LOGONRESPONSE
C > S [0x14] SID_UDPPINGRESPONSE (optional)
(then enter chat)

Starcraft: Japanese

C > S [0x05] SID_CLIENTID
C > S [0x12] SID_LOCALEINFO (optional)
C > S [0x2B] SID_SYSTEMINFO (optional)
C > S [0x06] SID_STARTVERSIONING
S > C [0x05] SID_CLIENTID
S > C [0x28] SID_LOGONCHALLENGE
S > C [0x25] SID_PING
C > S [0x25] SID_PING (optional)
S > C [0x06] SID_STARTVERSIONING
C > S [0x07] SID_REPORTVERSION
S > C [0x07] SID_REPORTVERSION
C > S [0x30] SID_CDKEY
S > C [0x30] SID_CDKEY
C > S [0x29] SID_LOGONRESPONSE
S > C [0x29] SID_LOGONRESPONSE
C > S [0x14] SID_UDPPINGRESPONSE (optional)
(then enter chat)

Diablo Shareware and Diablo I

C > S [0x1E] SID_CLIENTID2
C > S [0x12] SID_LOCALEINFO
C > S [0x06] SID_STARTVERSIONING
S > C [0x05] SID_CLIENTID
S > C [0x1D] SID_LOGONCHALLENGEEX
S > C [0x25] SID_PING
C > S [0x25] SID_PING (optional)
S > C [0x06] SID_STARTVERSIONING
C > S [0x07] SID_REPORTVERSION
S > C [0x07] SID_REPORTVERSION
C > S [0x29] SID_LOGONRESPONSE
S > C [0x29] SID_LOGONRESPONSE
C > S [0x14] SID_UDPPINGRESPONSE (optional)
(then enter chat)

Enter Chat Sequence (pre-Diablo II)

C > S [0x0A] SID_ENTERCHAT
C > S [0x0B] SID_GETCHANNELLIST
C > S [0x0C] SID_JOINCHANNEL (First Join)
S > C [0x0A] SID_ENTERCHAT
S > C [0x0B] SID_GETCHANNELLIST
S > C [0x0F] SID_CHATEVENT
(etc ...)


User Comments


For detailed questions and discussion, visit the Battle.net Research Forum

Unknown
Sep 13, 2007
05:33 PM

mmm should i say you need to send game protocol byte (0x01) before starting sending the logon sequence.

Kyro
Sep 14, 2007
04:11 AM

Added. While that is more of a widely known necessity, I can see the need to point out the need, so developers will not have to deal with this issue as much from people new to Battle.net bot development.

Accused
Dec 01, 2007
12:06 AM

Warcraft III

SEND -> SID_AUTH_INFO (0x50)
RECV <- SID_PING (0x25)
RECV <- SID_AUTH_INFO (0x50)
SEND -> SID_PING (0x25) (Optional)
SEND -> SID_AUTH_CHECK (0x51)
RECV <- SID_AUTH_CHECK (0x51)
SEND -> SID_AUTH_ACCOUNTLOGON (0x53)
RECV <- SID_AUTH_ACCOUNTLOGON (0x53)
SEND -> SID_AUTH_ACCOUNTLOGONPROOF (0x54)
RECV <- SID_AUTH_ACCOUNTLOGONPROOF (0x54)
SEND -> SID_NETGAMEPORT (0x45)
SEND -> SID_ENTERCHAT (0x0A)

I noticed there are some gaps in the current sequences as well.

Leaky
Dec 01, 2007
02:19 PM

added the wc3 login sequence

Hdx
Mar 02, 2008
12:32 AM

SC/BW

C->S: 0x50
S->C: 0x25
C->S: 0x25
S->C: 0x50
C->S: 0x51
S->C: 0x51
C->S: 0x2d
C->S: 0x33 - icons_star.bni
C->S: 0x14
C->S: 0x33 - tos_USA.txt
C->S: 0x33 - bnserver.ini
C->S: 0x26 - profile\sex
profile\age
profile\description
Record\GAME\0\wins
Record\GAME\0\losses
Record\GAME\0\dissconnects
Record\GAME\0\last game
Record\GAME\0\last game result
Record\GAME\1\wins
Record\GAME\1\losses
Record\GAME\1\dissconnects
Record\GAME\1\rating
Record\GAME\1\high rating
DynKey\GAME\1\rank
Record\GAME\1\high rank
Record\GAME\1\last game
Record\GAME\1\last game result
S->C: 0x2d
S->C: 0x33 - icons_STAR.bni
S->C: 0x33 - tos_USA.txt
S->C: 0x33 - bnserver.ini
S->C: 0x26
C->S: 0x3a
S->C: 0x3a
C->S: 0x0a
C->S: 0x0b
C->S: 0x0C - "StarCraft", "BroowWar"
S->C: 0x0b
S->C: 0x0a

Jailout2000
May 30, 2008
01:29 AM

Telnet/Chat:
(New lines are either 0x0A or 0x0D)
(When you send a message with multiple lines, it sends it like a queue without a wait, so don't flood offline by doing this)
(For a full list of packets, contact me)

* Connect.
C>S: 0x03 (Telnet)
C>S: 0x04 (Login)
C>S: New line
S>C: "Enter your account name and password."
S>C: New line
S>C: "Username: "
C>S: "Jailout2000"
C>S: New line
S>C: "Password: "
C>S: "Password"
C>S: New line
S>C: "Connection from [127.0.0.1]"
S>C: New line
- Note: From here on, each packet will be on a new line, and will be regular ascii strings, not surrounded by quotes and not ending with a null-terminator -
S>C: 2010 NAME Jailout2000
S>C: 1007 CHANNEL "Public Chat 1"
- Server will send 1001 USER to you for each user in the channel -
S>C: 1001 USER Jailout2000 0010 [CHAT]
- Server will send 1002 JOIN to everyone in the channel except you -
C>S: /join Public Chat 100
S>C: 1007 CHANNEL "Public Chat 100"
S>C: 1001 USER Jailout2000 0010 [CHAT]
S>C: 1005 TALK Jailout2000 0010 "It's just me in this channel."

I know Telnet was deprecated and can no longer be used, but what the heck, why not add it? You never know when someone will want to implement it... :P

LordVader
Jul 04, 2008
01:00 AM

D2DV, D2XP:
C>S 0x50
S>C 0x25
C>S 0x25
S>C 0x50
C>S 0x51
S>C 0x51
C>S 0x33
S>C 0x33
C>S 0x3A
S>C 0x3A
C>S 0x0B
C>S 0x0A
-- At this point you're in the lobby and you can send 0x0C to enter a channel
S>C 0x0B
S>C 0x0A

This is logging into an open character thru the client.

Jailout2000
Feb 16, 2009
06:31 PM

This list is pretty and all, but its missing quite a bit of important packets in ALL of the sequences. Try http://www.bnetdocs.com/old/sequence.html if you want a good list of sequences.

Vector
May 08, 2009
08:47 AM

I suggest adding links to these packets, so users will find it a lot easier to find the exact packet.

Jailout2000
Sep 26, 2009
05:35 PM

@Myself: Fixed that, copied most of it from the older one. The STAR/SEXP/WAR3/W3XP are taken from actual logs I have on my local computer.

@Vector: Added links to all of the packets, I agree - it helps.

Jailout2000
Aug 17, 2010
09:34 AM

Hmmm... Diablo I can have a SID_UDPPINGRESPONSE (0x14) too... or at least, I think? I get a UDP plug when using it, and when I send 0x14, I don't.

Sixen
Sep 26, 2010
05:53 AM

Possibly add W3DM and shortened Telnet reference.

Jailout2000
Oct 07, 2010
03:47 AM

@Sixen: Added.

ALERT
We recommend you use Firefox to view this site. This site has been optimized for Firefox.

Get Firefox
BNLS Server Status
bnls.bnetdocs.org:
bnls.net:
bnls.mattkv.net:
phix.no-ip.org:
pyro.no-ip.biz:
bnls.war-lords.net:
bnls.anubisdev.net:
knight.mattkv.net:

= Online       = Offline

Battle.net Server Status

Battle.net v1

uswest.battle.net:
exodus.battle.net:
useast.battle.net:
asia.battle.net:
europe.battle.net:
ustest.battle.net:
beta.battle.net:
classicbeta.battle.net:
demo.war3.battle.net:

Battle.net v2

us.logon.battle.net:
eu.logon.battle.net:
kr.logon.battle.net:
cn.logon.battle.net:
us.patch.battle.net:
eu.patch.battle.net:
kr.patch.battle.net:
cn.patch.battle.net:
public-test.logon.battle.net:
public-test.patch.battle.net:

emNet

cali.emwar.com:
dallas.emwar.com:
kc.emwar.com:
ny.emwar.com:

PvPGN

server.eurobattle.net:
rubattle.net:
sc.theabyss.ru:
wc3.theabyss.ru:
bnetd.fishbattle.net:

RBNETD

server.bnetdocs.org:

= Online       = Offline



Copyrights

Site scripts and design copyrights reserved to Don Cullen.
Contents copyrighted to Blizzard and their parent corporation, Vivendi.
Main credits for contents goes to Arta. View the rest of credits.
Demented Minds copyrights reserved to Don Cullen 2003-present.
Copyright infringements will be prosecuted to the fullest extent allowable by law.
Please view our legal disclaimer and terms of service.