CMD AUTH LOGON CHALLENGE Client: Difference between revisions
Jump to navigation
Jump to search
m (Add categories) |
(Add sizes and protocol version headers) |
||
Line 13: | Line 13: | ||
! Description | ! Description | ||
|- | |- | ||
| 0x00 || 1 / - || uint8 || opcode || | | 0x00 || 1 / - || uint8 || opcode || 0x00 for [[CMD_AUTH_LOGON_CHALLENGE]],<br> 0x02 for [[CMD_AUTH_RECONNECT_CHALLENGE]] | ||
|- | |- | ||
| 0x01 || 1 / - || uint8 || protocol_version || | | 0x01 || 1 / - || uint8 || protocol_version || Exact purpose unknown. See table in [[#Protocol Versions]]. | ||
|- | |- | ||
| 0x02 || 2 / Little || uint16 || size || | | 0x02 || 2 / Little || uint16 || size || Length of package minus the size of the command,<br> protocol_version and size fields.<br>See [[#Field]]. | ||
|- | |- | ||
| 0x04 || 4 / Little || uint8[4] || game_name || Always null terminated 'WoW\0' string. | | 0x04 || 4 / Little || uint8[4] || game_name || Always null terminated 'WoW\0' string. | ||
Line 44: | Line 44: | ||
== Entire packet == | == Entire packet == | ||
The only variable field is | The only variable field is account_name_length which is limited to 16 UTF-8 characters by the client. UTF-8 characters are limited to [https://stackoverflow.com/a/9533324 a maximum of 4 bytes per character] which means that the theoretical maximum for a well behaving client is 34 + (16 * 4), or 98 bytes. If not assuming a well behaving client the maximum length is 34 + 255 = 289 bytes. | ||
== Field == | == Field == | ||
The value of the size field can be calculated as 30 + account_name_length. This field is | The value of the size field can be calculated as 30 + account_name_length. This field is calculated without the opcode, protocol_version and size fields. | ||
= Protocol Versions = | |||
Below is a table of verified protocol version for specific patches. | |||
{| class="wikitable" | |||
|+ RealmFooter_Server | |||
! Game Version | |||
! Connect Protocol Version | |||
! Reconnect Protocol Version | |||
! Notes | |||
|- | |||
| {{Template:Sandbox/PrettyVersion|expansionlevel=1|build=1.1.2.4125}} || ? || ? || Row is here because original document mentioned this version specifically. | |||
|- | |||
| {{Template:Sandbox/PrettyVersion|expansionlevel=1|build=1.12.1.5875}} || 3 || 2 || | |||
|- | |||
| {{Template:Sandbox/PrettyVersion|expansionlevel=2|build=2.4.3.8606}} || 8 || 8 || | |||
|- | |||
|} | |||
Revision as of 20:06, 20 May 2021
CMD_AUTH_LOGON_CHALLENGE and CMD_AUTH_RECONNECT_CHALLENGE have the same client packet.
Packet Layout
This packet does not change at all between versions.
Offset | Size / Endianness | Type | Name | Description |
---|---|---|---|---|
0x00 | 1 / - | uint8 | opcode | 0x00 for CMD_AUTH_LOGON_CHALLENGE, 0x02 for CMD_AUTH_RECONNECT_CHALLENGE |
0x01 | 1 / - | uint8 | protocol_version | Exact purpose unknown. See table in #Protocol Versions. |
0x02 | 2 / Little | uint16 | size | Length of package minus the size of the command, protocol_version and size fields. See #Field. |
0x04 | 4 / Little | uint8[4] | game_name | Always null terminated 'WoW\0' string. |
0x08 | 3 / - | uint8[3] | version | [0x01, 0x01, 0x02] for 1.1.2. [0x01, 0x0C, 0x01] for 1.12.1. |
0x0B | 2 / Little | uint16 | build | 4125, aka Revision |
0x0D | 4 / Big | uint8[4] | platform | eg '\0x86'. Has a leading zero for 'x86'. |
0x11 | 4 / Big | uint8[4] | os | eg '\0Win'. Has a leading zero for 'Win'. |
0x15 | 4 / Big | uint8[4] | locale | eg 'enUS' |
0x19 | 4 / Little | uint32 | worldregion_bias | Offset in minutes from UTC time, eg. 180 means 180 minutes |
0x1D | 4 / Big | uint32 | ip | client_ip |
0x21 | 1 / - | uint8 | account_name_length | Length of the account_name field in bytes. The client can only send 16 characters, but this can still be more than 16 bytes if non-ASCII characters are used. |
0x22 | account_name_length / Big | uint8[account_name_len] | account_name | UTF-8 encoded uppercase string of the username. Not all unicode characters are uppercased correctly. |
Size
Entire packet
The only variable field is account_name_length which is limited to 16 UTF-8 characters by the client. UTF-8 characters are limited to a maximum of 4 bytes per character which means that the theoretical maximum for a well behaving client is 34 + (16 * 4), or 98 bytes. If not assuming a well behaving client the maximum length is 34 + 255 = 289 bytes.
Field
The value of the size field can be calculated as 30 + account_name_length. This field is calculated without the opcode, protocol_version and size fields.
Protocol Versions
Below is a table of verified protocol version for specific patches.