-
Notifications
You must be signed in to change notification settings - Fork 13
Cmd_UserAuth
GigaToni edited this page Jul 14, 2017
·
5 revisions
The first packet the auth server is receiving is the Cmd_UserAuth
packet.
This packet contains information about the user that is trying to log-in.
- The first 4-Bytes are an int containing the protocol version the client is talking in
- It follows by 80 bytes/chars of data for the username (UNICODE! So 40-Bytes * 2)
- Then the password follows (ASCII! Null-terminated!)
- At the end are 62-Bytes that are currently unknown
Answer Packets (In order):
000000: 09 28 00 00 61 00 64 00 6D 00 69 00 6E 00 00 00 · ( · · a · d · m · i · n · · ·
000016: 00 00 80 3F 00 00 00 00 00 00 00 00 00 00 80 3F · · · ? · · · · · · · · · · · ?
000032: 00 00 00 00 00 00 00 00 00 00 80 3F 00 00 00 00 · · · · · · · · · · · ? · · · ·
000048: 00 00 00 00 00 00 80 3F 00 00 00 00 00 00 00 00 · · · · · · · ? · · · · · · · ·
000064: 00 00 80 3F 00 00 00 00 00 00 00 00 00 00 80 3F · · · ? · · · · · · · · · · · ?
000080: 00 00 00 00 61 64 6D 69 6E 00 00 00 00 00 00 00 · · · · a d m i n · · · · · · ·
000096: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 · · · · · · · · · · · · · · · ·
000112: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 · · · · · · · · · · · · · · · ·
000128: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 · · · · · · · · · · · · · · · ·
000144: 00 00 00 00 47 7E 10 00 · · · · G · · ·
/* 2364 */
struct __cppobj __unaligned __declspec(align(2)) BS_PktUserAuth : BS_PktBody
{
unsigned int m_Version;
wchar_t m_ID[40];
char m_PW[64];
};
*(_DWORD *)(lpBuffer + 2) >= (unsigned int)BS_Global::AuthProtocolVersion
typedef struct
{
unsigned int protocolVersion;
char username[80];
string password;
char unknown1[62];
} UserAuth;
public class UserAuthPacket
{
public readonly int ProtocolVersion;
public readonly string Username;
public readonly string Password;
public UserAuthPacket(Packet packet)
{
ProtocolVersion = packet.Reader.ReadInt32();
Username = packet.Reader.ReadUnicodeStatic(40);
Password = packet.Reader.ReadAscii();
Password = Password.Substring(0, Password.Length - 1);
}
}
DCNC Copyright ©️ 2017 GigaToni
- Home
- Cmd_UserAuth (20)
- Cmd_ServerList (23)
- Cmd_UserAuthAck (22)
- Cmd_ServerMessage (24)
- Cmd_ServerMessageAck (25)
- Home
- Cmd_AreaChat (571)
- Cmd_AreaChatAck (572)
- Cmd_AreaStatus (682)
- Cmd_AreaStatusAck (683)
- Cmd_EnterArea (562)
- Cmd_EnterAreaAck (563)
- Cmd_UdpTimeSync (540)
- Cmd_UdpTimeSyncAck (540)