Skip to content

Packet Flow Client

Joseph W Becher edited this page Nov 28, 2017 · 5 revisions

Login

cNPSLoginAPI::NPSUserLogin -> Is the connection the Login port

It's called in INET_LogOn.

tsAsyncLoginInfo * pInfo = (tsAsyncLoginInfo*)data;

The packet sent to the Login port is a _NPS_UserStatus

typedef struct _NPS_UserStatus
{
	bool						isBan;
	bool						isGagged;
	NPS_CUSTOMERID	customerId;
	char						sessionKeyStr[NPS_SESSION_KEY_LEN];
	int							sessionKeyLen;
	void *					sessionKey;
} NPS_UserStatus;

An example looks like this

[05 01] [01 3e] [01] [01] [00 00] [00 00] [01 3e] [00 22] [64 33 
31 36 63 64 32 64 64 36 62 66 38 37 30 38 39 33 
64 66 62 61 61 66 31 37 66 39 36 35 38 38 34 65]
[00 00 01 00] [35 35 41 44 38 41 32 37 31 43 44 37
45 46 37 36 35 33 46 43 44 38 35 46 44 31 32 42 
46 45 39 39 31 42 32 33 39 38 37 42 36 32 34 43 
44 35 36 36 41 46 32 33 46 43 38 32 38 30 42 34 
39 38 45 33 30 34 32 45 45 38 45 35 31 37 45 41
38 35 39 43 41 46 32 37 42 39 38 32 31 45 31 34 
45 30 41 37 33 45 38 34 46 35 42 38 32 44 46 45 
42 43 37 34 45 33 36 35 46 45 36 36 33 36 46 32 
34 39 43 42 45 42 30 45 39 32 33 38 41 39 44 42
30 41 32 45 41 39 38 38 30 31 42 45 30 30 30 46
39 42 31 31 37 41 30 38 35 31 46 37 36 34 37 46 
45 33 31 30 34 34 44 35 43 43 43 38 46 31 41 44
30 37 45 35 37 34 34 34 41 35 46 41 45 30 38 31 
36 30 30 39 38 36 46 43 45 44 43 43 39 32 36 41
43 43 35 41 38 44 41 46 35 36 37 31 31 36 37 33
46 39 39 37 35 33 44 34 37 41 45 44 33 46 46 44
37 38 36 33] [00 04] [32 31 37 36] fe a3 1c 19
NPSSTATUS status = m_NPSLoginAPI->NPSUserLogin(
  pInfo->userName, 
  pInfo->password, 
  m_AuthServiceId, 
  pInfo->crc, 
  (NPS_UserStatus &)m_UserStatus,
  pInfo->errTxt,
  pInfo->errURL,
  npsLogin_IdleCallback,
  this
);

Lobby

cNPSAPI::NPSConnectToServer -> Is the connection to the Lobby port

It is an NPS_LoginInfo packet in MessageTypes

Example packet:

01 00  [00 9c]  [00 00 00 02]  [00 00 00 0d] [44 6f 63 74 
6f 72 20 42 72 6f 77 6e 00] [00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00] [00 00 00 01] 00 00 00
00 [00 00 00 08] [34 2e 35 2e 30 2e 30 00] 00 00 00 
09 [63 68 6f 6f 63 68 6f 6f 00] 00 00 00 0e [31 39
32 2e 31 36 38 2e 31 2e 31 31 32 00] 06 92 51 e7 
f9 aa 66 b3 1a 3b 9b ed f1 ec cf 6a

MCOTS

An example packet looks like this

3100544f4d430100000000b601010000000200000000000000000000000000000000446f63746f722042726f776e0071170000
Clone this wiki locally