Navigation

Console
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/Broodwar/Diablo II/Lord of Destruction (X-Sha-1)

C > S [0x50] SID_AUTH_INFO
S > C [0x25] SID_PING
S > C [0x50] SID_AUTH_INFO
C > S [0x25] SID_PING (Optional)
C > S [0x51] SID_AUTH_CHECK
S > C [0x51] SID_AUTH_CHECK
C > S [0x3A] SID_LOGONRESPONSE2
S > C [0x3A] SID_LOGONRESPONSE2
C > S [0x14] SID_UDPPINGRESPONSE (Optional)
C > S [0x0A] SID_ENTERCHAT
S > C [0x0A] SID_ENTERCHAT

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
S > C [0x06] SID_STARTVERSIONING
C > S [0x25] SID_PING (Optional)
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
C > S [0x29] SID_LOGONRESPONSE
S > C [0x29] SID_LOGONRESPONSE
C > S [0x0A] SID_ENTERCHAT
S > C [0x0A] SID_ENTERCHAT

Starcraft Shareware

C > S [0x05] SID_CLIENTID
C > S [0x06] SID_STARTVERSIONING
S > C [0x05] SID_CLIENTID
S > C [0x28] SID_LOGONCHALLENGE
S > C [0x25] SID_PING
S > C [0x06] SID_STARTVERSIONING
C > S [0x25] SID_PING (Optional)
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)
C > S [0x0A] SID_ENTERCHAT
S > C [0x0A] SID_ENTERCHAT

Starcraft: Japanese

C > S [0x05] SID_CLIENTID
C > S [0x06] SID_STARTVERSIONING
S > C [0x05] SID_CLIENTID
S > C [0x28] SID_LOGONCHALLENGE
S > C [0x25] SID_PING
S > C [0x06] SID_STARTVERSIONING
C > S [0x25] SID_PING (Optional)
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)
C > S [0x0A] SID_ENTERCHAT
S > C [0x0A] SID_ENTERCHAT

Diablo Shareware/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
S > C [0x06] SID_STARTVERSIONING
C > S [0x25] SID_PING (Optional)
C > S [0x07] SID_REPORTVERSION
S > C [0x07] SID_REPORTVERSION
C > S [0x29] SID_LOGONRESPONSE
S > C [0x29] SID_LOGONRESPONSE
C > S [0x0A] SID_ENTERCHAT
S > C [0x0A] SID_ENTERCHAT

Warcraft III

C > S [0x50] SID_AUTH_INFO
S > C [0x25] SID_PING
S > C [0x50] SID_AUTH_INFO
C > S [0x25] SID_PING (Optional)
C > S [0x51] SID_AUTH_CHECK
S > C [0x51] SID_AUTH_CHECK
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


User Comments


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

Unknown
Sep 13, 2007
10:33 AM

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

Kyro
Sep 13, 2007
09:11 PM

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
Nov 30, 2007
04:06 PM

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
06:19 AM

added the wc3 login sequence

Hdx
Mar 01, 2008
04:32 PM

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 29, 2008
06:29 PM

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 03, 2008
06:00 PM

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
10:31 AM

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
01: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
10:35 AM

@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
02: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.

BNLS Server Status
vps.clan-warp.net:
phix.no-ip.org:
bnls.mattkv.net:
knight.mattkv.net:
bnls.anubisdev.net:
pyro.no-ip.biz:
bnls.net:
jbls.clanbnu.net:

= Online       = Offline

Battle.net Server Status
uswest.battle.net:
useast.battle.net:
asia.battle.net:
europe.battle.net:

= Online       = Offline

Advertisements
Sponsor Us; Advertise here!



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.