bnet_protocol.h
上传用户:tany51
上传日期:2013-06-12
资源大小:1397k
文件大小:141k
- /*
- * Copyright (C) 1998 Mark Baysinger (mbaysing@ucsd.edu)
- * Copyright (C) 1998,1999,2000 Ross Combs (rocombs@cs.nmsu.edu)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
- #ifndef INCLUDED_BNET_PROTOCOL_TYPES
- #define INCLUDED_BNET_PROTOCOL_TYPES
- #ifdef JUST_NEED_TYPES
- # include "common/bn_type.h"
- #else
- # define JUST_NEED_TYPES
- # include "common/bn_type.h"
- # undef JUST_NEED_TYPES
- #endif
- /*
- * The "bnet" protocol (previously known as "normal") that is used for
- * chatting, ladder info, game listings, etc.
- * FIXME: put the #define's into the PROTO section
- */
- /******************************************************/
- typedef struct
- {
- bn_short type;
- bn_short size;
- } t_bnet_header PACKED_ATTR();
- /******************************************************/
- // [zap-zero] 20020529 - added support for war3 anongame routing packets
- /******************************************************/
- typedef struct
- {
- bn_short type;
- bn_short size;
- } t_w3route_header PACKED_ATTR();
- /******************************************************/
- /******************************************************/
- typedef struct
- {
- t_bnet_header h;
- } t_bnet_generic PACKED_ATTR();
- /******************************************************/
- /******************************************************/
- typedef struct
- {
- t_w3route_header h;
- } t_w3route_generic PACKED_ATTR();
- /******************************************************/
- /* for unhandled pmap packets */
- #define CLIENT_NULL 0xfeff
- /******************************************************/
- /*
- 14: recv class=w3route[0x0c] type=unknown[0x00f7] length=53
- 0000: F7 1E 35 00 02 02 00 00 68 BF 0B 08 00 E0 17 01 ..5.....h.......
- 0010: 00 00 00 42 6C 61 63 6B 72 61 74 00 08 81 3E 0C ...Blackrat...>.
- 0020: 00 20 00 00 00 02 00 17 E1 C0 A8 00 01 00 00 00 . ..............
- 0030: 00 00 00 00 00 .....
- */
- #define CLIENT_W3ROUTE_REQ 0x1ef7
- typedef struct
- {
- t_w3route_header h;
- bn_int unknown1;
- bn_int id; // unique id sent by server
- bn_byte unknown2;
- bn_short port;
- bn_int handle; // handle/descriptor for client <-> client communication
- // player name, ...
- } t_client_w3route_req PACKED_ATTR();
- /******************************************************/
- /******************************************************/
- /*
- f7 23 04 00
- */
- #define CLIENT_W3ROUTE_LOADINGDONE 0x23f7
- typedef struct
- {
- t_w3route_header h;
- } t_client_w3route_loadingdone PACKED_ATTR();
- /******************************************************/
- /******************************************************/
- /*
- f7 14 05 00 00
- */
- #define SERVER_W3ROUTE_READY 0x14f7
- typedef struct
- {
- t_w3route_header h;
- bn_byte unknown1;
- } t_server_w3route_ready PACKED_ATTR();
- /******************************************************/
- /******************************************************/
- /*
- f7 21 08 00 01 00 00 00
- */
- #define CLIENT_W3ROUTE_ABORT 0x21f7
- typedef struct
- {
- t_w3route_header h;
- bn_int unknown1; // count?
- } t_client_w3route_abort PACKED_ATTR();
-
- /******************************************************/
- /*
- f7 08 05 00 02
- */
- #define SERVER_W3ROUTE_LOADINGACK 0x08f7
- typedef struct
- {
- t_w3route_header h;
- bn_byte playernum;
- } t_server_w3route_loadingack PACKED_ATTR();
- /******************************************************/
- /******************************************************/
- /*
- f7 3b 06 00 09 00
- */
- #define CLIENT_W3ROUTE_CONNECTED 0x3bf7
- typedef struct
- {
- t_w3route_header h;
- bn_short unknown1;
- } t_client_w3route_connected PACKED_ATTR();
- /******************************************************/
- /******************************************************/
- /*
- f7 01 08 00 2e 85 2d 7b
- */
- #define SERVER_W3ROUTE_ECHOREQ 0x01f7
- typedef struct
- {
- t_w3route_header h;
- bn_int ticks;
- } t_server_w3route_echoreq PACKED_ATTR();
- /******************************************************/
- #define CLIENT_W3ROUTE_ECHOREPLY 0x46f7
- /******************************************************/
- /*
- 13: recv class=w3route[0x0c] type=unknown[0x2ef7] length=107
- 0000: F7 2E 6B 00 01 01 03 00 00 00 20 00 00 00 5C 01 ..k....... ....
- 0010: 00 00 00 05 00 00 00 00 00 00 00 00 00 00 00 1A ................
- 0020: 04 00 00 00 00 00 00 00 00 00 00 05 00 00 00 00 ................
- 0030: 00 00 00 01 00 00 00 00 00 00 00 05 00 00 00 00 ................
- 0040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
- 0050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
- 0060: 00 00 00 00 00 00 00 00 00 00 00 ...........
- */
- #define CLIENT_W3ROUTE_GAMERESULT 0x2ef7
- /*
- F7 3A-84 00 02 01 04 00 00 00
- 0x0040 20 00 00 00 83 09 00 00-00 00 00 00 02 03 00 00
- 0x0050 00 20 00 00 00 2C 01 00-00 00 00 00 00 5C 04 00
- 0x0060 00 00 03 00 00 00 00 00-00 00 01 00 00 00 CC 0B
- 0x0070 00 00 00 00 00 00 72 0B-00 00 0E 00 00 00 00 00
- 0x0080 00 00 04 00 00 00 01 00-00 00 15 00 00 00 00 00
- 0x0090 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
- 0x00A0 00 00 46 0A 00 00 2C 01-00 00 00 00 00 00 00 00
- 0x00B0 00 00 00 00 00 00 00 00-00 00
- F7 3A-84 00 02 02 03 00 00 00
- 0x0040 20 00 00 00 2C 01 00 00-00 00 00 00 01 04 00 00
- 0x0050 00 20 00 00 00 83 09 00-00 00 00 00 00 5C 04 00
- 0x0060 00 00 01 00 00 00 01 00-00 00 00 00 00 00 39 03
- 0x0070 00 00 00 00 00 00 00 00-00 00 05 00 00 00 00 00
- 0x0080 00 00 01 00 00 00 00 00-00 00 05 00 00 00 00 00
- 0x0090 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
- 0x00A0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
- 0x00B0 00 00 00 00 00 00 00 00-00 00
- */
- #define CLIENT_W3ROUTE_GAMERESULT_W3XP 0x3af7
- typedef struct
- {
- t_w3route_header h;
- bn_byte unknown1;
- bn_byte unknown2;
- bn_int result;
- // rest unknown
- } t_client_w3route_gameresult PACKED_ATTR();
- /******************************************************/
- // [zap-zero] what value is DRAW?
- #define W3_GAMERESULT_LOSS 0x00000003
- #define W3_GAMERESULT_WIN 0x00000004
- /******************************************************/
- /*
- f7 04 1e 00 07 00 00 b2 72 76 ..............rv
- 0040 ec cc cc 02 02 00 04 0b d9 e9 5f ac 00 00 00 00 .........._.....
- 0050 00 00 00 00 ....
- */
- #define SERVER_W3ROUTE_ACK 0x04f7
- typedef struct
- {
- t_w3route_header h;
- bn_byte unknown1; // 07
- bn_short unknown2; // 00 00
- bn_int unknown3; // random stuff
- bn_short unknown4; // cc cc
- bn_byte playernum; // 1-4
- bn_short unknown5; // 0x0002
- bn_short port; // client port
- bn_int ip; // client ip
- bn_int unknown7; // 00 00 00 00
- bn_int unknown8; // 00 00 00 00
- } t_server_w3route_ack PACKED_ATTR();
- /******************************************************/
- #define SERVER_W3ROUTE_ACK_UNKNOWN3 0x484e2637
- /******************************************************/
- /*
- f7 06 3b 00 01 00 00 00 01 ** ........;......P
- 0040 ** ** ** ** ** ** ** 00 08 2d 09 9d 04 08 00 00 layer00..-......
- 0050 00 02 00 17 e0 [censored] 00 00 00 00 00 00 00 .......g........
- 0060 00 02 00 17 e0 [censored] 00 00 00 00 00 00 00 .......g........
- 0070 00
- */
- #define SERVER_W3ROUTE_PLAYERINFO 0x06f7
- typedef struct
- {
- t_w3route_header h;
- bn_int handle;
- bn_byte playernum;
- // then:
- // opponent name
- // playerinfo2
- // playerinfo_addr (external addr)
- // playerinfo_addr (local lan addr)
- } t_server_w3route_playerinfo PACKED_ATTR();
- typedef struct
- {
- bn_byte unknown1; // 8 (length?)
- bn_int id; // id from FINDANONGAME_SEARCH packet
- bn_int race; // see defines
- } t_server_w3route_playerinfo2 PACKED_ATTR();
- #define SERVER_W3ROUTE_LEVELINFO 0x47f7
- typedef struct
- {
- t_w3route_header h;
- bn_byte numplayers;
- // then: levelinfo2 for each player
- } t_server_w3route_levelinfo PACKED_ATTR();
- typedef struct
- {
- bn_byte plnum;
- bn_byte unknown1; // 3 (length?)
- bn_byte level;
- bn_short unknown2;
- } t_server_w3route_levelinfo2 PACKED_ATTR();
- typedef struct
- {
- bn_short unknown1; // 2
- bn_short port;
- bn_int ip;
- bn_int unknown2; // 0
- bn_int unknown3; // 0
- } t_server_w3route_playerinfo_addr PACKED_ATTR();
- typedef struct
- {
- t_w3route_header h; // f7 0a 04 00
- } t_server_w3route_startgame1 PACKED_ATTR();
- #define SERVER_W3ROUTE_STARTGAME1 0x0af7
- typedef struct
- {
- t_w3route_header h; // f7 0b 04 00
- } t_server_w3route_startgame2 PACKED_ATTR();
- #define SERVER_W3ROUTE_STARTGAME2 0x0bf7
- /*******************************************************/
- /*
- ALL ANONGAME PACKET INFO (0x44ff) MOVED TO anongame_protocol.h
- [Omega]
- */
- /******************************************************/
- /*
- These two dumps are from the original unpatched Starcraft client:
- FF 05 28 00 01 00 00 00 ..(.....
- D1 43 88 AA DA 9D 1B 00 9A F7 69 AB 4A 41 32 30 .C........i.JA20
- 35 43 2D 30 34 00 6C 61 62 61 73 73 69 73 74 00 5C-04.labassist.
- FF 05 24 00 01 00 00 00 D1 43 88 AA DA 9D 1B 00 ..$......C......
- 9A F7 69 AB 42 4F 42 20 20 20 20 20 20 20 20 00 ..i.BOB .
- 42 6F 62 00 Bob.
- ??? note it sends NO host and user strings
- FF 05 14 00 01 00 00 00 D8 94 F6 07 B3 2C 6E 02 .............,n.
- B4 E0 3B 6C ..;l
- ??? sent right after it... request for session key?
- FF 28 08 00 F6 0F 08 00 .(......
- Diablo II 1.03 ... note it sends NO host and user strings
- FF 05 14 00 01 00 00 00 D1 43 88 AA DA 9D ...... ...C....
- 1B 00 9A F7 69 AB ....i.
- */
- #define CLIENT_COMPINFO1 0x05ff
- typedef struct
- {
- t_bnet_header h;
- bn_int reg_version; /* 01 00 00 00 */
- bn_int reg_auth; /* D1 43 88 AA */ /* looks like server ip */
- bn_int client_id; /* DA 9D 1B 00 */
- bn_int client_token; /* 9A F7 69 AB */
- /* host */ /* optional */
- /* user */ /* optional */
- } t_client_compinfo1 PACKED_ATTR();
- #define CLIENT_COMPINFO1_REG_VERSION 0x00000001
- #define CLIENT_COMPINFO1_REG_AUTH 0xaa8843d1
- #define CLIENT_COMPINFO1_CLIENT_ID 0x001b9dda
- #define CLIENT_COMPINFO1_CLIENT_TOKEN 0xab69f79a
- /******************************************************/
- /******************************************************/
- /*
- CLIENT_COMPINFO2 was first seen in Starcraft 1.05
- FF 1E 24 00 01 00 00 00 ..$.....
- 01 00 00 00 D1 43 88 AA 1C B9 48 00 31 8A F2 89 .....C....H.1...
- 43 4C 4F 55 44 00 63 6C 6F 75 64 00 CLOUD.cloud.
- FF 1E 28 00 01 00 00 00 01 00 00 00 D1 43 88 AA ..(..........C..
- DA 9D 1B 00 9A F7 69 AB 42 4F 42 20 20 20 20 20 ......i.BOB
- 20 20 20 00 42 6F 62 00 .Bob.
- Diablo II 1.03 ... note it sends empty host and user strings
- FF 1E 1A 00 01 00 00 00 01 00 00 00 D1 43 ............C
- 88 AA DA 9D 1B 00 9A F7 69 AB 00 00 .......i...
- */
- #define CLIENT_COMPINFO2 0x1eff
- typedef struct
- {
- t_bnet_header h;
- bn_int unknown1; /* 01 00 00 00 */ /* ??? Version */
- bn_int reg_version; /* 01 00 00 00 */
- bn_int reg_auth; /* D1 43 88 AA */ /* looks like server ip */
- bn_int client_id; /* 1C B9 48 00 */ /* DA 9D 1B 00 */
- bn_int client_token; /* 31 8A f2 89 */ /* 9A F7 69 AB */
- /* host */
- /* user */
- } t_client_compinfo2 PACKED_ATTR();
- #define CLIENT_COMPINFO2_UNKNOWN1 0x00000001
- #define CLIENT_COMPINFO2_REG_VERSION 0x00000001
- #define CLIENT_COMPINFO2_REG_AUTH 0xaa8843d1
- #define CLIENT_COMPINFO2_CLIENT_ID 0x001b9dda
- #define CLIENT_COMPINFO2_CLIENT_TOKEN 0xab69f79a
- /******************************************************/
- /******************************************************/
- /*
- Sent in response to CLIENT_COMPINFO[12] along with sessionkey
- FF 05 14 00 01 00 00 00 ........
- D1 43 88 AA 1C B9 48 00 31 8A F2 89 .C....H.1...
- FF 05 14 00 01 00 00 00 D8 94 F6 07 3F 62 6E 02 ............?bn.
- CA A4 0D 99 ....
- FF 05 14 00 01 00 00 00 D8 94 F6 07 B3 2C 6E 02 .............,n.
- B4 E0 3B 6C ..;l
- To D2 Beta 1.02:
- FF 05 14 00 01 00 00 00 D1 43 88 AA 42 8D 2E 02 .........C..B...
- 2B 81 8C 2B +..+
- */
- #define SERVER_COMPREPLY 0x05ff
- typedef struct
- {
- t_bnet_header h;
- bn_int reg_version; /* 01 00 00 00 */
- bn_int reg_auth; /* D1 43 88 AA */ /* looks like server ip */
- bn_int client_id; /* DA 9D 1B 00 */ /* 1C B9 48 00 */
- bn_int client_token; /* 9A F7 69 AB */ /* 31 8A F2 89 */
- } t_server_compreply PACKED_ATTR();
- #define SERVER_COMPREPLY_REG_VERSION 0x00000001
- #define SERVER_COMPREPLY_REG_AUTH 0xaa8843d1
- #define SERVER_COMPREPLY_CLIENT_ID 0x001b9dda
- #define SERVER_COMPREPLY_CLIENT_TOKEN 0xab69f79a
- /******************************************************/
- /******************************************************/
- /*
- Sent in repsonse to COMPINFO1 along with COMPINFOREPLY.
- Used for password hashing by the client.
- */
- #define SERVER_SESSIONKEY1 0x28ff
- typedef struct
- {
- t_bnet_header h;
- bn_int sessionkey;
- } t_server_sessionkey1 PACKED_ATTR();
- /******************************************************/
- /******************************************************/
- /*
- Sent in response to COMPINFO2 along with COMPINFOREPLY.
- Used for password hashing by the client.
- FF 1D 0C 00 40 24 02 00 ....@$..
- 99 F3 FD 78 ...x
- FF 1D 0C 00 0C 67 08 00 7A 3C D8 75 .....g..z<.u
- FF 1D 0C 00 58 77 00 00 27 45 44 7A ....Xw..'EDz
- FF 1D 0C 00 9D DF 01 00 7A 11 07 ED ........z...
- */
- #define SERVER_SESSIONKEY2 0x1dff
- typedef struct
- {
- t_bnet_header h;
- bn_int sessionnum;
- bn_int sessionkey;
- } t_server_sessionkey2 PACKED_ATTR();
- #define SERVER_SESSIONKEY2_UNKNOWN1 0x00004df3
- /******************************************************/
- /******************************************************/
- /*
- FF 12 3C 00 E0 28 02 E4 0A 37 BE 01 E0 50 A3 37 ..<..(...7...P.7
- D0 36 BE 01 A4 01 00 00 09 04 00 00 09 04 00 00 .6..............
- 09 04 00 00 65 6E 75 00 31 00 55 53 41 00 55 6E ....enu.1.USA.Un
- 69 74 65 64 20 53 74 61 74 65 73 00 ited States.
- still original client, but at a later date
- FF 12 3C 00 60 C5 4B 8B 19 DE BE 01 60 55 B1 40 ..<.`.K.....`U.@
- E7 DD BE 01 A4 01 00 00 09 04 00 00 09 04 00 00 ................
- 09 04 00 00 65 6E 75 00 31 00 55 53 41 00 55 6E ....enu.1.USA.Un
- 69 74 65 64 20 53 74 61 74 65 73 00 ited States.
- FF 12 3C 00 60 EA 02 23 F5 DE BE 01 60 7A 68 D8 ..<.`..#....`zh.
- C2 DE BE 01 A4 01 00 00 09 04 00 00 09 04 00 00 ................
- 09 04 00 00 65 6E 75 00 31 00 55 53 41 00 55 6E ....enu.1.USA.Un
- 69 74 65 64 20 53 74 61 74 65 73 00 ited States.
- FF 12 35 00 ..5.
- 20 BA B0 55 F2 7B BE 01 20 62 98 C5 3D 7C BE 01 ..U.{.. b..=|..
- E4 FD FF FF 12 04 00 00 12 04 00 00 12 04 00 00 ................
- 6B 6F 72 00 38 32 00 4B 4F 52 00 4B 6F 72 65 61 kor.82.KOR.Korea
- 00 .
- FF 12 37 00 E0 D4 72 97 2F 8C BF 01 E0 3C 37 F9 ..7...r./....<7.
- 37 8C BF 01 C4 FF FF FF 07 04 00 00 07 04 00 00 7...............
- 07 04 00 00 64 65 75 00 34 39 00 44 45 55 00 47 ....deu.49.DEU.G
- 65 72 6D 61 6E 79 00 ermany.
- FF 12 36 00 20 F3 31 08 40 A7 BF 01 20 C3 BA CB ..6. .1.@... ...
- 50 A7 BF 01 C4 FF FF FF 1D 04 00 00 1D 04 00 00 P...............
- 1D 04 00 00 73 76 65 00 34 36 00 53 57 45 00 53 ....sve.46.SWE.S
- 77 65 64 65 6E 00 weden.
- Diablo II 1.03
- FF 12 39 00 A0 DB AA 45 51 3F C0 01 A0 EB ..9....EQ?....
- 56 17 A5 3F C0 01 A8 FD FF FF 09 0C 00 00 09 0C V..?............
- 00 00 09 0C 00 00 65 6E 61 00 36 31 00 41 55 53 ......ena.61.AUS
- 00 41 75 73 74 72 61 6C 69 61 00 .Australia.
- */
- #define CLIENT_COUNTRYINFO1 0x12ff
- typedef struct
- {
- t_bnet_header h;
- bn_long systemtime; /* GMT */
- bn_long localtime; /* time in local timezone */
- bn_int bias; /* (gmt-local)/60 (using signed math) */
- bn_int langid1; /* 09 04 00 00 */ /* 12 04 00 00 */
- bn_int langid2; /* 09 04 00 00 */ /* 12 04 00 00 */
- bn_int langid3; /* 09 04 00 00 */ /* 12 04 00 00 */
- /* langstr */
- /* countrycode (long distance phone) */
- /* countryabbrev */
- /* countryname */
- } t_client_countryinfo1 PACKED_ATTR();
- /******************************************************/
- /******************************************************/
- /*
- First seen in Diablo II (and LoD) 1.09
- FF 50 34 00 00 00 00 00 36 38 58 49 50 58 32 44 .P4.....68XIPX2D
- 09 00 00 00 00 00 00 00 00 00 00 00 C4 FF FF FF ................
- 07 04 00 00 07 04 00 00 44 45 55 00 47 65 72 6D ........DEU.Germ
- 61 6E 79 00 any.
- FF 50 47 00 00 00 00 00 36 38 58 49 56 44 32 44 .PG.....68XIVD2D
- 09 00 00 00 00 00 00 00 00 00 00 00 20 FE FF FF ............ ...
- 04 08 00 00 04 08 00 00 43 48 4E 00 50 65 6F 70 ........CHN.Peop
- 6C 65 27 73 20 52 65 70 75 62 6C 69 63 20 6F 66 le's Republic of
- 20 43 68 69 6E 61 00 China.
- */
- #define CLIENT_COUNTRYINFO_109 0x50ff
- typedef struct
- {
- t_bnet_header h;
- bn_int protocol; /* 00 00 00 00 always zero */
- bn_int archtag;
- bn_int clienttag;
- bn_int versionid; /* 09 00 00 00 */ /* FIXME: what is this? */
- bn_int gamelang; /* 00 00 00 00 always zero */
- bn_int localip; /* 00 00 00 00 always zero */
- bn_int bias; /* (gmt-local)/60 (using signed math) */
- bn_int lcid; /* Win32 LCID */
- bn_int langid; /* Win32 LangID */
- /* langstr */
- /* countryname */
- } t_client_countryinfo_109 PACKED_ATTR();
- /******************************************************/
- /******************************************************/
- /*
- FF 2A 20 00 91 4F 93 DF 57 74 B5 C8 48 0F 4D 9B .* ..O..Wt..H.M.
- A2 28 A6 03 C1 D9 DA 11 42 69 6D 42 6F 3A 29 00 .(......BimBo:).
- */
- #define CLIENT_CREATEACCTREQ1 0x2aff
- typedef struct
- {
- t_bnet_header h;
- bn_int password_hash1[5]; /* hash of lowercase password w/o null */
- /* player name */
- } t_client_createacctreq1 PACKED_ATTR();
- /******************************************************/
- /******************************************************/
- /*
- FF 2A 18 00 01 00 00 00 .*......
- 13 00 00 00 78 52 82 02 00 00 00 00 00 00 00 00 ................
- ---120 82 130 2---
- FF 2A 08 00 01 00 00 00 .*......
- */
- #define SERVER_CREATEACCTREPLY1 0x2aff
- typedef struct
- {
- t_bnet_header h;
- bn_int result;
- } t_server_createacctreply1 PACKED_ATTR();
- #define SERVER_CREATEACCTREPLY1_RESULT_OK 0x00000001
- #define SERVER_CREATEACCTREPLY1_RESULT_NO 0x00000000
- /******************************************************/
- /******************************************************/
- /*
- FF 2B 20 00 01 00 00 00 .+ .....
- 00 00 00 00 4D 00 00 00 0E 01 00 00 20 00 00 00 ....M....... ...
- CE 01 00 00 DD 07 00 00 ........
- FF 2B 20 00 01 00 00 00 00 00 00 00 06 00 00 .+ ............
- 00 72 01 00 00 40 00 00 00 A9 07 00 00 FF 07 00 .r...@..........
- 00 .
- from Starcraft 1.05
- FF 2B 20 00 01 00 00 00 00 00 00 00 06 00 00 00 .+ .............
- 7C 01 00 00 20 00 00 00 00 02 00 00 FF 07 00 00 |... ...........
- */
- #define CLIENT_UNKNOWN_2B 0x2bff /* FIXME: what is this? */
- typedef struct
- {
- t_bnet_header h;
- bn_int unknown1; /* 01 00 00 00 */ /* 01 00 00 00 */
- bn_int unknown2; /* 00 00 00 00 */ /* 00 00 00 00 */
- bn_int unknown3; /* 4D 00 00 00 */ /* 06 00 00 00 */
- bn_int unknown4; /* 0E 01 00 00 */ /* 72 01 00 00 */
- bn_int unknown5; /* 20 00 00 00 */ /* 40 00 00 00 */
- bn_int unknown6; /* CE 01 00 00 */ /* A9 07 00 00 */
- bn_int unknown7; /* DD 07 00 00 */ /* FF 07 00 00 */
- } t_client_unknown_2b PACKED_ATTR();
- #define CLIENT_UNKNOWN_2B_UNKNOWN1 0x00000001
- #define CLIENT_UNKNOWN_2B_UNKNOWN2 0x00000000
- #define CLIENT_UNKNOWN_2B_UNKNOWN3 0x0000004d
- #define CLIENT_UNKNOWN_2B_UNKNOWN4 0x0000010e
- #define CLIENT_UNKNOWN_2B_UNKNOWN5 0x00000020
- #define CLIENT_UNKNOWN_2B_UNKNOWN6 0x000001ce
- #define CLIENT_UNKNOWN_2B_UNKNOWN7 0x000007dd
- /******************************************************/
- /******************************************************/
- /*
- later replaced by progident2 and the authreq packets
- FF 06 14 00 36 38 58 49 ....68XI
- 50 58 45 53 BB 00 00 00 00 00 00 00 PXES........
- sent by 1.05 Starcraft
- FF 06 14 00 36 38 58 49 52 41 54 53 BD 00 00 00 ....68XIRATS....
- 00 00 00 00 ....
- Diablo II 1.03
- FF 06 14 00 36 38 58 49 56 44 32 44 03 00 ....68XIVD2D..
- 00 00 00 00 00 00 ......
- */
- #define CLIENT_PROGIDENT 0x06ff
- typedef struct
- {
- t_bnet_header h;
- bn_int archtag;
- bn_int clienttag; /* see tag.h */
- bn_int versionid; /* FIXME: how does the versionid work? */
- bn_int unknown1; /* FIXME: always zero? spawn flag? */
- } t_client_progident PACKED_ATTR();
- /******************************************************/
- /******************************************************/
- /*
- These formulas are for authenticating the client version.
- FF 06 5A 00 00 86 BA E3 ..Z.....
- 09 28 BC 01 49 58 38 36 76 65 72 32 2E 6D 70 71 .(..IX86ver2.mpq
- 00 41 3D 32 30 31 39 34 39 38 38 39 39 20 42 3D .A=2019498899 B=
- 33 34 32 33 32 39 32 33 39 34 20 43 3D 31 37 31 3423292394 C=171
- 39 30 31 31 32 32 32 20 34 20 41 3D 41 5E 53 20 9011222 4 A=A^S
- 42 3D 42 2D 43 20 43 3D 43 5E 41 20 41 3D 41 5E B=B-C C=C^A A=A^
- 42 00 B.
- FF 06 59 00 00 C1 12 EC 09 28 BC 01 49 58 38 36 ..Y......(..IX86
- 76 65 72 35 2E 6D 70 71 00 41 3D 31 38 37 35 35 ver5.mpq.A=18755
- 39 31 33 34 31 20 42 3D 32 34 39 31 30 39 39 38 91341 B=24910998
- 30 39 20 43 3D 36 33 34 38 35 36 36 30 34 20 34 09 C=634856604 4
- 20 41 3D 41 2D 53 20 42 3D 42 5E 43 20 43 3D 43 A=A-S B=B^C C=C
- 2B 41 20 41 3D 41 5E 42 00 +A A=A^B.
- FF 06 5A 00 00 C1 12 EC 09 28 BC 01 49 58 38 36 ..Z......(..IX86
- 76 65 72 35 2E 6D 70 71 00 41 3D 31 37 31 32 39 ver5.mpq.A=17129
- 34 38 34 32 36 20 42 3D 33 36 30 30 30 33 30 36 48426 B=36000306
- 30 37 20 43 3D 33 33 39 30 34 31 37 39 35 39 20 07 C=3390417959
- 34 20 41 3D 41 2D 53 20 42 3D 42 5E 43 20 43 3D 4 A=A-S B=B^C C=
- 43 2D 41 20 41 3D 41 2D 42 00 C-A A=A-B.
- FF 06 5A 00 00 3A 7F E8 09 28 BC 01 49 58 38 36 ..Z..:...(..IX86
- 76 65 72 34 2E 6D 70 71 00 41 3D 31 31 38 36 39 ver4.mpq.A=11869
- 35 38 31 34 31 20 42 3D 31 33 37 37 34 34 31 34 58141 B=13774414
- 35 37 20 43 3D 31 37 37 32 37 38 37 37 30 35 20 57 C=1772787705
- 34 20 41 3D 41 5E 53 20 42 3D 42 5E 43 20 43 3D 4 A=A^S B=B^C C=
- 43 2B 41 20 41 3D 41 5E 42 00 C+A A=A^B.
- FF 06 5A 00 00 56 CD F6 09 28 BC 01 49 58 38 36 ..Z..V...(..IX86
- 76 65 72 37 2E 6D 70 71 00 41 3D 31 30 32 36 30 ver7.mpq.A=10260
- 34 34 33 35 34 20 42 3D 34 31 33 32 36 33 30 37 44354 B=41326307
- 31 31 20 43 3D 32 33 30 32 34 31 31 33 32 38 20 11 C=2302411328
- 34 20 41 3D 41 5E 53 20 42 3D 42 5E 43 20 43 3D 4 A=A^S B=B^C C=
- 43 5E 41 20 41 3D 41 2B 42 00 C^A A=A+B.
- */
- #define SERVER_AUTHREQ1 0x06ff
- typedef struct
- {
- t_bnet_header h;
- bn_long timestamp; /* FIXME: file modification time? */
- /* versioncheck filename */
- /* equation */
- } t_server_authreq1 PACKED_ATTR();
- /******************************************************/
- /******************************************************/
- /*
- First seen in Diablo II (and LoD) 1.09
- FF 50 65 00 00 00 00 00 36 1A 6C 45 76 BC 00 00 .Pe.....6.lEv...
- 00 48 A6 EF 09 28 BC 01 49 58 38 36 76 65 72 36 .H...(..IX86ver6
- 2E 6D 70 71 00 41 3D 33 38 34 35 35 38 31 36 33 .mpq.A=384558163
- 34 20 42 3D 38 38 30 38 32 33 35 38 30 20 43 3D 4 B=880823580 C=
- 31 33 36 33 39 33 37 31 30 33 20 34 20 41 3D 41 1363937103 4 A=A
- 2D 53 20 42 3D 42 2D 43 20 43 3D 43 2D 41 20 41 -S B=B-C C=C-A A
- 3D 41 2D 42 00 =A-B.
- FF 50 65 00 00 00 00 00 .Pe.....
- 30 4B C1 33 10 EB 09 00 00 A5 C4 DD 09 28 BC 01 0K.3.........(..
- 49 58 38 36 76 65 72 30 2E 6D 70 71 00 41 3D 31 IX86ver0.mpq.A=1
- 34 33 32 36 36 32 34 37 38 20 42 3D 36 35 32 32 432662478 B=6522
- 37 38 36 32 35 20 43 3D 31 37 36 31 35 31 35 38 78625 C=17615158
- 36 39 20 34 20 41 3D 41 5E 53 20 42 3D 42 2B 43 69 4 A=A^S B=B+C
- 20 43 3D 43 2B 41 20 41 3D 41 5E 42 00 C=C+A A=A^B.
- */
- #define SERVER_AUTHREQ_109 0x50ff
- typedef struct
- {
- t_bnet_header h;
- bn_int logontype; /* 00 00 00 00 always zero */
- bn_int sessionkey;
- bn_int sessionnum;
- bn_long timestamp;
- /* versioncheck filename */
- /* equation */
- } t_server_authreq_109 PACKED_ATTR();
- #define SERVER_AUTHREQ_109_LOGONTYPE 0x0000000
- #define SERVER_AUTHREQ_109_LOGONTYPE_W3 0x00000001
- #define SERVER_AUTHREQ_109_LOGONTYPE_W3XP 0x00000002
- /******************************************************/
- /* ADDED BY UNDYING SOULZZ 4/3/02 */
- #define VERSIONTAG_WARCRAFT3_113 "WAR3_113"
- /******************************************************/
- /*
- FF 07 40 00 36 38 58 49 52 41 54 53 BD 00 00 00 ..@.68XIRATS....
- 00 05 00 01 1E 88 D7 08 73 74 61 72 63 72 61 66 ........starcraf
- 74 2E 65 78 65 20 30 33 2F 30 38 2F 39 39 20 32 t.exe 03/08/99 2
- 32 3A 34 31 3A 35 30 20 31 30 34 32 34 33 32 00 2:41:50 1042432.
- sent by the 1.05 Starcraft
- FF 07 40 00 36 38 58 49 52 41 54 53 BD 00 00 00 ..@.68XIRATS....
- 00 05 00 01 AE AC DE 87 73 74 61 72 63 72 61 66 ........starcraf
- 74 2E 65 78 65 20 30 33 2F 30 38 2F 39 39 20 32 t.exe 03/08/99 2
- 32 3A 34 31 3A 35 30 20 31 30 34 32 34 33 32 00 2:41:50 1042432.
- sent by the 1.08alpha Brood War (Starcraft game) in response to
- A=2521522835 B=3428392135 C=218673704 4 A=A^S B=B-C C=C+A A=A-B
- with IX86ver1.mpq
- FF 07 40 00 36 38 58 49 52 41 54 53 C3 00 00 00 ..@.68XIRATS....
- 01 08 00 01 A1 52 CE FE 73 74 61 72 63 72 61 66 .....R..starcraf
- 74 2E 65 78 65 20 31 32 2F 32 38 2F 30 30 20 31 t.exe 12/28/00 1
- 31 3A 32 38 3A 35 32 20 31 30 38 32 33 36 38 00 1:28:52 1082368.
- sent by the 1.07 Diablo
- FF 07 3C 00 36 38 58 49 4C 54 52 44 26 00 00 00 ..<.68XILTRD&...
- 01 06 05 62 8C 56 E6 21 64 69 61 62 6C 6F 2E 65 ...b.V.!diablo.e
- 78 65 20 30 39 2F 31 37 2F 39 38 20 31 38 3A 30 xe 09/17/98 18:0
- 30 3A 34 30 20 37 36 30 33 32 30 00 0:40 760320.
- FF 07 45 00 36 38 58 49 4E 42 32 57 4B 00 00 00 ..E.68XINB2WK...
- 99 00 00 02 3D 51 C4 AA 57 61 72 63 72 61 66 74 ....=Q..Warcraft
- 20 49 49 20 42 4E 45 2E 65 78 65 20 31 30 2F 31 II BNE.exe 10/1
- 35 2F 39 39 20 30 30 3A 33 37 3A 35 34 20 37 30 5/99 00:37:54 70
- 34 35 31 32 00 4512.
- sent by the 1.03 Diablo II
- FF 07 3A 00 36 38 58 49 ..:.68XI
- 56 44 32 44 03 00 00 00 00 03 00 01 47 3E 26 73 VD2D........G>&s
- 47 61 6D 65 2E 65 78 65 20 30 38 2F 30 35 2F 30 Game.exe 08/05/0
- 30 20 30 31 3A 34 32 3A 32 38 20 32 39 34 39 31 0 01:42:28 29491
- 32 00 2.
- */
- #define CLIENT_AUTHREQ1 0x07ff
- typedef struct
- {
- t_bnet_header h;
- bn_int archtag;
- bn_int clienttag;
- bn_int versionid;
- bn_int gameversion;
- bn_int checksum;
- /* executable info */
- } t_client_authreq1 PACKED_ATTR();
- /******************************************************/
- /******************************************************/
- /*
- FF 07 0A 00 02 00 00 00 ........
- 00 00 ..
- FF 07 0A 00 02 00 00 00 00 00 ..........
- */
- #define SERVER_AUTHREPLY1 0x07ff
- typedef struct
- {
- t_bnet_header h;
- bn_int message;
- /* filename */
- /* unknown */
- } t_server_authreply1 PACKED_ATTR();
- #define SERVER_AUTHREPLY1_MESSAGE_BADVERSION 0x00000000
- #define SERVER_AUTHREPLY1_MESSAGE_UPDATE 0x00000001 /* initiate auto-update */
- #define SERVER_AUTHREPLY1_MESSAGE_OK 0x00000002
- /* anything other than these is considered to be ok */
- /* Hmm... Blizzard messed up and changed the meanings of the flags in LoD 108.
- * they seem to be moving to "zero is success" so they can have multiple error
- * messages. 109 fixes it because they introduced new packets to replace
- * these. */
- #define SERVER_AUTHREPLY1_D2XP_MESSAGE_OK 0x00000001
- #define SERVER_AUTHREPLY1_D2XP_MESSAGE_BADVERSION 0x00000000 /* Battle.net is unable to properly identify you application version. */
- #define SERVER_AUTHREPLY1_D2XP_MESSAGE_UPDATE 0x00000000 /* FIXME: there doesn't seem to be an update reply... should we send a different packet or should we be appending a string to this reply or .... */
- #define SERVER_AUTHREPLY1_D2XP_MESSAGE_BADKEY 0x00000002 /* This application was installed with a CD key which is not authorized Battle.net use. */
- /* anything 3 and higher seems to be considered the same as BADVERSION */
- /******************************************************/
- /******************************************************/
- /*
- First seen in Diablo II (and LoD) 1.09
- FF 51 09 00 00 00 00 00 00 .Q.......
- */
- #define SERVER_AUTHREPLY_109 0x51ff
- typedef struct
- {
- t_bnet_header h;
- bn_int message;
- /* message string? */
- } t_server_authreply_109 PACKED_ATTR();
- #define SERVER_AUTHREPLY_109_MESSAGE_OK 0x00000000
- #define SERVER_AUTHREPLY_109_MESSAGE_UPDATE 0x00000100
- #define SERVER_AUTHREPLY_109_MESSAGE_BADVERSION 0x00000101
- /* we should check the first 10 values or so to see what they mean */
- /******************************************************/
- /******************************************************/
- /*
- First seen in Diablo II (and LoD) 1.09
- FF 51 67 00 C9 88 DA 42 00 09 00 01 46 97 62 9A .Qg....B....F.b.
- 01 00 00 00 00 00 00 00 10 00 00 00 06 00 00 00 ................
- A5 E7 39 00 00 00 00 00 ED CD 4F F7 6A 7A 4F 96 ..9.......O.jzO.
- 85 7A 2D A2 7F 1F B1 D6 81 B3 8D 50 47 61 6D 65 .z-........PGame
- 2E 65 78 65 20 30 38 2F 31 36 2F 30 31 20 32 33 .exe 08/16/01 23
- 3A 30 34 3A 34 30 20 34 32 34 30 36 37 00 74 73 :04:40 424067.ts
- 69 6E 67 68 75 61 00 inghua.
- */
- #define CLIENT_AUTHREQ_109 0x51ff
- typedef struct
- {
- t_bnet_header h;
- bn_int ticks;
- bn_int gameversion;
- bn_int checksum;
- bn_int cdkey_number; /* count of cdkeys, d2 = 1, lod = 2 */
- bn_int u1; /* 00 00 00 00 */
- /* cdkey info(s) */
- /* executable info */
- /* cdkey owner */
- } t_client_authreq_109 PACKED_ATTR();
- /* values are the same as in CLIENT_AUTHREQ1 */
- typedef struct
- {
- bn_int len;
- bn_int type;
- bn_int checksum;
- bn_int u1;
- bn_int hash[5];
- } t_cdkey_info PACKED_ATTR();
- /******************************************************/
- /******************************************************/
- /* Batle.net used to send requests for registry and email info.
- Thanks to bnetanon, I have a dump of these old packets.
- */
- /*
- FF 18 41 00 00 00 00 00 01 00 00 80 53 6F 66 74 ..A.........Soft
- 77 61 72 65 5C 4D 69 63 72 6F 73 6F 66 74 5C 4D wareMicrosoftM
- 53 20 53 65 74 75 70 20 28 41 43 4D 45 29 5C 55 S Setup (ACME)U
- 73 65 72 20 49 6E 66 6F 00 44 65 66 4E 61 6D 65 ser Info.DefName
- 00 .
- FF 18 48 00 00 00 00 00 01 00 00 80 53 6F 66 74 ..H.........Soft
- 77 61 72 65 5C 4D 69 63 72 6F 73 6F 66 74 5C 4D wareMicrosoftM
- 65 64 69 61 50 6C 61 79 65 72 5C 43 6F 6E 74 72 ediaPlayerContr
- 6F 6C 5C 50 6C 61 79 42 61 72 00 43 6C 72 42 61 olPlayBar.ClrBa
- 63 6B 43 6F 6C 6F 72 00 ckColor.
- */
- #define SERVER_REGSNOOPREQ 0x18ff
- typedef struct
- {
- t_bnet_header h;
- bn_int unknown1; /* 00 00 00 00 */ /* sequence match like in other packets? */
- bn_int hkey;
- /* registry key */
- /* value name */
- } t_server_regsnoopreq PACKED_ATTR();
- #define SERVER_REGSNOOPREQ_UNKNOWN1 0x00000000
- #define SERVER_REGSNOOPREQ_HKEY_CLASSES_ROOT 0x80000000
- #define SERVER_REGSNOOPREQ_HKEY_CURRENT_USER 0x80000001
- #define SERVER_REGSNOOPREQ_HKEY_LOCAL_MACHINE 0x80000002
- #define SERVER_REGSNOOPREQ_HKEY_USERS 0x80000003
- #define SERVER_REGSNOOPREQ_HKEY_PERFORMANCE_DATA 0x80000004
- #define SERVER_REGSNOOPREQ_HKEY_CURRENT_CONFIG 0x80000005
- #define SERVER_REGSNOOPREQ_HKEY_DYN_DATA 0x80000006
- #define SERVER_REGSNOOPREQ_HKEY_PERFORMANCE_TEXT 0x80000050
- #define SERVER_REGSNOOPREQ_HKEY_PERFORMANCE_NLSTEXT 0x80000060
- #define SERVER_REGSNOOPREQ_REGKEY "Software\Microsoft\MS Setup (ACME)\User Info"
- #define SERVER_REGSNOOPREQ_REGVALNAME "DefName"
- /******************************************************/
- /******************************************************/
- /* If the key exists, the client send this back */
- /*
- FF 18 0C 00 00 00 00 00 42 6F 62 00 ........Bob.
- FF 18 0C 00 00 00 00 00 A0 9C A0 00 ............
- */
- #define CLIENT_REGSNOOPREPLY 0x18ff
- typedef struct
- {
- t_bnet_header h;
- bn_int unknown1; /* 00 00 00 00 */ /* same as request? */
- /* registry value (string, dword, or binary */
- } t_client_regsnoopreply PACKED_ATTR();
- /******************************************************/
- /******************************************************/
- /*
- FF 07 0A 00 02 00 00 00 00 00 ..........
- */
- #define CLIENT_ICONREQ 0x2dff
- typedef struct
- {
- t_bnet_header h;
- } t_client_iconreq PACKED_ATTR();
- /******************************************************/
- /******************************************************/
- /*
- FF 2D 16 00 76 34 1F 8F .-..v4..
- C0 D6 BD 01 69 63 6F 6E 73 2E 62 6E 69 00 ....icons.bni.
- FF 2D 16 00 00 77 D0 01 C7 B1 BE 01 69 63 6F 6E .-...w......icon
- 73 2E 62 6E 69 00 s.bni.
- */
- #define SERVER_ICONREPLY 0x2dff
- typedef struct
- {
- t_bnet_header h;
- bn_long timestamp; /* file modification time? */
- /* filename */
- } t_server_iconreply PACKED_ATTR();
- /******************************************************/
- /******************************************************/
- #define CLIENT_LADDERSEARCHREQ 0x2fff
- typedef struct
- {
- t_bnet_header h;
- bn_int clienttag;
- bn_int id; /* (AKA ladder type) 1==standard, 3==ironman */
- bn_int type; /* (AKA ladder sort) */
- /* player name */
- } t_client_laddersearchreq PACKED_ATTR();
- #define CLIENT_LADDERSEARCHREQ_ID_STANDARD 0x00000001
- #define CLIENT_LADDERSEARCHREQ_ID_IRONMAN 0x00000003
- #define CLIENT_LADDERSEARCHREQ_TYPE_HIGHESTRATED 0x00000000
- #define CLIENT_LADDERSEARCHREQ_TYPE_MOSTWINS 0x00000002
- #define CLIENT_LADDERSEARCHREQ_TYPE_MOSTGAMES 0x00000003
- /******************************************************/
- /******************************************************/
- #define SERVER_LADDERSEARCHREPLY 0x2fff
- typedef struct /* FIXME: how does client know how many names?
- do we send separate replies for each name in the request? */
- {
- t_bnet_header h;
- bn_int rank; /* 0 means 1st, etc */
- } t_server_laddersearchreply PACKED_ATTR();
- #define SERVER_LADDERSEARCHREPLY_RANK_NONE 0xffffffff
- /******************************************************/
- /******************************************************/
- /*
- FF 30 1C 00 00 00 00 00 .0......
- 32 37 34 34 37 37 32 39 31 34 38 32 38 00 63 6C 2744772914828.cl
- 6F 75 64 00 oud.
- */
- #define CLIENT_CDKEY 0x30ff
- typedef struct
- {
- t_bnet_header h;
- bn_int spawn; /* FIXME: not sure if this is correct, but cdkey2 does it this way */
- /* cd key */
- /* owner name */ /* Was this always here? */
- } t_client_cdkey PACKED_ATTR();
- #define CLIENT_CDKEY_UNKNOWN1 0x00000000
- /******************************************************/
- /******************************************************/
- /*
- FF 30 0E 00 01 00 00 00 .0......
- 63 6C 6F 75 64 00 cloud.
- */
- #define SERVER_CDKEYREPLY 0x30ff
- typedef struct
- {
- t_bnet_header h;
- bn_int message;
- /* owner name */
- } t_server_cdkeyreply PACKED_ATTR();
- #define SERVER_CDKEYREPLY_MESSAGE_OK 0x00000001
- #define SERVER_CDKEYREPLY_MESSAGE_BAD 0x00000002
- #define SERVER_CDKEYREPLY_MESSAGE_WRONGAPP 0x00000003
- #define SERVER_CDKEYREPLY_MESSAGE_ERROR 0x00000004 /* disabled */
- #define SERVER_CDKEYREPLY_MESSAGE_INUSE 0x00000005
- /* (any other value seems to correspond to ok) */
- /******************************************************/
- /******************************************************/
- /*
- FF 36 34 00 00 00 00 00 0D 00 00 00 01 00 00 00 .64.............
- B5 AE 23 00 50 E5 D5 C0 DB 55 1E 38 0A F5 58 B9 ..#.P....U.8..X.
- 47 64 C6 C2 9F BB FF B8 81 E7 EB EC 1B 13 C6 38 Gd.............8
- 52 6F 62 00 Rob.
- FF 36 34 00 00 00 00 00 0D 00 00 00 01 00 00 00 .64.............
- 7F D7 00 00 90 64 77 2F D7 5B 42 38 1F A1 A2 6F .....dw/.[B8...o
- E8 FA BE F8 B6 0B BA 0F CA 64 3A 17 14 56 83 AB .........d:..V..
- 42 6F 62 00 Bob.
- FF 36 35 00 00 00 00 00 10 00 00 00 04 00 00 00 .65.............
- 0D 43 03 00 7A 11 07 ED 7C 9E 1E 38 E5 87 8B 3B .C..z...|..8...;
- 9C 19 91 D9 0D 10 FC C1 C0 86 8C 8D DA A4 45 0B ..............E.
- XX XX XX XX 00 XXXX.
- FF 36 34 00 00 00 00 00 10 00 00 00 04 00 00 00 .64.............
- 70 F9 02 00 58 F9 B6 E6 38 49 5C 38 38 9C 31 E4 p...X...8I88.1.
- 1D 3D 40 05 66 AD 4C C8 1D 12 8E 49 9E 60 1A CB .=@.f.L....I.`..
- 42 6F 62 00 Bob.
- */
- #define CLIENT_CDKEY2 0x36ff
- typedef struct
- {
- t_bnet_header h;
- bn_int spawn;
- bn_int keylen; /* without terminating NUL */
- bn_int productid;
- bn_int keyvalue1;
- bn_int sessionkey;
- bn_int ticks;
- bn_int key_hash[5];
- /* owner name */
- } t_client_cdkey2 PACKED_ATTR();
- #define CLIENT_CDKEY2_SPAWN_TRUE 0x00000001
- #define CLIENT_CDKEY2_SPAWN_FALSE 0x00000000
- /******************************************************/
- /******************************************************/
- /*
- From Diablo II 1.08?
- FF 42 43 00 AB 4C A4 3B .BC..L.;
- 01 00 00 00 00 00 00 00 10 00 00 00 06 00 00 00 ................
- XX 60 12 00 00 00 00 00 5D 82 82 C4 F4 8F D0 91 X`......].......
- E1 5B AB 95 D9 EE EF 18 44 3E F1 C9 XX XX XX XX .[......D>..XXXX
- XX XX XX XX XX XX XX XX XX XX 00 XXXXXXXXXX.
- FF 42 44 00 17 78 42 77 01 00 00 00 00 00 00 00 .BD..xBw........
- 10 00 00 00 06 00 00 00 XX F3 10 00 00 00 00 00 ........X.......
- A8 29 8B C4 41 BD 33 AB 74 4C 1F 1E 5C XX CA 83 .)..A.3.tL..X..
- 7F E5 36 14 XX XX XX XX XX XX XX XX XX XX XX XX ..6.XXXXXXXXXXXX
- XX XX XX 00 XXX.
- FF 42 44 00 C6 25 A1 3B 01 00 00 00 00 00 00 00 .BD..%.;........
- 10 00 00 00 06 00 00 00 XX F3 10 00 00 00 00 00 ........X.......
- C4 3F FB 05 94 0C AC D4 3B 63 B1 90 E4 XX 53 B9 .?......;c...XS.
- 70 C3 6F 2E XX XX XX XX XX XX XX XX XX XX XX XX p.o.XXXXXXXXXXXX
- XX XX XX 00 XXX.
- */
- #define CLIENT_CDKEY3 0x42ff
- typedef struct
- {
- t_bnet_header h;
- bn_int unknown1; /* FIXME: some kind of salt? */
- bn_int unknown2; /* 01 00 00 00 */
- bn_int unknown3; /* 00 00 00 00 */
- bn_int unknown4; /* 10 00 00 00 */
- bn_int unknown5; /* 06 00 00 00 */
- bn_int unknown6; /* FIXME: value1? */
- bn_int unknown7; /* 00 00 00 00 */
- bn_int key_hash[5];
- /* owner name */
- } t_client_cdkey3 PACKED_ATTR();
- #define CLIENT_CDKEY3_UNKNOWN1 0xffffffff
- #define CLIENT_CDKEY3_UNKNOWN2 0x00000001
- #define CLIENT_CDKEY3_UNKNOWN3 0x00000000
- #define CLIENT_CDKEY3_UNKNOWN4 0x00000010
- #define CLIENT_CDKEY3_UNKNOWN5 0x00000006
- #define CLIENT_CDKEY3_UNKNOWN6 0x00123456
- #define CLIENT_CDKEY3_UNKNOWN7 0x00000000
- /******************************************************/
- /******************************************************/
- /*
- FF 42 09 00 00 00 00 00 .B......
- 00
- FF 42 09 00 00 00 00 00 00 .B.......
- */
- #define SERVER_CDKEYREPLY3 0x42ff
- typedef struct
- {
- t_bnet_header h;
- bn_int message;
- /* owner name */ /* FIXME: or error message, or ... */
- } t_server_cdkeyreply3 PACKED_ATTR();
- #define SERVER_CDKEYREPLY3_MESSAGE_OK 0x00000000
- /******************************************************/
- /******************************************************/
- /*
- FF 34 0D 00 00 00 00 00 00 00 00 00 00 .4...........
- */
- #define CLIENT_REALMLISTREQ 0x34ff
- typedef struct
- {
- t_bnet_header h;
- bn_int unknown1;
- bn_int unknown2;
- } t_client_realmlistreq PACKED_ATTR();
- /******************************************************/
- /******************************************************/
- /*
- 0000: FF 40 04 00 .@..
- */
- #define CLIENT_REALMLISTREQ_110 0x40ff
- typedef struct
- {
- t_bnet_header h;
- } t_client_realmlistreq_110 PACKED_ATTR();
- /******************************************************/
- /******************************************************/
- /*
- FF 34 5E 00 00 00 00 00 01 00 00 00 00 00 00 C0 .4^.............
- 00 00 00 00 00 00 00 00 00 00 00 00 10 82 01 00 ................
- FF FF FF FF 00 00 00 00 42 65 74 61 57 65 73 74 ........BetaWest
- 00 50 6C 65 61 73 65 20 73 65 6C 65 63 74 20 74 .Please select t
- 68 69 73 20 61 73 20 79 6F 75 72 20 72 65 61 6C his as your real
- 6D 20 64 75 72 69 6E 67 20 62 65 74 61 00 m during beta.
- ff 34 5e 00 00 00 00 00 01 00 00 00 00 00 00 c0 .4^.............
- 00 00 00 00 00 00 00 00 00 00 00 00 bc 95 01 00 ................
- ff ff ff ff 00 00 00 00 42 65 74 61 57 65 73 74 ........BetaWest
- 00 50 6c 65 61 73 65 20 73 65 6c 65 63 74 20 74 .Please select t
- 68 69 73 20 61 73 20 79 6f 75 72 20 72 65 61 6c his as your real
- 6d 20 64 75 72 69 6e 67 20 62 65 74 61 00 m during beta.
- ff 34 5e 00 00 00 00 00 01 00 00 00 00 00 00 c0 .4^.............
- 00 00 00 00 00 00 00 00 00 00 00 00 c8 99 01 00 ................
- ff ff ff ff 00 00 00 00 42 65 74 61 57 65 73 74 ........BetaWest
- 00 50 6c 65 61 73 65 20 73 65 6c 65 63 74 20 74 .Please select t
- 68 69 73 20 61 73 20 79 6f 75 72 20 72 65 61 6c his as your real
- 6d 20 64 75 72 69 6e 67 20 62 65 74 61 00 m during beta.
- from bnetd-0.3.23pre18 to Diablo II 1.03
- FF 34 4B 00 00 00 00 00 01 00 00 00 00 00 .4K...........
- 00 C0 00 00 00 00 00 00 00 00 00 00 00 00 10 82 ................
- 01 00 FF FF FF FF 00 00 00 00 51 61 72 61 74 68 ..........Qarath
- 52 65 61 6C 6D 00 54 48 45 20 43 68 6F 69 63 65 Realm.THE Choice
- 20 46 6F 72 20 4E 6F 77 28 74 6D 29 00 For Now(tm).
- */
- #define SERVER_REALMLISTREPLY 0x34ff /* realm list reply? */
- typedef struct
- {
- t_bnet_header h;
- bn_int unknown1;
- bn_int count;
- /* realm entries */
- } t_server_realmlistreply PACKED_ATTR();
- #define SERVER_REALMLISTREPLY_UNKNOWN1 0x00000000
- typedef struct
- {
- bn_int unknown3;
- bn_int unknown4;
- bn_int unknown5;
- bn_int unknown6;
- bn_int unknown7; /* this one is always different... 00 01 XX XX.. what is it? */
- bn_int unknown8;
- bn_int unknown9;
- /* realm name */
- /* realm description */
- } t_server_realmlistreply_data PACKED_ATTR();
- #define SERVER_REALMLISTREPLY_DATA_UNKNOWN3 0xc0000000
- #define SERVER_REALMLISTREPLY_DATA_UNKNOWN4 0x00000000
- #define SERVER_REALMLISTREPLY_DATA_UNKNOWN5 0x00000000
- #define SERVER_REALMLISTREPLY_DATA_UNKNOWN6 0x00000000
- #define SERVER_REALMLISTREPLY_DATA_UNKNOWN7 0x00018210 /* 98832 or 1;33296 */
- #define SERVER_REALMLISTREPLY_DATA_UNKNOWN8 0xffffffff
- #define SERVER_REALMLISTREPLY_DATA_UNKNOWN9 0x00000000
- /******************************************************/
- /******************************************************/
- /*
- # 44 packet from server: type=0x40ff(unknown) length=40 class=bnet
- 0000: FF 40 28 00 00 00 00 00 01 00 00 00 01 00 00 00 .@(.............
- 0010: 45 75 72 6F 70 65 00 52 65 61 6C 6D 20 66 6F 72 Europe.Realm for
- 0020: 20 45 75 72 6F 70 65 00 Europe.
- */
- #define SERVER_REALMLISTREPLY_110 0x40ff
- typedef struct
- {
- t_bnet_header h;
- bn_int unknown1;
- bn_int count;
- /* realm entries */
- } t_server_realmlistreply_110 PACKED_ATTR();
- #define SERVER_REALMLISTREPLY_110_UNKNOWN1 0x00000000
- typedef struct
- {
- bn_int unknown1;
- /* realm name */
- /* realm description */
- } t_server_realmlistreply_110_data PACKED_ATTR();
- #define SERVER_REALMLISTREPLY_110_DATA_UNKNOWN1 0x00000001
- /******************************************************/
- /*
- FF 35 25 00 01 00 00 00 AA 7D 15 EB DA C7 FE 92 .5%......}......
- 94 84 C2 FE 98 2C 4D 20 12 96 05 D2 42 65 74 61 .....,M ....Beta
- 57 65 73 74 00 West.
- FF 35 25 00 06 00 00 00 BB DA EF 7A 94 D9 6E B0 .5%........z..n.
- 35 0e 03 96 6a 5f be 87 11 A3 59 CE 42 65 74 61 5...j_....Y.Beta
- 57 65 73 74 00 West.
- */
- #define CLIENT_REALMJOINREQ 0x35ff
- typedef struct /* join realm request */
- {
- t_bnet_header h;
- bn_int unknown1; /* seq number? */
- bn_int unknown2;
- bn_int unknown3;
- bn_int unknown4;
- bn_int unknown5;
- bn_int unknown6; /* bn_hash of something? */
- /* realm name */
- } t_client_realmjoinreq PACKED_ATTR();
- /******************************************************/
- /******************************************************/
- /*
- FF 35 43 00 01 00 00 00 FA 9E 0D D1 D8 94 F6 07 .5C.............
- F6 0F 08 00 D8 94 F6 30 17 E0 00 00 00 00 00 00 .......0........
- 42 1B 00 00 B2 7E 27 44 D5 C5 FB 07 FA 9E BF 63 B....~'D.......c
- 1B 57 1B 69 7F 4F A9 C0 B8 83 E9 4C 4D 6F 4E 6B .W.i.O.....LMoNk
- 32 6B 00 2k.
- FF 35 44 00 01 00 00 00 FA 9E 0D D1 D8 94 F6 07 .5D.............
- F6 0F 08 00 80 7B 40 A2 17 E0 00 00 00 00 00 00 .....{@.........
- 42 1B 00 00 B2 7E 27 44 D5 C5 FB 07 FA 9E BF 63 B....~'D.......c
- 1B 57 1B 69 7F 4F A9 C0 B8 83 E9 4C 51 6C 65 78 .W.i.O.....LQlex
- 53 5A 47 00 SZG.
- FF 35 48 00 01 00 00 00 24 43 A2 A9 D8 94 F6 09 .5H.....$C......
- 05 75 0E 00 D8 94 F6 30 17 E0 00 00 00 00 00 00 .u.....0........
- 10 1D 00 00 FE CE B9 DA 89 4B 93 51 A9 18 FA A2 .........K.Q....
- 85 4B B8 A4 B4 27 C8 5D A8 FE 17 31 48 65 68 65 .K...'.]...1Hehe
- 2D 69 2D 53 75 63 6B 00 -i-Suck.
- */
- #define SERVER_REALMJOINREPLY 0x35ff
- typedef struct /* realm join reply? */
- {
- t_bnet_header h;
- bn_int unknown1; /* same as reqest */ /* seq number? */ /* count? */ /* result? */
- bn_int unknown2; /* same later in auth login */
- bn_int unknown3; /* reg auth? looks like server ip */ /* same later in auth login and SERVER_MESSAGE */
- bn_int sessionkey; /* same later in auth login */
- bn_int addr; /* big endian? */
- bn_short port; /* big endian? */
- bn_short unknown6;
- bn_int unknown7; /* always zero? */ /* same later in auth login */
- bn_int unknown8; /* always near 0x2000? */ /* same later in auth login */
- bn_int unknown9; /* hash salt? */ /* same later in auth login */
- bn_int secret_hash[5]; /* same later in auth login */
- /* player name */
- } t_server_realmjoinreply PACKED_ATTR();
- #define SERVER_REALMJOINREPLY_UNKNOWN2 0xd10d9efa
- #define SERVER_REALMJOINREPLY_UNKNOWN3 0x07f694d8
- #define SERVER_REALMJOINREPLY_UNKNOWN6 0x0000
- #define SERVER_REALMJOINREPLY_UNKNOWN7 0x00000000
- #define SERVER_REALMJOINREPLY_UNKNOWN8 0x00001b42
- /******************************************************/
- /******************************************************/
- /*
- FF 37 09 00 00 00 00 00 00 .7.......
- Diablo II 1.03
- FF 37 09 00 00 00 00 00 00 .7.......
- */
- #define CLIENT_UNKNOWN_37 0x37ff
- typedef struct /* character list request, character list upload? */
- {
- t_bnet_header h;
- bn_int opencount; /* Number of OPEN characters on user's machine! */
- /* Always zero for "closed" connections. */
- /* unknown2 */ /* subsequent blocks of t_d2char_info or something */
- /* similar, so server could read this list and */
- /* include in the 0x37ff reply as a choice (this */
- /* makes sense cuz the server does NOT store open */
- /* character details - this also explains why */
- /* unknown1 is always 0 in the beta, and the 0x00 */
- /* of unknown2 acts as a EOF when client read the */
- /* t_d2char_info structures */
- } t_client_unknown_37 PACKED_ATTR();
- /******************************************************/
- /******************************************************/
- /*
- FF 37 01 01 00 00 00 00 08 00 00 00 04 00 00 00 .7..............
- 42 65 74 61 57 65 73 74 2C 4D 6F 4E 6B 00 87 80 BetaWest,MoNk...
- 06 01 01 01 01 50 FF FF 02 02 FF FF FF FF FF FF .....P..........
- 02 49 50 50 50 50 FF FF FF 50 50 FF FF FF FF FF .IPPPP...PP.....
- FF 14 88 82 80 80 FF FF FF 00 42 65 74 61 57 65 ..........BetaWe
- 73 74 2C 4D 6F 4E 6B 2D 65 00 83 80 05 02 02 01 st,MoNk-e.......
- 01 2B FF 1B 02 02 FF FF FF FF FF FF 03 FF FF FF .+..............
- FF FF FF FF A8 FF FF FF FF FF FF FF FF 10 80 82 ................
- 80 80 FF FF FF 00 42 65 74 61 57 65 73 74 2C 4D ......BetaWest,M
- 6F 4E 6B 2D 65 65 00 83 80 06 01 01 01 01 FF 4C oNk-ee.........L
- FF 02 02 FF FF FF FF FF FF 01 FF 48 48 48 48 FF ...........HHHH.
- A6 FF 48 48 FF FF FF FF FF FF 0F 80 80 80 80 FF ..HH............
- FF FF 00 42 65 74 61 57 65 73 74 2C 4D 6F 4E 6B ...BetaWest,MoNk
- 2D 74 77 6F 00 87 80 01 01 01 01 01 FF FF FF 01 -two............
- 01 FF FF FF FF FF FF 02 FF FF FF FF FF FF FF FF ................
- FF FF FF FF FF FF FF FF 01 84 80 FF FF FF 80 80 ................
- 00 .
- ^-- 1: (BetaWest) MoNk
- 2: (BetaWest) MoNk-e
- 3: (BetaWest) MoNk-ee
- 4: (BetaWest) MoNk-two
- ff 37 4e 00 00 00 00 00 08 00 00 00 01 00 00 00 .7N.............
- 42 65 74 61 57 65 73 74 2c 4c 69 66 65 6c 69 6b BetaWest,Lifelik
- 65 00 87 80 01 01 01 01 01 ff ff ff 01 01 ff ff e...............
- ff ff ff ff 03 ff ff ff ff ff ff ff ff ff ff ff ................
- ff ff ff ff ff 01 80 80 ff ff ff 80 80 00 ..............
- ff 37 4e 00 00 00 00 00 08 00 00 00 01 00 00 00 .7N.............
- 42 65 74 61 57 65 73 74 2c 51 6c 65 78 54 45 53 BetaWest,QlexTES
- 54 00 83 80 ff ff ff ff ff 30 ff 1b ff ff ff ff T........0......
- ff ff ff ff 04 ff ff ff ff ff ff ff ff ff ff ff ................
- ff ff ff ff ff 01 80 80 80 80 ff ff ff 00 ..............
- from bnetd-0.3.23pre18 to Diablo II 1.03
- "Char1 {BNE}" [lvl 20, amaz]
- "Char2 {BNE}" [lvl 21, sorc]
- "Char3 {BNE}" [lvl 22, necro]
- FF 37 D9 00 00 00 00 00 08 00 00 00 03 00 Gv.7............
- 00 00 51 61 72 61 74 68 52 65 61 6C 6D 2C 43 68 ..QarathRealm,Ch
- 61 72 31 00 87 80 01 01 01 01 01 01 01 01 01 01 ar1.............
- 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 ................
- 01 01 01 01 01 01 01 14 85 86 01 FF FF FF FF 42 ...............B
- 4E 45 54 44 00 51 61 72 61 74 68 52 65 61 6C 6d NETD.QarathRealm
- 2C 43 68 61 72 32 00 87 80 01 01 01 01 01 01 01 ,Char2..........
- 01 01 01 01 01 01 01 01 01 02 01 01 01 01 01 01 ................
- 01 01 01 01 01 01 01 01 01 01 15 85 86 01 FF FF ................
- FF FF 42 4E 45 54 44 00 51 61 72 61 74 68 52 65 ..BNETD.QarathRe
- 61 6C 6D 2C 43 68 61 72 33 00 87 80 01 01 01 01 alm,Char3.......
- 01 01 01 01 01 01 01 01 01 01 01 01 03 01 01 01 ................
- 01 01 01 01 01 01 01 01 01 01 01 01 01 16 85 86 ................
- 01 FF FF FF FF 42 4E 45 54 44 00 .....BNETD.
- */
- #define SERVER_UNKNOWN_37 0x37ff
- typedef struct /* character list reply? */
- {
- t_bnet_header h;
- bn_int unknown1;
- bn_int unknown2; /* _bucky_: max chars allowed? */
- bn_int count; /* # of chars, same number of */
- /* t_char_info to follow in */
- /* packet */
- /* d2char_info blocks */
- } t_server_unknown_37 PACKED_ATTR();
- #define SERVER_UNKNOWN_37_UNKNOWN1 0x00000000
- #define SERVER_UNKNOWN_37_UNKNOWN2 0x00000008
- /* The ONLY 0x00 that should appear should be the terminating NUL for */
- /* the character name string and the guild tag string, they're used as */
- /* delimiters to separate character name and the character structure */
- /* If you got any other NUL's in here the next character's info will */
- /* be royally fucked up - using 0x01 or 0xff for unknowns seem to work */
- /* well */
- typedef struct
- {
- /* "RealmName,CharacterName" - for closed characters */
- /* - OR - */
- /* "CharacterName" - for open characters */
- /* - strlen(CharacterName) must be <= 15 - */
- bn_byte unknownb1; /* 0x83, 0x87? */
- bn_byte unknownb2; /* 0x80...? */
- bn_byte helmgfx;
- bn_byte bodygfx;
- bn_byte leggfx;
- bn_byte lhandweapon;
- bn_byte lhandgfx;
- bn_byte rhandweapon;
-
- /* Partial weapon code list:
- 0x2f: 1H Axe
- 0x30: 1H Sword
- 0x50: 2H Staff
- 0x51: Another 2H Staff
- 0x52: Another 2H Staff
- 0x53: Another 2H Staff
- 0x54: 2H Axe
- 0x55: Scythe
- 0x56: empty?
- 0x57: Another 2H Axe
- 0x58: Halberd?
- 0x59: empty?
- 0x5a: Another 2H Axe
- 0x5b: Another Halberd
- 0x5c: empty?
- 0x5d: 1H club?
- 0x5e: empty?
- 0x5f: empty?
- */
-
- bn_byte rhandgfx;
- bn_byte unknownb3;
- bn_byte unknownb4;
- bn_byte unknownb5;
- bn_byte unknownb6;
- bn_byte unknownb7;
- bn_byte unknownb8;
- bn_byte unknownb9;
- bn_byte unknownb10;
- bn_byte unknownb11;
- bn_byte class; /* 0x01=Amazon, 0x02=Sor, 0x03=Nec, 0x04=Pal, 0x05=Bar */
-
- bn_int unknown1;
- bn_int unknown2;
- bn_int unknown3;
- bn_int unknown4;
-
- bn_byte level; /* yes, byte, not short/int/long */
- bn_byte status; /* 0x01-03 = Norm & alive */
- /* 0x04-07 = HC & alive */
- /* 0x08-0b = Norm & "dead"? */
- /* 0x0c+ = HC & dead, chat only */
- /* Add 0x80 to get same effect */
- bn_byte title; /* 0x01=none
- 0x02=Sir/Dame?
- 0x03=Sir/Dame?
- 0x04=Lord?
- 0x05=Lord?
- 0x06=Baron?
- 0x07=Baron? */
- /* Same codes for HC chars */
- /* Add 0x80 to get same effect */
- bn_byte unknownb13;
- bn_byte emblembgc; /* Guild emblem background colour */
- bn_byte emblemfgc; /* Guild emblem foreground colour */
- bn_byte emblemnum; /* Guild emblem type number */
-
- /* emblem number corresponds to D2DATA.MPQ/data/global/ui/Emblems/iconXXa.dc6 */
- /* where XX = emblem number - 1 (ie, 0x0A corresponds to icon09a.dc6) use */
- /* for dummy values seem safe... 0x01 won't work, you'll get an emblem... */
-
- bn_byte unknownb14;
- /* Guild Tag */ /* must not be longer than 3 chars */
- } t_d2char_info PACKED_ATTR();
- #define D2CHAR_INFO_UNKNOWNB1 0x83
- #define D2CHAR_INFO_UNKNOWNB2 0x80
- #define D2CHAR_INFO_FILLER 0xff /* non-zero padding */
- #define D2CHAR_INFO_CLASS_AMAZON 0x01
- #define D2CHAR_INFO_CLASS_SORCERESS 0x02
- #define D2CHAR_INFO_CLASS_NECROMANCER 0x03
- #define D2CHAR_INFO_CLASS_PALADIN 0x04
- #define D2CHAR_INFO_CLASS_BARBARIAN 0x05
- #define D2CHAR_INFO_CLASS_DRUID 0x06
- #define D2CHAR_INFO_CLASS_ASSASSIN 0x07
- /******************************************************/
- /******************************************************/
- /* D2 packet... not sent very often and the client doesn't
- * seem to expect an answer */
- /* FIXME: what the hell does this one do? */
- /*
- FF 39 13 00 42 65 74 61 57 65 73 74 2C 62 75 73 .9..BetaWest,bus
- 74 61 00 ta.
- this one was sent after a closed character was deleted on the auth
- server... maybe a notifier for the gateway server?
- FF 39 17 00 42 6F 62 73 57 6F 72 6C 64 2C 63 68 .9..BobsWorld,ch
- 61 72 6E 61 6D 65 00 arname.
- */
- #define CLIENT_UNKNOWN_39 0x39ff
- typedef struct
- {
- t_bnet_header h;
- /* character name */ /* what about open chars? */
- } t_client_unknown_39 PACKED_ATTR();
- /******************************************************/
- /******************************************************/
- /*
- FF 3A 2E 00 58 4C F2 00 19 C2 08 00 D7 33 37 D3 .:..XL.......37.
- 42 8C 92 37 C2 26 08 A9 3E 92 05 28 A1 5A 18 B9 B..7.&..>..(.Z..
- 6D 61 73 74 6F 64 6F 6E 74 66 69 6C 6D 00 mastodontfilm.
- FF 3A 28 00 2B 73 1C 01 88 91 F2 0D AF 22 43 25 .:(.+s......."C%
- BF E4 2D 45 42 37 04 DB AF 95 66 71 16 85 67 60 ..-EB7....fq..g`
- 51 6C 65 78 53 5A 47 00 QlexSZG.
- */
- #define CLIENT_LOGINREQ2 0x3aff
- typedef struct
- {
- t_bnet_header h;
- bn_int ticks; /* is it really? */
- bn_int sessionkey;
- bn_int password_hash2[5];
- /* player name */
- } t_client_loginreq2 PACKED_ATTR();
- /******************************************************/
- /******************************************************/
- /*
- # 21 packet from client: type=0x46ff(unknown) length=8 class=bnet
- 0000: FF 46 08 00 00 00 00 00 .F......
- */
- #define CLIENT_MOTD_W3 0x46ff
- typedef struct
- {
- t_bnet_header h;
- bn_int last_news_time; // date of the last news item the client has
- } t_client_motd_w3 PACKED_ATTR();
- /******************************************************/
- /******************************************************/
- /*
- # 22 packet from server: type=0x46ff(unknown) length=225 class=bnet
- 0000: FF 46 E1 00 01 16 3A 6C 3C FF FF FF FF 00 00 00 .F....:l<.......
- 0010: 00 00 00 00 00 57 65 6C 63 6F 6D 65 20 74 6F 20 .....Welcome to
- 0020: 42 61 74 74 6C 65 2E 6E 65 74 21 0A 54 68 69 73 Battle.net!.This
- 0030: 20 73 65 72 76 65 72 20 69 73 20 68 6F 73 74 65 server is hoste
- 0040: 64 20 62 79 20 41 54 26 54 2E 0A 54 68 65 72 65 d by AT&T..There
- 0050: 20 61 72 65 20 63 75 72 72 65 6E 74 6C 79 20 36 are currently 6
- 0060: 32 38 20 75 73 65 72 73 20 70 6C 61 79 69 6E 67 28 users playing
- 0070: 20 31 35 39 20 67 61 6D 65 73 20 6F 66 20 57 61 159 games of Wa
- 0080: 72 63 72 61 66 74 20 49 49 49 2C 20 61 6E 64 20 rcraft III, and
- 0090: 31 37 37 33 34 36 20 75 73 65 72 73 20 70 6C 61 177346 users pla
- 00A0: 79 69 6E 67 20 37 37 38 33 37 20 67 61 6D 65 73 ying 77837 games
- 00B0: 20 6F 6E 20 42 61 74 74 6C 65 2E 6E 65 74 2E 0A on Battle.net..
- 00C0: 4C 61 73 74 20 6C 6F 67 6F 6E 3A 20 54 68 75 20 Last logon: Thu
- 00D0: 46 65 62 20 31 34 20 20 35 3A 32 38 20 50 4D 0A Feb 14 5:28 PM.
- 00E0: 00 .
- # Match 4, 2002
- # 92 packet from server: type=0x46ff(unknown) length=859 class=bnet
- 0000: FF 46 5B 03 01 B4 B2 82 3C 20 B6 83 3C 20 B6 83 .F[.....< ..< ..
- 0010: 3C 20 B6 83 3C 57 65 20 68 61 76 65 20 62 65 65 < ..<We have bee
- # 93 packet from server: type=0x46ff(unknown) length=223 class=bnet
- 0000: FF 46 DF 00 01 B4 B2 82 3C 20 B6 83 3C 20 B6 83 .F......< ..< ..
- 0010: 3C 00 00 00 00 57 65 6C 63 6F 6D 65 20 74 6F 20 <....Welcome to
- */
- #define SERVER_MOTD_W3 0x46ff
- typedef struct
- {
- t_bnet_header h;
- bn_byte msgtype; /* we only saw "1" type so far */
- bn_int curr_time; /* as seen by the server */
- bn_int first_news_time; /* the oldest news item's timestamp */
- bn_int timestamp; /* the timestamp of this news item */
- /* it is equal with the latest news item timestamp for
- the welcome message */
- bn_int timestamp2; /* always equal with the timestamp except the
- last packet which shows in the right panel */
- /* text */
- } t_server_motd_w3 PACKED_ATTR();
- #define SERVER_MOTD_W3_MSGTYPE 0x01
- #define SERVER_MOTD_W3_WELCOME 0x00000000
- /******************************************************/
- /******************************************************/
- /*
- # Jon/bbbbb
- # 28 packet from client: type=0x53ff(unknown) length=40 class=bnet
- 0000: FF 53 28 00 6F FD 5F 61 C3 D1 C4 78 E6 2E 24 8B .S(.o._a...x..$.
- 0010: 32 EB 36 9C 39 57 D8 BA 57 84 67 5E E7 78 5B 01 2.6.9W..W.g^.x[.
- 0020: 6D 99 87 15 4A 6F 6E 00 m...Jon.
- */
- #define CLIENT_LOGINREQ_W3 0x53ff
- typedef struct
- {
- t_bnet_header h;
- bn_byte unknown[32];
- /* player name */
- } t_client_loginreq_w3 PACKED_ATTR();
- /******************************************************/
- /******************************************************/
- /*
- 12:33:56.255569 63.241.83.11.6112 > ws-2-11.1038: P 190:262(72) ack 272 win 65264
- ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** **
- ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** **
- ** ** ** ** ** ** ** ** FF 53 48 00 00 00 00 00 .SH.....
- 4B A8 FF 5D 1E 5D 2D 50 D1 2B B2 95 74 AD 5F 4E K..].]-P.+..t._N
- 88 A4 88 48 18 27 89 50 F1 AA 1B D5 D7 B6 47 BC ...H.'.P......G.
- 30 8B 2A 54 AA 99 23 96 75 8A 5E 67 35 8E 5B 22 0.*T..#.u.^g5.["
- 2C 0E 68 2E C2 95 E9 D7 A1 82 F1 2C 1E 2B 28 36 ,.h........,.+(6
- */
- #define SERVER_LOGINREPLY_W3 0x53ff
- typedef struct
- {
- t_bnet_header h;
- bn_int message;
- /* seems to be response to client-challenge */
- bn_int unknown[16];
- } t_server_loginreply_w3 PACKED_ATTR();
- #define SERVER_LOGINREPLY_W3_MESSAGE_SUCCESS 0x00000000
- #define SERVER_LOGINREPLY_W3_MESSAGE_ALREADY 0x00000001 /* Account already logged on */
- #define SERVER_LOGINREPLY_W3_MESSAGE_BADACCT 0x00000001 /* Accoutn does not exist */
- /******************************************************/
- /******************************************************/
- /* single player crack based:
- # 34 packet from server: type=0x54ff(unknown) length=40 class=bnet
- 0000: FF 54 28 00 00 00 00 00 00 00 00 00 00 00 00 00 .T(.............
- 0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
- 0020: 00 00 00 00 00 00 00 00 ........
- * Password Checksum ? *
- -- client --
- 0x54ff - 2 bytes
- size - 2 bytes (0x0018)
- unknown1 - 20 bytes
- -- server --
- 0x54ff - 2 bytes
- size - 2 bytes
- msgid - 4 bytes
- {
- 0x00000000 accept
- 0x00000002 password incorrect
- }
- unknown1 - 20 bytes
- Packet #13
- 0x0000 FF 54 1C 00 00 00 00 00-3A D5 B9 B1 2B D9 B5 D9