Jump to content

encrypt lua scripts


Argon

Recommended Posts

I'm not familiar with lua but I know lua is a language which you must not compile (so like PHP) I know there is something from ZEND that allows you to encrypt your PHP scripts is there also something for lua which can encrypt your lua scripts and you can use them with mta? Becausse I was thinking about a gamemode and I would give it to everyone but I won't give my code to everyone (and so I can also build something in which allows me to block servers so they can't use the script anymore...)

Link to comment
Personally speaking i wouldn't run any script on a server without going through and inspecting it fully. I'm unaware of any encryption techniques, but I am sure that if you wanted to do so, people would be extremely hesitant to run it in the first place.

Yes that's true but whith lua you don't have the ability to for example edit files outside the mta directory or is it possible?

Link to comment

my concern would be more towards hidden functions that might make a player who enters a secret code super-powered or something like that. Its a problem I've seen in samp scripts, where the guy who wrote the script sneaks himself a little bit of an edge. open scripting can stop those dubious practices.

Link to comment
my concern would be more towards hidden functions that might make a player who enters a secret code super-powered or something like that. Its a problem I've seen in samp scripts, where the guy who wrote the script sneaks himself a little bit of an edge. open scripting can stop those dubious practices.

Well but I think there will be always a player who find out the scripter made such a thing and he report it to the server admin which just delete the script then and add a reaction on the page where you can download it... And the people who doesn't trust it can always don't run the script.

But for example if I create a script using SQL and I want that everyone uses my database so I can track game statics of a lot of servers like kills etc but then everyone know my database login and name :(

But this topic isn't about the fact if users trust me or they dont... But about the posibility to encrypt my lua scripts...

Link to comment
  • 2 weeks later...
But for example if I create a script using SQL and I want that everyone uses my database so I can track game statics of a lot of servers like kills etc but then everyone know my database login and name :(

Don't worry, you can still supply your script to everyone. MTA provides a server "registry" where server admins can store configuration such as login.

Even then, you could easilly provide a script which lacks the login details.

As for the issue of trust and people stealing your work (i know this isn't your problem, but for those who are wondering), the chances of someone ripping off your work and getting away with it are slim.

Link to comment
But for example if I create a script using SQL and I want that everyone uses my database so I can track game statics of a lot of servers like kills etc but then everyone know my database login and name :(

Don't worry, you can still supply your script to everyone. MTA provides a server "registry" where server admins can store configuration such as login.

Even then, you could easilly provide a script which lacks the login details.

As for the issue of trust and people stealing your work (i know this isn't your problem, but for those who are wondering), the chances of someone ripping off your work and getting away with it are slim.

You mean you can communicate to the MTA server and asking settings and use that settings?

And CRC how does it work I searched on wikipedia and on the dutch part it was uncomplete and the english part I don't understand really good. But is it with a kind of pluggin?

Link to comment
  • 2 months later...

Just making sure, the .lua isn't uploaded and saved to the clients when they connect right?(only the servers need the .lua files) So by not handing the script out I can be totally sure of it only being ran on my server.

Link to comment
There are also clientside scripts wich has to run with the clients to save serverload so you can't dissable client side scripts...

Yes you can. If client changes the script on his side it gets redownloaded..

So clients can alter the client side scripts?

Link to comment
There are also clientside scripts wich has to run with the clients to save serverload so you can't dissable client side scripts...

Yes you can. If client changes the script on his side it gets redownloaded..

So clients can alter the client side scripts?

They can, but there is no point in it since they get checked by the server, so if they do not match the original one they get redownloaded

Link to comment

So basically it's all a question of design? I mean if I have a very powerful server with a great connection and all, can I put all of the script server-side and allow clients to play it without downloading a client-side script?

Link to comment

Clientside scripts are seperated from serverside scripts, and as such, are optional. Clientside scripts are downloaded to clients and can be viewed, while serverside scripts are not downloaded.

Therefore, sensitive information should be left to be validated with the server and not the clients. This is what MTA's "registry" system is designed for, as i mentioned earlier. The registry provides an external source to retrieve and write information without actually modifying the script files. This means you could setup a script to read the "adminPassword" registry setting, and use that, rather than defining the password in the script itself. This is not only more secure, but means that the password is easily changed in the registry without having to modify the script itself.

Link to comment
client side scripts have some things server side do not...

Ok, but are these things critical for a gamemode to work or would it be possible to make a gamemode without a client-side? Just wondering.

Link to comment
  • 9 months later...
I'm not familiar with lua but I know lua is a language which you must not compile (so like PHP) I know there is something from ZEND that allows you to encrypt your PHP scripts is there also something for lua which can encrypt your lua scripts and you can use them with mta? Becausse I was thinking about a gamemode and I would give it to everyone but I won't give my code to everyone (and so I can also build something in which allows me to block servers so they can't use the script anymore...)

The notepad++ plugins let you encrypt it

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...