MsgConnect

This client message is first sent to the account server after receiving MsgConnectEx, and then sent to the game server after the client disconnects from the account server and connects to the game server specified in MsgConnectEx. The game server is expected to respond to this connection attempt with MsgTalk (see this message type for details on that interaction).

The account ID in the account server MsgConnect message is copied from MsgConnectEx, and the account ID and data fields in the game server MsgConnect message are also copied from MsgConnectEx.

⚠️ WARNING

A serious exploit is possible using this message on some servers. If a deterministic key is used, such as the account ID, an encrypted account ID, or incrementor, then it may be possible for any bad actor to log into any character in the game (bypassing the account server).

The following are some example fixes employed in various server projects for replacing the two 32-bit fields:

  • Short-lived access token sent from the account server to the game server over RPC, paired with the connector's IP address and account ID.
  • Short-lived connection request record stored in a shared database containing the connector's IP address and account ID.

Table of Contents

Patch 4267

Account Server Message Definition

☑️ Assumed (Observed) - Comet

PosTypeNameDescriptionExample
0UInt16MsgSizeSize of the message28
2UInt16MsgTypeType of message1052
4UInt32Account IDAccount id from the account server1
8UInt32DataContents of the Res.dat file10
12Char[16]InfoName of the fileRes.dat

Game Server Message Definition

☑️ Assumed (Observed) - Comet

PosTypeNameDescriptionExample
0UInt16MsgSizeSize of the message28
2UInt16MsgTypeType of message1052
4UInt32Account IDAccount id from the account server1
8UInt32DataEncryption key generator parameter6351601
12Char[16]InfoBuild version and language117 English

Patch 4343

Account Server Message Definition

☑️ Assumed (Observed) - Comet

PosTypeNameDescriptionExample
0UInt16MsgSizeSize of the message28
2UInt16MsgTypeType of message1052
4UInt32Account IDAccount id from the account server1
8UInt32DataContents of the Res.dat file10
12Char[16]InfoName of the fileRes.dat

Game Server Message Definition

☑️ Assumed (Observed) - Comet

PosTypeNameDescriptionExample
0UInt16MsgSizeSize of the message28
2UInt16MsgTypeType of message1052
4UInt32Account IDAccount id from the account server1
8UInt32DataEncryption key generator parameter6351601
12UInt16BuildBuild version of the client123
14Char[10]LanguageISO 639-1 language codeEn
24UInt32InfoContents of the Res.dat file10

Patch 5065

Account Server Message Definition

☑️ Assumed (Observed) - Comet

PosTypeNameDescriptionExample
0UInt16MsgSizeSize of the message28
2UInt16MsgTypeType of message1052
4UInt32Account IDAccount id from the account server1
8UInt32DataContents of the Res.dat file10
12Char[16]InfoName of the fileRes.dat

Game Server Message Definition

☑️ Assumed (Observed) - Comet

PosTypeNameDescriptionExample
0UInt16MsgSizeSize of the message28
2UInt16MsgTypeType of message1052
4UInt32Account IDAccount id from the account server1
8UInt32DataEncryption key generator parameter6351601
12UInt16BuildBuild version of the client123
14Char[2]LanguageISO 639-1 language codeEn
16Char[8]Mac AddressMac address of connecting interface0A0B0C0D0E0F
24UInt32InfoContents of the Res.dat file10