|
||
|
|||||||
| Custom Script Release Archive This is a pre-script database archive of what our users had released. |
|
|
Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Forum Novice
Join Date: Sep 2002
Posts: 106
|
This script will allow you to support unmodified clients.
A README file is included in the zip and also an utility to automatically extract the encryption keys from a client. The script and the program are released under the GPL. No core modifications are required yet. But because of an upcoming change in the official core (PacketEncoder will be changed from a static to an instance member), i am planning to modify the script accordingly and make the 2-line change to the core public. (Since it will improve the performance significantly). Currently there is only one issue known to me: Encryption contexts will not be cleaned up correctly if a NetState is disconnected. There is no reliable callback for a disconnecting socket, so it's only possible with some sort of manual garbage collection. It is highly likely though, that certain Contexts will be reused since i use the OS Socket handle as the key to identify the context. This issue will resolve itself with the next version of the core or the 2 line core mod mentioned above. NOTE ON VERSION 2.0: I added the encryption keys for clients 3.0.5 trough 5.0.1 to the configuration. If you find any errors please report them here. Version 2 requires you to modify your core if you are using RunUO 1.0. Information on how this can be done and also a precompiled version of RunUO 1.0 with the change can be found here: Making NetState.PacketEncoder an instance member instead of a static class member. The change allows the encryption to store its context information directly with the NetState instead of a Hashtable. That increases performance and also removes the problem of cleaning up the hashtable when a NetState disconnects. The change has been accepted into the next official RunUO version. Version 2.0 of this script should work with an unmodded RunUO 2.0 once it's out. NOTE ON VERSION 2.1: A bug with UOGateway stat request packets and the remote admin interface has been fixed. NOTE ON VERSION 2.2: Added encryption keys for client 5.0.2. cu, darkstorm Last edited by darkstorm; 04-30-2006 at 05:29 AM. |
|
|
|
|
#7 (permalink) |
|
Forum Novice
Join Date: Sep 2002
Posts: 106
|
Oh what i forgot to clear up:
This does not remove support for unencrypted clients. It just adds support for encrypted ones. If you dont want unencrypted clients with this system, you can disable them in the Configuration. |
|
|
|
|
#9 (permalink) | |
|
Forum Novice
Join Date: Sep 2002
Posts: 106
|
Quote:
|
|
|
|
|
|
#10 (permalink) |
|
Forum Novice
Join Date: Sep 2002
Posts: 106
|
Updated the script to 2.0:
- Included encryption keys for clients 3.0.5 to 5.0.1 - Removed the Hashtable for encryption contexts - Now requires a 2-line modification to the core: http://www.runuo.com/forum/showthread.php?p=463154 (A precompiled version is included there) If you don't want to modify your core, use version 1.0 (You can copy the Configuration.cs from 2.0 over if you want more encryption keys). I highly recommend the modification though, since it improves performance and reduces memory usage. Please note that the core change has been accepted into the next release of RunUO, so the modification will only be neccesary until the next version of RunUO has been released. |
|
|
|
|
#12 (permalink) |
|
Join Date: Jun 2004
Age: 22
Posts: 173
|
Awesome job indeed ;D
__________________
Treasures of Tokuno 1.1 |
|
|
|
|
#13 (permalink) |
|
Join Date: Jun 2005
Posts: 4
|
great work darkstorm.
I may have found a bug though. in the Encryption.DecodeIncomingPacket method, when the very first data comes, you're getting the seed out of it. So you dequeue everything from the temp bytequeue, get the seed, but then you do not re-enqueue the rest of the data. I.e. if the seed comes bundled with the first packet, the packet could get forgotten. Maybe there are other mechanisms that would hinder that, but in this particular method it's wrong I think... so I think a line like this should be added m_Buffer.Enqueue(m_Peek, 4, m_Peek.Length-4); (Encryption.cs, line 135) ...or maybe just the first 4 bytes should be dequeued in the first place. |
|
|
|
|
#14 (permalink) |
|
Forum Expert
|
Hmm, Im gonna show some ignorance here. But I generally dont know something so im gonna ask.
I dont get the whole client encryption thing. What is it? I see this script released and an immediate great response, even Ryan's there. I dont mean to sound like a dick but "whats the big deal" I hereby permit people to flame me lol |
|
|
|
|
#15 (permalink) | |
|
Forum Expert
|
Quote:
So to play on an exact osi clone without any custom graphics (mobs, statics, items, hues, multis) you just need to provide a download to a modified login.cfg (which is generally smaller than 200 bytes). That relieves new gamers out of the difficult process in setting up programs like UOG or Razor or UO Rice. (No need to tell them to use this and that and giving out links to the programs, and I personally know how much problems you can have explaining a new player how to do make it work). Please note that UO Gateway and Razor provide other functionality besides encryption removing, but not everyone uses them. |
|
|
|
|
|
#16 (permalink) | |
|
Forum Novice
Join Date: Sep 2002
Posts: 106
|
Quote:
|
|
|
|
|
|
#17 (permalink) | |
|
Forum Novice
Join Date: Sep 2002
Posts: 106
|
Quote:
|
|
|
|
|
|
#18 (permalink) |
|
Forum Novice
|
I found a problem with that script...
The remote admin not work with that script installed... This is a very good script I like to use this, but I need remote admin for the server connection... there are any solution? :P The probelm is these lines: Code:
// If it's still not initialized, copy the data back to the queue and wait for more
// if (m_Encryption == null)
// {
// m_Buffer.Enqueue(buffer, packetOffset, packetLength);
// length -= packetLength ;
// return;
// }
|
|
|
|
|
#19 (permalink) |
|
Forum Novice
Join Date: Mar 2004
Location: Germany
Age: 23
Posts: 301
|
Well the RemoteAdmin issue could be a problem of the RemoteAdmin client (assuming you are talking about my submission in the third party forum). I'm currently sending the 4 byte integer (big-endian ofcourse) "1" (or in hex: 01 00 00 00) which was basicly meant as dummy packet so the server let me in
Until now that didn't matter, as the seed was not really checked. Now that it is checked (and even used) I will most likely have to change this. So here is my question: what would be a valid seed? |
|
|
|
|
#21 (permalink) | |
|
Forum Novice
Join Date: Sep 2002
Posts: 106
|
Quote:
*edit* Argh ok i have to revert my statement. What exactly is the difference between the original client and the remote admin client? |
|
|
|
|
|
#22 (permalink) |
|
Forum Novice
Join Date: Sep 2002
Posts: 106
|
Resolved the remote admin problem in version 2.1.
I will leave version 1.0 as it is because that is meant for "demonstration" purposes. Any production shard should use the coremod and version 2.1. *edit* decided against leaving version 1.0 as it is. released version 1.1 which also includes the remote admin fix. |
|
|
|
|
#24 (permalink) | |
|
Forum Novice
Join Date: Sep 2002
Posts: 106
|
Quote:
As posted above that fixed it for me. |
|
|
|
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|