Lua encryption

Im coding alot of stuff in lua but i hate rippers is there anyway to encrypt the .lua with out going and redoing 80% of the script?

wel, i gues you could make your encrytion out of it, but you wil need 1 lua file that decrypte’s it
so other then that, nope

as far as im working on:

i code a bit in an .exe, it encryts it.
i place it in the data folder, the lua file reads it and decrypts it
thats one of the things i made:P and i love it to make those things clientside, toobad you need to send the deencrypt also to the cclient wich kills the purpes,

so im still working on that part, but else then that. beg garry that after you joined a game it remoevs the lua or something

The answer is generally no. If you dont want people stealing your stuff then rename your addons/gamemodes folder or move the stuff you want secret to your documents when your not using it.

If you’re determined to go with encryption, (gmt2001’s suggestion is easier) then have the Lua file that decodes the files read the password from your data folder. (Can still be riped, but who’s going to rip both at once?)

Use usermessage then problem solved…

Welcome to Garry’s Mod.

intercept the usermessage

overwrite RunString

lots of ways to rip it

You can’t read a usermessage from the server side or that would be dumb…

unless you use funcsolver…

Easiest way is just to make people not want to steal your code. Fill it with backdoors for your steamid or something.

octogon, don’t be so dumb. You can hook into any usermessage being sent to you.

u can hook them still…just have to know the name of the usermessage

I dunno, seeing as we can override other functions there is a possibility that we could override usermessage.IncommingMessage to make it auto-hook a message when it comes in, or autoblock a message that contains certain strings, and if we deem the message ok then pass it onto the original usermessage.IncommingMessage

whats your point?

i already know u can do that

you can waste your time looking at DUA making it only allow approved hooks :stuck_out_tongue:

Why would you look at dua when you can log all incoming hooks through lua?

paranoid people like to do it the hard way :stuck_out_tongue:

Besides isnt it easier to just override file.Read with a function that returns the string “DONT STEAL MY STUFF BITCH!”??


i believe we are talking about using datastream to steal from people who are on your server…

Oh, keeping people from using ds on you?

alias _dsp “”

If you are talking about other ways of people getting your code, filling it with backdoors is dumb becasue you can just edit the file and remove them. Encrypting them with a program and decrypting them before loading them is fine if no one else can get the way you decrypt them, but if they can’t get that then they probably can’t get your lua file anyway. If you’re talking about releasing your stuff on facepunch and expecting other people not to read and use it, the you’re out of luck, anything you do can be easily defeated.

You can’t encrypt Lua, since that is dependant on the client having the decryption program installed. Which they won’t

Sending it using usermessages is easilly abused and wastes server bandwidth. My plan is rather flawed but is the only half decent way of doing it.

Yes. Apples.