Page 1 of 1

Lua Code - can you do?

Posted: Wed Dec 17, 2014 4:44 pm
by icesteruk
in Lua can you make it so your system only runs for certain usernames?

Or, can you make the system check a website database of usernames before downloading the variables?

I'm not the best with connecting mudlet to URL etc so its why I thought to ask here..

Re: Lua Code - can you do?

Posted: Sun Dec 28, 2014 5:57 pm
by SlySven
Which OS are you using? Mudlet stores the profiles' data in a sub-directory of the users' home directory - so if those are secure against other users of the system being able to read them - and how you do that is slightly OS specific - then other users will not be able to read you data. This can be important in that the login credentials for the Muds you play {login name and password included} are stored - unencrypted - in files in the sub-directories of the profiles directory beneath what the lua getMudletHomeDir() returns {unless you have a user-name containing non-ASCII characters, which is permissible on later Windows Platforms but is very definitely non-standard but achievable with some fiddling on some GNU/Linux platforms (Debian's adduser(8) is NOT your friend if you want to try this) - in those cases the current handling of non-ASCII characters by the lua subsystem is, ahem, broken :geek: }.

Re: Lua Code - can you do?

Posted: Fri Jan 02, 2015 1:12 am
by icesteruk
I didnt mean system as in OS i meant system as in 'package'

I normally sell/give my package out but seems others are giving it out also but I want to limit it to certain people only..

Wondering if you can do this in Lua?

Re: Lua Code - can you do?

Posted: Sun Jan 04, 2015 7:37 pm
by SlySven
As far as I understand it, your average lua interpreter can either take in human readable script files or compiled versions that are readable only by the interpreter. So if you wanted to distribute something that you could prevent mortals from reading and copying you'd have to use the latter as a starting point I think. How that would play with Mudlet I would not like to speculate and your distribution channels would obviously be different. I am aware that some "stars in the Mudlet firmament" do "sell" things so it might be instructive to see what distribution methodologies they adopt...

Re: Lua Code - can you do?

Posted: Mon Jan 05, 2015 7:51 am
by Belgarath
You could use loadstring to get a chunk then string.dump and then apply some transformations like cycling the bytes, swapping segments, etc. Transformations must be reversible. Then save to a file.

I'd personally use something sufficiently simple to deter the majority of curious users as you likely stand no chance against a dedicated hacker anyway.

Re: Lua Code - can you do?

Posted: Tue Jan 06, 2015 1:21 am
by icesteruk
Belgarath wrote:You could use loadstring to get a chunk then string.dump and then apply some transformations like cycling the bytes, swapping segments, etc. Transformations must be reversible. Then save to a file.

I'd personally use something sufficiently simple to deter the majority of curious users as you likely stand no chance against a dedicated hacker anyway.
Its not a dedicated hacker. Just idiots wanting pieces of my system as they suck at coding and want to rip it off ...

Thanks I'll look into it

Re: Lua Code - can you do?

Posted: Tue Jan 06, 2015 1:52 am
by Belgarath
icesteruk wrote:Its not a dedicated hacker. Just idiots wanting pieces of my system as they suck at coding and want to rip it off ...

Thanks I'll look into it
You may want to look at Squish. It is used by some of those "stars in the Mudlet firmament".

Re: Lua Code - can you do?

Posted: Tue Jan 06, 2015 4:11 pm
by icesteruk
isn't that for linux?

Re: Lua Code - can you do?

Posted: Fri Jan 09, 2015 12:33 am
by SlySven
Never heard of it before but it looks like Lua so perhaps could work on platforms other than GNU/Linux...