Lua Code - can you do?

Post Reply
icesteruk
Posts: 287
Joined: Sun Jan 20, 2013 9:16 pm

Lua Code - can you do?

Post 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..

User avatar
SlySven
Posts: 1023
Joined: Mon Mar 04, 2013 3:40 pm
Location: Deepest Wiltshire, UK
Discord: SlySven#2703

Re: Lua Code - can you do?

Post 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: }.

icesteruk
Posts: 287
Joined: Sun Jan 20, 2013 9:16 pm

Re: Lua Code - can you do?

Post 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?

User avatar
SlySven
Posts: 1023
Joined: Mon Mar 04, 2013 3:40 pm
Location: Deepest Wiltshire, UK
Discord: SlySven#2703

Re: Lua Code - can you do?

Post 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...

User avatar
Belgarath
Posts: 232
Joined: Fri Jul 26, 2013 7:19 am
Discord: macjabeth#7149

Re: Lua Code - can you do?

Post 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.

icesteruk
Posts: 287
Joined: Sun Jan 20, 2013 9:16 pm

Re: Lua Code - can you do?

Post 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

User avatar
Belgarath
Posts: 232
Joined: Fri Jul 26, 2013 7:19 am
Discord: macjabeth#7149

Re: Lua Code - can you do?

Post 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".

icesteruk
Posts: 287
Joined: Sun Jan 20, 2013 9:16 pm

Re: Lua Code - can you do?

Post by icesteruk »

isn't that for linux?

User avatar
SlySven
Posts: 1023
Joined: Mon Mar 04, 2013 3:40 pm
Location: Deepest Wiltshire, UK
Discord: SlySven#2703

Re: Lua Code - can you do?

Post by SlySven »

Never heard of it before but it looks like Lua so perhaps could work on platforms other than GNU/Linux...

Post Reply