ScriptUO

Scripting Resources & Utilities => ScriptUO Application => General Discussion => Topic started by: Tidus on July 17, 2008, 01:40:22 PM

Title: Script Protecting by Password.
Post by: Tidus on July 17, 2008, 01:40:22 PM
i was just thinking.  Is there a way you think you could protect SUO scripts?  Say you make a script a certain way and you want it to be protected by password etc..  So that the person can't highlight all and right click it per say.  Not saying that no one should be able to steal other people's codes or anything, but just wondering.
Title: Re: Script Protecting by Password.
Post by: TrailMyx on July 17, 2008, 02:03:36 PM
I actually decided NOT to do anything like that.  Reason being that people could really exploit the unsuspecting script runner that way.  So anything in SUO will be open and text based.  I've actually refrained from using code-folding just due to it's ability to "hide" information.  I'll probably end up adding folding in only when I can be sure it won't be exploited.
Title: Re: Script Protecting by Password.
Post by: Tidus on July 17, 2008, 03:10:20 PM
that is why i was thinking if we could do it with SUO accepted scripts.  I've also thought about databases and whether you could make a program like SUO that  has that database that automatically uploads new scripts(posted in a certain area) into the program and so you have a menu button the you can click that has a list like healing bard etc which then brings to you to a choice of a script by Snow or C2 with instructions that will automatically run with no actual showing of the script.  Just curious on that thought too.  Sorry was a boring day at work :)
Title: Re: Script Protecting by Password.
Post by: uocode_man on July 28, 2008, 02:27:26 PM
i was just thinking.  Is there a way you think you could protect SUO scripts?  Say you make a script a certain way and you want it to be protected by password etc..  So that the person can't highlight all and right click it per say.  Not saying that no one should be able to steal other people's codes or anything, but just wondering.

I like that idea. being able to protect them with a password. quite nice indeed
Title: Re: Script Protecting by Password.
Post by: Xclio on July 29, 2008, 05:22:45 AM
That is an interesting idea.  though I fear it would be exploited to no end.  Maybe an Elite SUO feature in the future?
Title: Re: Script Protecting by Password.
Post by: Nicar on July 29, 2008, 07:48:02 AM
With as much as TM is putting into SUO, I'm sure there's going to be one version. But with the purpose, I like security, or do not use my script without permession (password to access code) but as TM stated, there are exploiters. Who exploit peoples trust, will give them a script, that will drop their stuff or something. I also want to make sure that the script isn't calling any commands on my computer, or any websites, so, I want to be able to look at the code. Also, scripts that load up with little to no set up? With instructions popping up, well, that's kind of, difficult. You would then have to put in other commands and a big documentary in the script itself, well, not too big. Usually instructions are in the thread posted or in the header of the script. Comments in code are meant to be read.

I get that you want to speed up the execution, hide the script. But this is more than buyer beware, it's scripter, know what you are about to run. Who knows, maybe in the middle of the script while gold farming, it calls the GM on you for using a script?

Know the code you're running, if you do not know anything about scripting, you are still a bit computer savvy for playing the game, finding the site, finding EUO, finding the scripts. It doesn't take long to do some ctrl + F (finds) to look for certain commands or phrases, or just words. Always try to run a script for the first time with noone around.
Title: Re: Script Protecting by Password.
Post by: TrailMyx on July 29, 2008, 07:56:37 AM
The only way to make this work is to take the script out of the scripters hands and locate it in a central location.  I've heard that the original verion of Winuo could work that way.  So the scripter just "dials up" the place where the script is hosted, download a protected copy (binary, compressed, encrypted) and can run it knowing the source to be reputable.  There's no real possibility of editing the local copy, but due to reputation you can rely on it working.  You'll never find a drop script written by TM (I only strip Cerveza nekkid), however you might not want to connect up to a site called "Dropz-yr_Warez".
Title: Re: Script Protecting by Password.
Post by: Quagmire on July 29, 2008, 08:04:01 AM
Only thing you could really do is like compile it with suo so runs on its own exe. which would be nice this prevents people from moding it, taking code and what not, but this feature has to be on approved scripts. There is no true way to get around exploiters and *bleep*. Just be careful and look over it, if you don't write your own. Recently i had to teach some Itemdropper kids that think they know what EUO and SUO are what EUo and SUO could really do. Put it this way made a simple call to a script that drops all items of the bank and char in trash can and screams dirty words..
Title: Re: Script Protecting by Password.
Post by: Tidus on July 31, 2008, 06:12:16 AM
Well if ran by a reputable host, being TM or Freddy i think this would work.  Because in order for it to get to a "updatable" place it would take their input.  Everytime you load it, it checks the server to see if there is a new file, if so then it downloads.  Even for SUO as it is.  If you didn't have to come to the site to check on an update everytime, instead the program automatically checks for you and replaces as needed would be nice.  I know that is alot of work TM.  Just looking at it from user side rather than creator side.  These are just things that might bring more of a base to SUO rather than EUO.

Also question on the SUO.  Does it need to be updated every time that UO Updates?
Title: Re: Script Protecting by Password.
Post by: Xclio on July 31, 2008, 08:42:34 AM
I think it will probably require an update once the run functionality is added back in but for the development aspect it shouldn't.
Title: Re: Script Protecting by Password.
Post by: TrailMyx on July 31, 2008, 12:25:40 PM

Also question on the SUO.  Does it need to be updated every time that UO Updates?

Yes, it will require the same kind of updates as EUO.  Memory locations change, so that'll require a revision.  I've thought about making this a patch, but I'm not sure I want to write the security code for making a patch server possible, while maintaining my own IP.
Title: Re: Script Protecting by Password.
Post by: Xclio on August 01, 2008, 04:31:35 AM
Yeah a patch would really rock but the security aspect would suck especially if you aren't using an off-site server to hold that information.  If you had a third party off site server to handle that and you just dealt with the file system on the server that would work but otherwise I would think it just becomes too much of a hassle.
Title: Re: Script Protecting by Password.
Post by: rana70 on August 01, 2008, 05:07:32 AM
I am sorry but I don't thing that this pretect by password is really a good idea.

Mostly it might be used to hide the fact that you stole a part of "your" script
from anyone else...

How ever ... I prefer to look thru scripts maybe to learn how other people
do something .. to see what it really does .. to tweak timing eg.....

When I use subs I give credit in the header .. and if someone
things one of my subs is usefull for hin/her .. it's ok for me...

so why spend any time on this kind of feature ...
Title: Re: Script Protecting by Password.
Post by: TrailMyx on August 01, 2008, 08:46:36 AM
I am sorry but I don't thing that this pretect by password is really a good idea.

Mostly it might be used to hide the fact that you stole a part of "your" script
from anyone else...

How ever ... I prefer to look thru scripts maybe to learn how other people
do something .. to see what it really does .. to tweak timing eg.....

When I use subs I give credit in the header .. and if someone
things one of my subs is usefull for hin/her .. it's ok for me...

so why spend any time on this kind of feature ...


I couldn't agree more.  ;)
Title: Re: Script Protecting by Password.
Post by: Xclio on August 01, 2008, 10:25:25 AM
I am sorry but I don't thing that this pretect by password is really a good idea.

Mostly it might be used to hide the fact that you stole a part of "your" script
from anyone else...

How ever ... I prefer to look thru scripts maybe to learn how other people
do something .. to see what it really does .. to tweak timing eg.....

When I use subs I give credit in the header .. and if someone
things one of my subs is usefull for hin/her .. it's ok for me...

so why spend any time on this kind of feature ...


I also agree totally, I personally love to find out that people thought that my scripting was good enough to utilize parts of it in their own scripts and such.  I did say above that it would be an interesting feature and it definitally would but I think that there are just entirely too many people out there that would abuse it and exploit it.  It is unfortunate that is somethign we need to worry about :(
Title: Re: Script Protecting by Password.
Post by: xiaoyu on August 23, 2008, 06:50:59 AM
The issue about script password protection have been talking on lot of script sites. In my opinion, the scripts we are writting here is like kind of software production, they spend time, energy and "brain" of the creaters, so the copyright should be protected. but all the scripts are for UO game, not for any commercial action, basicly we write script is just for fun, (at lease I do), so the password protection is not necessary. we just follow the rule which is always mark the reference of the script or part of script from others.
Title: Re: Script Protecting by Password.
Post by: Freddy on August 27, 2008, 10:03:48 PM
I've been working with script protection a lot in the last few weeks with a program of mine. An easy way to solve this without requiring a lot of program modification is to add an encryption method. Maybe allow the user to export as encrypted and they can choose a passphrase to decrypt. Saves the script in encrypted form in a text file and it solves the problem of having to create your own file container. Add a bit of code to detect if it is encrypted and ask the user for the passphrase upon load.

:D
Title: Re: Script Protecting by Password.
Post by: TrailMyx on August 27, 2008, 10:29:38 PM
True, but that goes back to the point where you want to have a script repo that's deemed "safe".  What you are working on is a good example of how a passkey could work.  However, any JoBlow having an encoded script is bad medicine unless it's vetted harmless and maintained by a reputable source.
Title: Re: Script Protecting by Password.
Post by: Freddy on August 27, 2008, 11:11:55 PM
Encryption shouldn't carry a negative connotation :D

I guess I should have explained myself more in my previous post.

You could export script as encrypted with a passphrase of your choice. In order for someone to run that script they must know the password. When the program loads the encrypted script it will ask the user for the password. If the password is correct, the program will spit the decrypted script into the text box like it would any other script. 
Title: Re: Script Protecting by Password.
Post by: TrailMyx on August 28, 2008, 05:52:43 AM
Well that's not really secure, just an annoyance really.  Since there's no public/private key arrangement and since anyone can "know" the password, then you aren't actually providing much security.  The only way to secure the script to be run by those who are "authorized" is to exchange private key information with a central database.  For what you suggest, it's much less work and you get compression out if it by zipping the script with a password.  ;)
Title: Re: Script Protecting by Password.
Post by: Tidus on August 28, 2008, 06:25:13 AM
Soon winuo will have something close to this feature.  So if anyone is interested keep a look out there.  Freddy has been doing a great job on it.
Title: Re: Script Protecting by Password.
Post by: TrailMyx on August 28, 2008, 06:47:17 AM
Soon winuo will have something close to this feature.  So if anyone is interested keep a look out there.  Freddy has been doing a great job on it.

Yes, that's what's exciting about freddy's work.  Since he'll be able to control the keys on both ends, then you can start talking security.
Title: Re: Script Protecting by Password.
Post by: TrailMyx on August 28, 2008, 06:53:56 AM
Slightly OT, but if anyone is looking to gain a good/fast working understanding of cryptography in this computer age, I highly recommend the book "Applied Crypography" by Bruce Schneier.  It's simply the best book I found so far and really aided me in the work I can't tell anyone here about.... ;)