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!

[Release] MUnique OpenMU ChatServer

Joined
Aug 6, 2005
Messages
550
Reaction score
296
Hello,
today I release a first version of the chat server as a result of my http://forum.ragezone.com/f508/chatserver-protocol-research-1127561/.
This is an open source alternative to the original ChatServer of Webzen which uses the OpenMU chat server code and connects to a 'classic' ExDB server.

Important (see also Readme):
To get this working correctly, the XOR32-key needs to match with your game server / game client. This key is usually used by the client to encrypt all data packets which are sent to the server. The chat server uses this key as well to decrypt incoming data packets.

It should at least work up until season 6 - I don't know how the encryption of C1/C2 changed on higher seasons. Some people got it working with IGCN Season 9, though.
It does probably not work correctly when you use the eDataServer - the sources I checked didn't implement the protocol like the ExDB-Server of Webzen. However, with the available documentation, it shouldn't be that hard to add :)


Source and Documentation:
Compiled Binaries:
Required .NET-Version: 4.6.1

If you find a bug (and you're sure it's one) or have suggestions for improvements please add an issue on GitHub :)
Of course, you can report me bugs etc. here as well, if you don't like to create a GitHub account.
 
Last edited:
Joined
Aug 6, 2005
Messages
550
Reaction score
296
Thanks for your feedback! At the moment I can't tell you what's going wrong. It seems like the server lacks some error handling... ;)
I added a new version (v0.1.1-alpha) which will log these errors with the required details (check binary link in first post).
 
Joined
Aug 29, 2011
Messages
512
Reaction score
33
It shows the two being online but does not open Chat.



2017-12-01 16:49:42,742 [INFO ] [ChatServer] - ChatServer started and ready
2017-12-01 16:49:42,745 [INFO ] [ExDbClient] - Connection to ExDB-Server established
2017-12-01 16:49:42,777 [INFO ] [ExDbClient] - Sent registration packet to ExDB-Server
2017-12-01 16:54:37,849 [ERROR] [MUnique.OpenMU.ChatServer.ChatServerListener] - Error during cleanup of unused rooms
System.Threading.SynchronizationLockException: O bloqueio está sendo descartado ainda em uso. Ele está sendo mantido por um thread e/ou tem waiters ativos aguardando para adquirir o bloqueio.
em System.Threading.ReaderWriterLockSlim.Dispose(Boolean disposing)
em MUnique.OpenMU.ChatServer.ChatRoomManager.OnChatRoomClosed(Object sender, ChatRoomClosedEventArgs eventArgs)
em MUnique.OpenMU.ChatServer.ChatRoom.Close()
em MUnique.OpenMU.ChatServer.ChatServerListener.ClientCleanupUnusedRooms(Object sender, ElapsedEventArgs e)
2017-12-01 17:02:03,731 [DEBUG] [MUnique.OpenMU.Network.PublicIpResolver] - Start Requesting public ip from
2017-12-01 17:02:04,387 [DEBUG] [MUnique.OpenMU.Network.PublicIpResolver] - Request of public ip answered with: 177.19.106.107
2017-12-01 17:02:04,395 [INFO ] [MUnique.OpenMU.ChatServer.ChatServerListener] - Begin starting
2017-12-01 17:02:04,398 [INFO ] [MUnique.OpenMU.ChatServer.ChatServerListener] - Chat client listener ready on port 55980.
2017-12-01 17:02:04,401 [INFO ] [MUnique.OpenMU.ChatServer.ChatServerListener] - Finished starting
2017-12-01 17:02:04,405 [INFO ] [ChatServer] - ChatServer started and ready
2017-12-01 17:02:04,408 [INFO ] [ExDbClient] - Connection to ExDB-Server established
2017-12-01 17:02:04,414 [DEBUG] [MUnique.OpenMU.Network.Connection] - Send (before encryption): C1 3A 00 02 AC DA 43 68 61 74 53 65 72 76 65 72 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
2017-12-01 17:02:04,417 [DEBUG] [MUnique.OpenMU.Network.Connection] - Send (after encryption): C1 3A 00 02 AC DA 43 68 61 74 53 65 72 76 65 72 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
2017-12-01 17:02:04,419 [INFO ] [ExDbClient] - Sent registration packet to ExDB-Server
2017-12-01 17:02:04,420 [DEBUG] [MUnique.OpenMU.Network.Connection] - Data received, length: 8
2017-12-01 17:02:04,430 [DEBUG] [MUnique.OpenMU.Network.Connection] - Packet received (before decryption): C1 08 00 01 00 00 00 00
2017-12-01 17:02:04,433 [DEBUG] [MUnique.OpenMU.Network.Connection] - Packet received (after decryption): C1 08 00 01 00 00 00 00
2017-12-01 17:03:25,553 [DEBUG] [MUnique.OpenMU.Network.Connection] - Data received, length: 32
2017-12-01 17:03:25,556 [DEBUG] [MUnique.OpenMU.Network.Connection] - Packet received (before decryption): C1 20 A0 41 44 4D 54 65 63 00 00 00 00 4D 55 54 65 63 00 00 00 00 00 0A 04 29 00 00 05 29 00 00
2017-12-01 17:03:25,559 [DEBUG] [MUnique.OpenMU.Network.Connection] - Packet received (after decryption): C1 20 A0 41 44 4D 54 65 63 00 00 00 00 4D 55 54 65 63 00 00 00 00 00 0A 04 29 00 00 05 29 00 00
2017-12-01 17:03:25,569 [DEBUG] [MUnique.OpenMU.ChatServer.ChatRoom] - Creating room 0
2017-12-01 17:03:25,573 [DEBUG] [ExDbClient] - Received request to create chat room for ADMTec and MUTec; Room-ID: 0
2017-12-01 17:03:25,578 [DEBUG] [ExDbClient] - Registered client ADMTec with index 0 and token 1634205696
2017-12-01 17:03:25,581 [DEBUG] [MUnique.OpenMU.Network.Connection] - Send (before encryption): C1 2C A0 01 00 00 41 44 4D 54 65 63 00 00 00 00 4D 55 54 65 63 00 00 00 00 00 00 00 00 00 CC CC 00 00 68 61 CC CC CC CC CC CC CC CC
2017-12-01 17:03:25,584 [DEBUG] [MUnique.OpenMU.Network.Connection] - Send (after encryption): C1 2C A0 01 00 00 41 44 4D 54 65 63 00 00 00 00 4D 55 54 65 63 00 00 00 00 00 00 00 00 00 CC CC 00 00 68 61 CC CC CC CC CC CC CC CC
2017-12-01 17:03:25,587 [DEBUG] [ExDbClient] - Registered client MUTec with index 1 and token 144375809
2017-12-01 17:03:25,591 [DEBUG] [MUnique.OpenMU.Network.Connection] - Send (before encryption): C1 2C A0 01 00 00 4D 55 54 65 63 00 00 00 00 00 41 44 4D 54 65 63 00 00 00 00 00 00 00 00 CC CC 01 00 9B 08 CC CC CC CC CC CC CC CC
2017-12-01 17:03:25,594 [DEBUG] [MUnique.OpenMU.Network.Connection] - Send (after encryption): C1 2C A0 01 00 00 4D 55 54 65 63 00 00 00 00 00 41 44 4D 54 65 63 00 00 00 00 00 00 00 00 CC CC 01 00 9B 08 CC CC CC CC CC CC CC CC
2017-12-01 17:03:59,402 [INFO ] [MUnique.OpenMU.ChatServer.ChatServerListener] - Cleaning up room 0
2017-12-01 17:03:59,406 [DEBUG] [MUnique.OpenMU.ChatServer.ChatRoom] - Disposing room 0...
2017-12-01 17:03:59,410 [DEBUG] [MUnique.OpenMU.ChatServer.ChatRoom] - Room 0 disposed.
2017-12-01 17:03:59,905 [DEBUG] [MUnique.OpenMU.Network.Connection] - Data received, length: 32
2017-12-01 17:03:59,909 [DEBUG] [MUnique.OpenMU.Network.Connection] - Packet received (before decryption): C1 20 A0 4D 55 54 65 63 00 00 00 00 00 41 44 4D 54 65 63 00 00 00 00 0A 05 29 00 00 04 29 00 00
2017-12-01 17:03:59,912 [DEBUG] [MUnique.OpenMU.Network.Connection] - Packet received (after decryption): C1 20 A0 4D 55 54 65 63 00 00 00 00 00 41 44 4D 54 65 63 00 00 00 00 0A 05 29 00 00 04 29 00 00
2017-12-01 17:03:59,915 [DEBUG] [MUnique.OpenMU.ChatServer.ChatRoom] - Creating room 1
2017-12-01 17:03:59,918 [DEBUG] [ExDbClient] - Received request to create chat room for MUTec and ADMTec; Room-ID: 1
2017-12-01 17:03:59,920 [DEBUG] [ExDbClient] - Registered client MUTec with index 0 and token 432275456
2017-12-01 17:03:59,923 [DEBUG] [MUnique.OpenMU.Network.Connection] - Send (before encryption): C1 2C A0 01 01 00 4D 55 54 65 63 00 00 00 00 00 41 44 4D 54 65 63 00 00 00 00 00 00 00 00 CC CC 00 00 C4 19 CC CC CC CC CC CC CC CC
2017-12-01 17:03:59,926 [DEBUG] [MUnique.OpenMU.Network.Connection] - Send (after encryption): C1 2C A0 01 01 00 4D 55 54 65 63 00 00 00 00 00 41 44 4D 54 65 63 00 00 00 00 00 00 00 00 CC CC 00 00 C4 19 CC CC CC CC CC CC CC CC
2017-12-01 17:03:59,930 [DEBUG] [ExDbClient] - Registered client ADMTec with index 1 and token 594345985
2017-12-01 17:03:59,933 [DEBUG] [MUnique.OpenMU.Network.Connection] - Send (before encryption): C1 2C A0 01 01 00 41 44 4D 54 65 63 00 00 00 00 4D 55 54 65 63 00 00 00 00 00 00 00 00 00 CC CC 01 00 6D 23 CC CC CC CC CC CC CC CC
2017-12-01 17:03:59,936 [DEBUG] [MUnique.OpenMU.Network.Connection] - Send (after encryption): C1 2C A0 01 01 00 41 44 4D 54 65 63 00 00 00 00 4D 55 54 65 63 00 00 00 00 00 00 00 00 00 CC CC 01 00 6D 23 CC CC CC CC CC CC CC CC
 
Joined
Aug 29, 2011
Messages
512
Reaction score
33
I do not know if I need to do some correction in the Zteam source but I tested it on the muserver Zteam season 8 and it did not work.






In MUEMU muserver does not even open the chat screen I do not know if the Xor32Kays are certain to work with it. Could someone please give me the Xor Key of the muemu ??
 
Last edited:
Joined
Aug 6, 2005
Messages
550
Reaction score
296
Well, I don't know if it would work at season 8. Which packet encryption (S->C, C1 type) does it use? Already with packet twister or just the XOR32 key?
If packet twister, then it doesn't work yet.
 
Joined
Jun 26, 2007
Messages
93
Reaction score
10
Strangely, it does not convey the character's name completely, for which EXDB is created, duplicates the characters in the Characters table with any symbols.

I use different versions of servers mu online, screenshots below with a duplicate.
nevS - [Release] MUnique OpenMU ChatServer - RaGEZONE Forums


nevS - [Release] MUnique OpenMU ChatServer - RaGEZONE Forums
 
Last edited:
Joined
Aug 6, 2005
Messages
550
Reaction score
296
Strangely, it does not convey the character's name completely, for which EXDB is created, duplicates the characters in the Characters table with any symbols.
Are you using an non-english client/server and character names with special symbols?
Maybe it's an encoding issue... currently the server just uses UTF-8 character encoding.
 
Joined
Jun 12, 2005
Messages
744
Reaction score
69
Hi, i'm using s6e3 and trying to capture packages using these guide http://forum.ragezone.com/f508/munique-openmu-source-server-project-1141294/#post8838707 so i can find xor keys but when i'm clicking to "chat" in detaserver i get erro "error-L1: ChatServer not
found.
For capture packages i use wpe pro.

Some pictures:




Can anyone help?
 
Last edited:
Joined
Aug 29, 2011
Messages
512
Reaction score
33
If it's using SimpleModulus and Xor32, there is a chance... otherwise not ;)

Where can I find xorkey in IGCN source? and what would SimpleModulus be?


I researched and found this, would it be the xrokey ??

PHP:
unsigned char XorTable[10]={0xA1, 0xB2, 0xAA, 0x12, 0x23, 0xF1, 0xF3, 0xD3, 0x78, 0x02}; // For some reason this is 16






PHP:
bool XorData(int iStart, int iEnd, int iDir)	// Good
	{
		if ( iStart < iEnd  )
		{
			g_Log.AddC(TColor::Red,  "CStreamPacketEngine XorData Error %d,%d", iStart, iEnd);
			return false;
		}

		unsigned char byXorFilter[32];

		byXorFilter[0] = 0xAB;
		byXorFilter[1] = 0x11;
		byXorFilter[2] = 0xCD;
		byXorFilter[3] = 0xFE;
		byXorFilter[4] = 0x18;
		byXorFilter[5] = 0x23;
		byXorFilter[6] = 0xC5;
		byXorFilter[7] = 0xA3;
		byXorFilter[8] = 0xCA;
		byXorFilter[9] = 0x33;
		byXorFilter[10] = 0xC1;
		byXorFilter[11] = 0xCC;
		byXorFilter[12] = 0x66;
		byXorFilter[13] = 0x67;
		byXorFilter[14] = 0x21;
		byXorFilter[15] = 0xF3;
		byXorFilter[16] = 0x32;
		byXorFilter[17] = 0x12;
		byXorFilter[18] = 0x15;
		byXorFilter[19] = 0x35;
		byXorFilter[20] = 0x29;
		byXorFilter[21] = 0xFF;
		byXorFilter[22] = 0xFE;
		byXorFilter[23] = 0x1D;
		byXorFilter[24] = 0x44;
		byXorFilter[25] = 0xEF;
		byXorFilter[26] = 0xCD;
		byXorFilter[27] = 0x41;
		byXorFilter[28] = 0x26;
		byXorFilter[29] = 0x3C;
		byXorFilter[30] = 0x4E;
		byXorFilter[31] = 0x4D;

		for ( int i = iStart ; i != iEnd ; i+=iDir )
		{
			this->m_byBuffer[i] ^= this->m_byBuffer[i-1] ^ byXorFilter[ i%32 ];
		}
		return true;
	}

public:






PHP:
BOOL ExtractPacket(void* pTar)	// Good
	{
		WORD wSize;
		BYTE byXorFilter[32];

		BYTE byTemp[2048];

		

		switch ( this->m_byBuffer[0] )
		{
			case 0xC1:
			case 0xC3:
				wSize = this->m_byBuffer[1];
				break;

			case 0xC2:
			case 0xC4:
				wSize = this->m_byBuffer[1] * 256 + this->m_byBuffer[2];
				break;

			default:
				return true;
				break;
		}

		if ( this->m_wSize < wSize )
		{
			return 2;
		}

		byXorFilter[0] = 0xAB;
		byXorFilter[1] = 0x11;
		byXorFilter[2] = 0xCD;
		byXorFilter[3] = 0xFE;
		byXorFilter[4] = 0x18;
		byXorFilter[5] = 0x23;
		byXorFilter[6] = 0xC5;
		byXorFilter[7] = 0xA3;
		byXorFilter[8] = 0xCA;
		byXorFilter[9] = 0x33;
		byXorFilter[10] = 0xC1;
		byXorFilter[11] = 0xCC;
		byXorFilter[12] = 0x66;
		byXorFilter[13] = 0x67;
		byXorFilter[14] = 0x21;
		byXorFilter[15] = 0xF3;
		byXorFilter[16] = 0x32;
		byXorFilter[17] = 0x12;
		byXorFilter[18] = 0x15;
		byXorFilter[19] = 0x35;
		byXorFilter[20] = 0x29;
		byXorFilter[21] = 0xFF;
		byXorFilter[22] = 0xFE;
		byXorFilter[23] = 0x1D;
		byXorFilter[24] = 0x44;
		byXorFilter[25] = 0xEF;
		byXorFilter[26] = 0xCD;
		byXorFilter[27] = 0x41;
		byXorFilter[28] = 0x26;
		byXorFilter[29] = 0x3C;
		byXorFilter[30] = 0x4E;
		byXorFilter[31] = 0x4D;

#ifndef EMU_NOCRYPT
 
Last edited:
Joined
Aug 6, 2005
Messages
550
Reaction score
296
It's the byXorFilter :thumbup1:

And I think that's also the default one ;)

I think the igcn also just uses SimpleModulus as the PacketTwister usage was commented out. I just don't know if they use default keys, too.
Then there is also the question if the ExDb Server is using the same protocol... ;)
 
Back
Top