Edit on GitHub

LoginService Client Login Packet

Summary

This packet is sent by the PangYa client when the user clicks the 'Login' button. Upon clicking login, the client opens a TCP connection to the LoginService, performs the protocol handshake, sends this message, and then awaits a reply from the server.

In hsreina/pangya-server, the packet ID is TCLPID.PLAYER_LOGIN.

See Also: LoginService Server 0x0001 Login Packet

Structure

loginservice_client_0001_login

Name Type Summary
username pstring Username, as entered by the user in the Login dialog.
password pstring Password, as entered by the user in the Login dialog. In some releases, such as the TH release, this is sent as plaintext, whereas in others, it is sent as an MD5 hash.
padding bytes A few padding bytes. In the US release, this is 17 bytes of zeros. In the TH release, this is 18 bytes, and is a static pattern on every login. It is unclear what the function of this is. Note that the padding does not improve the obfuscation. In the US release, because this is zeroed, the last four characters of the MD5 sum will appear unobfuscated in the ciphertext, because they will be XOR'd with the zeros. The server does not seem to actually read these bytes and any pattern of bits will be accepted.

Definition

meta:
  id: loginservice_client_0001_login
  title: LoginService Client Login Packet
  encoding: ASCII
  endian: le
  imports:
    - ../../common/pstring
seq:
  - id: username
    type: pstring
  - id: password
    type: pstring
  - id: padding
    size-eos: true

Examples

Agent: GB.R7.852.00
00000000 00000010 00000020 00000030
01 00 04 00 6a 6f 68 6e 20 00 30 39 38 46 36 42 43 44 34 36 32 31 44 33 37 33 43 41 44 45 34 45 38 33 32 36 32 37 42 34 46 36 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
....john .098F6B CD4621D373CADE4E 832627B4F6...... ...........