CMD AUTH LOGON PROOF Server: Difference between revisions

From wowdev
Jump to navigation Jump to search
(Created page with "= Packet Layout = == {{Template:Sandbox/PrettyVersion|expansionlevel=1|build=1.1.2.4125}} == {| class="wikitable" |+ AuthLogonProof_Server ! Offset ! Size ! Type ! Name ! Desc...")
 
(Add example packets)
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[CMD_AUTH_LOGON_PROOF_Server]] is a [[Login Packet]] sent by the server after receiving a [[CMD_AUTH_LOGON_PROOF_Client]]. It is followed by a [[CMD_REALM_LIST_Client]] from the client.
= Packet Layout =
= Packet Layout =
== {{Template:Sandbox/PrettyVersion|expansionlevel=1|build=1.1.2.4125}} ==
== {{Template:Sandbox/PrettyVersion|expansionlevel=1|build=1.1.2.4125}} ==
{| class="wikitable"
{| class="wikitable"
Line 13: Line 16:
| 0x0 || 1 / - || uint8 || command || LOGIN_PROOF (0x1)  
| 0x0 || 1 / - || uint8 || command || LOGIN_PROOF (0x1)  
|-
|-
| 0x1 || 1 / - || uint8 || error || The fields below are only included if this is LOGIN_OK (0x0).
| 0x1 || 1 / - || uint8 || result || The fields below are only included if this is [[Login_Packet_Results|SUCCESS]] (0x0).
|-
|-
!colspan="5"| Body
!colspan="5"| Body
|-
|-
| 0x2 || 20 / Little || uint8[20] || m2 || SRP6 Server proof.
| 0x2 || 20 / Little || uint8[20] || server_proof || SRP6 Server proof.
|-
|-
| 0x16 || 4 / Little || uint32 || hardware_survey_id || ID of a hardware survey that the client should perform. <br>Set to 0 to not use. Can safely be set to 0.
| 0x16 || 4 / Little || uint32 || hardware_survey_id || ID of a hardware survey that the client should perform. <br>Set to 0 to not use. Can safely be set to 0.
|}
|}


== {{Template:Sandbox/PrettyVersion|expansionlevel=2|build=2.4.3.8606}} ==
== {{Template:Sandbox/PrettyVersion|expansionlevel=2|build=2}} ==


{| class="wikitable"
{| class="wikitable"
Line 36: Line 39:
| 0x0 || 1 / - || uint8 || command || LOGIN_PROOF (0x1)  
| 0x0 || 1 / - || uint8 || command || LOGIN_PROOF (0x1)  
|-
|-
| 0x1 || 1 / - || uint8 || error || The fields below are only included if this is SUCCESS (0x0).<br>If this is not SUCCESS (0x0) two padding bytes are added after this.
| 0x1 || 1 / - || uint8 || result || The fields below are only included if this is [[Login_Packet_Results|SUCCESS]] (0x0).<br>If this is not [[Login_Packet_Results|SUCCESS]] (0x0) two padding bytes are added after this.
|-
|-
| - || 2 / - || uint16 || error_padding || Only included if error is not SUCCESS (0x00).
| - || 2 / - || uint16 || result_padding || Only included if error is not [[Login_Packet_Results|SUCCESS]] (0x00).
|-
|-
!colspan="5"| Body
!colspan="5"| Body
|-
|-
| 0x2 || 20 / Little || uint8[20] || m2 || SRP6 Server proof.
| 0x2 || 20 / Little || uint8[20] || server_proof || SRP6 Server proof.
|-
|-
| 0x16 || 4 / Little || uint32 || account_flag || ACCOUNT_FLAG_GM = 0x00000001,<br>ACCOUNT_FLAG_TRIAL = 0x00000008,<br>ACCOUNT_FLAG_PROPASS = 0x00800000<br>Mangos statically sets this to PROPASS.
| 0x16 || 4 / Little || uint32 || account_flag || ACCOUNT_FLAG_GM = 0x00000001,<br>ACCOUNT_FLAG_TRIAL = 0x00000008,<br>ACCOUNT_FLAG_PROPASS = 0x00800000<br>Mangos statically sets this to PROPASS.<br>This field does not exist {{Template:Sandbox/VersionRange|max_exclusive=2|max_expansionlevel=2|max_build=2.4.0}}.
|-
|-
| 0x20 || 4 / Little || uint32 || hardware_survey_id || ID of a hardware survey that the client should perform. <br>Set to 0 to not use. Can safely be set to 0.
| 0x20 || 4 / Little || uint32 || hardware_survey_id || ID of a hardware survey that the client should perform. <br>Set to 0 to not use. Can safely be set to 0.
Line 50: Line 53:
| 0x24 || 2 / Little || uint16 || unknown_flags || Mangos describes as "some flags (AccountMsgAvailable = 0x01)" and statically sets to 0.
| 0x24 || 2 / Little || uint16 || unknown_flags || Mangos describes as "some flags (AccountMsgAvailable = 0x01)" and statically sets to 0.
|}
|}
= Size =
For version {{Template:Sandbox/VersionRange|max_expansionlevel=1|max_build=1}} if the result is not [[Login_Packet_Results|SUCCESS]] (0x00) the packet is 2 bytes. If it is SUCCESS the packet is 26 bytes.
For version {{Template:Sandbox/VersionRange|min_expansionlevel=2|min_build=2}} if the result is not [[Login_Packet_Results|SUCCESS]] (0x00) the packet is 4 bytes. If it is SUCCESS the packet is 38 bytes.
= Example Packet =
Below is complete packet sent from a {{Template:Sandbox/PrettyVersion|expansionlevel=1|build=1.12.1.5875}} client. The values are explained as comments. This can be used for verifying packet parser implementations.
First a failed one
char bytes[] = {
0x01, // Opcode: CMD_AUTH_LOGON_PROOF
0x04 // Result: FAIL_UNKNOWN_ACCOUNT
};
Then a successful one
char bytes[] = {
0x01, // Opcode: CMD_AUTH_LOGON_PROOF
0x00, // Result: SUCCESS
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c,
0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, // Server proof
0xEF, 0xBE, 0xAD, 0xDE // Hardware Survey ID: 0xDEADBEEF
}
 
{{Login Packet Categories}}

Latest revision as of 18:52, 16 August 2021

CMD_AUTH_LOGON_PROOF_Server is a Login Packet sent by the server after receiving a CMD_AUTH_LOGON_PROOF_Client. It is followed by a CMD_REALM_LIST_Client from the client.

Packet Layout

Vanilla (1.1.2.4125)

AuthLogonProof_Server
Offset Size Type Name Description
Header
0x0 1 / - uint8 command LOGIN_PROOF (0x1)
0x1 1 / - uint8 result The fields below are only included if this is SUCCESS (0x0).
Body
0x2 20 / Little uint8[20] server_proof SRP6 Server proof.
0x16 4 / Little uint32 hardware_survey_id ID of a hardware survey that the client should perform.
Set to 0 to not use. Can safely be set to 0.

BC (2)

AuthLogonProof_Server
Offset Size Type Name Description
Header
0x0 1 / - uint8 command LOGIN_PROOF (0x1)
0x1 1 / - uint8 result The fields below are only included if this is SUCCESS (0x0).
If this is not SUCCESS (0x0) two padding bytes are added after this.
- 2 / - uint16 result_padding Only included if error is not SUCCESS (0x00).
Body
0x2 20 / Little uint8[20] server_proof SRP6 Server proof.
0x16 4 / Little uint32 account_flag ACCOUNT_FLAG_GM = 0x00000001,
ACCOUNT_FLAG_TRIAL = 0x00000008,
ACCOUNT_FLAG_PROPASS = 0x00800000
Mangos statically sets this to PROPASS.
This field does not exist < BC (2.4.0).
0x20 4 / Little uint32 hardware_survey_id ID of a hardware survey that the client should perform.
Set to 0 to not use. Can safely be set to 0.
0x24 2 / Little uint16 unknown_flags Mangos describes as "some flags (AccountMsgAvailable = 0x01)" and statically sets to 0.

Size

For version ≤ Vanilla (1) if the result is not SUCCESS (0x00) the packet is 2 bytes. If it is SUCCESS the packet is 26 bytes.

For version ≥ BC (2) if the result is not SUCCESS (0x00) the packet is 4 bytes. If it is SUCCESS the packet is 38 bytes.

Example Packet

Below is complete packet sent from a Vanilla (1.12.1.5875) client. The values are explained as comments. This can be used for verifying packet parser implementations.

First a failed one

char bytes[] = {
0x01, // Opcode: CMD_AUTH_LOGON_PROOF
0x04 // Result: FAIL_UNKNOWN_ACCOUNT
};

Then a successful one

char bytes[] = {
0x01, // Opcode: CMD_AUTH_LOGON_PROOF
0x00, // Result: SUCCESS
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c,
0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, // Server proof
0xEF, 0xBE, 0xAD, 0xDE // Hardware Survey ID: 0xDEADBEEF
}