Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

ChatServer Protocol Research

Don't be afraid to ask!
Loyal Member
Joined
Jun 2, 2012
Messages
1,454
Reaction score
252
navossoc: SimpleModulus is not used by the ChatServer at all - everything uses C1 or C2-packets.

A little update:
After I found everything out about the communication between game client and chat server, I examined what happens in its log when I send stuff the original chat server due port 55906 and 55907. The chat server opens this ports and waits for connections.

Port 55907 just seems to be some port to check if you can connect to the chat server. It processes no packet and sends nothing back, just prints some messages about "port check" to the log.

Port 55906 is responsible to receive chat room creations from ExDB-Server, and returns ticket and room ids back. I iterated every C1 packet type from 00 to FF and found reactions in the logs with A0 and A1 packet types.
A0 is used to create a chat room and registering the clients.
Example for A0:
I sent C1 16 A0 41 42 43 44 45 46 47 48 49 4A 50 51 52 53 54 55 56 57 58 59
It contains the first and second client name after A0 (each 10 bytes).
The chat server then returns two packets, one for each client with its index and ticket
Code:
         s  |rid| |-----client name-----------| |---------other client name-| |------???------| |-ticket--| |--------???----------|
C1 2C A0 01 00 00 41 42 43 44 45 46 47 48 49 4A 50 51 52 53 54 55 56 57 58 59 00 00 00 00 CC CC [B]00 00 11 04[/B] CC CC CC CC 00 CC CC CC
C1 2C A0 01 00 00 50 51 52 53 54 55 56 57 58 59 41 42 43 44 45 46 47 48 49 4A 00 00 00 00 CC CC [B]01 00 BB 05[/B] CC CC CC CC 01 CC CC CC
In the log you see two tickets; 6822976 for ABC... and 96141313 for PQR...
For example, to get the ticket of the second packet: 01 00 BB 05 -> 0x05BB0001 ---[hex to decimal]--> 96141313
What seems crazy is, that the ticket contains the index as well, and in the 4th last byte the index is there as well. But as you will see later, the 4th last byte is not useful.
So, the chat server creates just 2 random bytes for the tickets - not very secure ;)

Then there is only one packet type left: A1. It's used to register additional clients to an existing chat room. Not many people know that you can invite additional players to a chat room ;)
Example: C1 10 A1 00 00 00 61 62 63 64 65 66 67 68 69 6F
Index 4 and 5 is the room id, the rest behind is the client name.
The chat server answers this with the same packets as above (ticket 96862210):
C1 2C A0 01 00 00 61 62 63 64 65 66 67 68 69 6F CC CC CC CC CC CC CC CC CC CC 53 54 55 56 CC CC 02 00 C6 05 CC CC CC CC 57 CC CC CC

The main part of my chat server which speaks with the game clients is already fully working, and the part about registering clients is working internally within my other game server architecture.
As a spin-off project I could implement the listener which is responsible for the communication with the ExDB-Server, so it would be a full chat server which could replace the original one of Webzen.
I guess I will release a first version soon :)

Lol, nice work, I have started to create my own chatserver but I stopped bcz too much work. I am happy to read this thread, because this feature of the game I think really really important.

"Then there is only one packet type left: A1. It's used to register additional clients to an existing chat room. Not many people know that you can invite additional players to a chat room ;)"

You are right, but its bcz on the 90% of the muservers chatserver totally not or just half working.... So nobobody know this feature!

Keep going.
 
Joined
Aug 6, 2005
Messages
550
Reaction score
296
Found out how the chat server calculates the ticket.
First two bytes seems to be a client index over all connected clients, maximum 5000.
Next two bytes is a random number between 1000 and 1999 (lol).
I guess the ExDB-Server finds out by the order of incoming packet which client gets which index (ix) in a room. I wonder if it's relevant and required for the game client anyway.
 
Last edited:
Back
Top