RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

GameServer encryption & client


Hello, I finding information or some help about client and gameserver encryption.
1st question is that Client 6.xx and 7.xx use TwoFish encrypt right? Because if I used in extern program for UO who was wrote before 6 years for client 2.xx than if I used client with 2.xx encryption (game works fine!) but if I use encryption program don't shows item in backpack, on ground, casting spells -> crashclient, ect. How is it possible? What's wrong?
2nd question is how I can watch packet from server which incoming to client?
And If I log into game witch client more 6.0.7.x program crashed, because different login packet.
And buffer lenght in this client is same as old client or not? Or just packet are different?

Thanks you for Informaation or help with this. (I would like to this program rewrite for new client) (Sorry for my bad english)

Where is a problem? With old client (client to working) with
sending this error

Phoenix.Communication.SocketException: Part predefined messages are not supported.
  at Phoenix.Communication.UltimaSocket.Send(Int64 socket, Byte[] buff, Int32 len, Int32 flags) in e:\Phoenix_Source\src\Phoenix\Communication\UltimaSocket.cs:line 316
  at Phoenix.Communication.CommunicationManager.OnSend(Int64 s, Byte[] buff, Int32 len, Int32 flags) in e:\Phoenix_Source\src\Phoenix\Communication\CommunicationManager.cs:line 186
  at ComInterop.ComObject.ComInterop.IComObject.OnSend(Int64 socket, Byte[] buff, Int32 len, Int32 flags) in e:\Phoenix_Source\src\Phoenix\ComInterop\ComObject.cs:line 142
Phoenix.Communication.LoginSocket dump:
Socket: 1816 Address:,2593
Seed: 0
Predefined messages pending: True
Client encryption: UOEncryption.Encryption object using No encryption for encryption and No encryption for decryption.
Server encryption: UOEncryption.Encryption object using No encryption for encryption and No encryption for decryption.
Phoenix->Client: No messages pending.
Phoenix->Server: No messages pending.
Current data:
Packet id: 0xEF; 1 bytes:
EF                                                                        ï

public int Send(long socket, byte[] buff, int len, int flags)

            lock (CommunicationManager.SyncRoot)
                if (socket != this.socket) throw new ArgumentException("socket");

                int buffLen = len;

                // Process predefined messages
                while (len > 0 && predefinedClientMsgs != null && clientMsgIndex < predefinedClientMsgs.Length)
                    if (fromClientBuffer != null) throw new SocketException("Trying to read predefined message but there are unprocessed data in buffer.", this, buff);

                    int msgLen = predefinedClientMsgs[clientMsgIndex];
                    int newLen = len - msgLen;

                    if (newLen < 0)
                        throw new SocketException("Part predefined messages are not supported.", this, buff);

                    byte[] msg = new byte[msgLen];
                    Array.Copy(buff, msg, msgLen);

                    byte[] newBuf = new byte[newLen];
                    Array.Copy(buff, msgLen, newBuf, 0, newLen);
                    len = newLen;

                    byte[] decryptedBuffer = clientEncryption.Decrypt(msg, msgLen);
                    ProcessMessages(decryptedBuffer, false);

                if (len > 0)
                    byte[] decryptedBuffer = clientEncryption.Decrypt(buff, len);
                    ProcessMessages(decryptedBuffer, false);


                return buffLen;