View Full Version : Lua encrypting / decrypting
desche188
12-07-2013, 03:43 PM
i am trying to learn how to encrypt / decrypt lua files to maybe use them in scripts i make and i was wondering how to do this.
is there anyone on this forum that knows how to do this?
hugo999
12-07-2013, 04:33 PM
Encrypting is easy thing, decrypting no.
Chuitox
12-07-2013, 04:53 PM
i am trying to learn how to encrypt / decrypt lua files to maybe use them in scripts i make and i was wondering how to do this.
is there anyone on this forum that knows how to do this?
I understand about encrypting. Everybody wants to protect their work but why would you want to decrypt?
hugo999
12-07-2013, 06:06 PM
Decrypting LUADec 5.1, other programs.
hugo999
12-08-2013, 12:17 AM
Was mit Freunden? Alles gut? Ja? Ich hoffe, das.
desche188
12-08-2013, 02:40 AM
Decrypting LUADec 5.1, other programs.
yea but i dont know how to use them or anything i need someone advanced to make a small tutorial
desche188
12-08-2013, 02:42 AM
I understand about encrypting. Everybody wants to protect their work but why would you want to decrypt?
i just am interested in how it works and some games that i play if i want to change things inside them id have to decrypt it to make a mod for it
Spectrus
12-08-2013, 02:45 AM
yea but i dont know how to use them or anything i need someone advanced to make a small tutorial
If you don't understand it you probably shouldn't be using it. There is no reason at all to de-obfuscate someone's script.
That brings me on to another topic, it's not encryption it's obfuscation. Obfuscation is making your code hard to read. You can do this through any means you want.
For instance, you can write your whole script inside a function, call string.dump on the function, take the resulting string and paste it in to a new script that contains loadstring(DUMPED_STRING)(), and your code would be obfuscated. It's not all that difficult to reverse, but it still deters most people from trying. Another thing you can do is use the Lua compiler from http://lua.org to compile your Lua script in to byte-code. Again, reversible, but people shouldn't be trying to reverse it in the first place.
Chuitox
12-08-2013, 07:33 PM
If you don't understand it you probably shouldn't be using it. There is no reason at all to de-obfuscate someone's script.
That brings me on to another topic, it's not encryption it's obfuscation. Obfuscation is making your code hard to read. You can do this through any means you want.
For instance, you can write your whole script inside a function, call string.dump on the function, take the resulting string and paste it in to a new script that contains loadstring(DUMPED_STRING)(), and your code would be obfuscated. It's not all that difficult to reverse, but it still deters most people from trying. Another thing you can do is use the Lua compiler from http://lua.org to compile your Lua script in to byte-code. Again, reversible, but people shouldn't be trying to reverse it in the first place.
Agreed
gazgaz
12-08-2013, 11:16 PM
If you don't understand it you probably shouldn't be using it. There is no reason at all to de-obfuscate someone's script.
That brings me on to another topic, it's not encryption it's obfuscation. Obfuscation is making your code hard to read. You can do this through any means you want.
For instance, you can write your whole script inside a function, call string.dump on the function, take the resulting string and paste it in to a new script that contains loadstring(DUMPED_STRING)(), and your code would be obfuscated. It's not all that difficult to reverse, but it still deters most people from trying. Another thing you can do is use the Lua compiler from http://lua.org to compile your Lua script in to byte-code. Again, reversible, but people shouldn't be trying to reverse it in the first place.
i disagree if no one ever did anything they didn't understand they would never learn playing with shit you don't understand is a good thing you tend to find a starting point that you do understand and build on it till you can understand it all
reecey
12-08-2013, 11:33 PM
i disagree if no one ever did anything they didn't understand they would never learn playing with shit you don't understand is a good thing you tend to find a starting point that you do understand and build on it till you can understand it all
I agree. Back when I knew nothing, the first time I opened a 7.6 open tibia distro folder... i was blown away by how complicated things looked, didnt have a clue and no one would help be because if i dont know x then i cant do y or z
This is ofcourse the WORST thing you can tell someone, i obviously ignored the fuckers and now i can code nearly anything for an xml ot (lua and xml) and this helped me so much when tibia bots became script-able powerhouses since the lua didnt scare the shit out of me and i'm confident when editing other peoples work and it usualy works out great :)
@desche188 (http://forums.xenobot.net/member.php?666-desche188)
I dont think you will get help here for decrypting since mostly all the 'good' scripts are encrypted/obfuscated and people may think you are trying to steal their work which is also my opinion.
If you really do have legit intentions (game modding) then you really are in the wrong place since im 101% sure the guys here wont help you de-obfuscate/decrypt their work lol
But still... just experiment and you will eventually learn by yourself or chuck the question into google
Spectrus
12-08-2013, 11:35 PM
i disagree if no one ever did anything they didn't understand they would never learn playing with shit you don't understand is a good thing you tend to find a starting point that you do understand and build on it till you can understand it all
So read up on obfuscation, read up on encryption, understand the techniques used. Don't run someone's paid script through Luadec just so you can have their code.
Edit: I'm not saying it's not good to learn from other people's code. I'm saying that using a utility like Luadec, when it comes to decompiling people's scripts, is not necessary and often quite inconsiderate.
gazgaz
12-09-2013, 12:37 AM
So read up on obfuscation, read up on encryption, understand the techniques used. Don't run someone's paid script through Luadec just so you can have their code.
Edit: I'm not saying it's not good to learn from other people's code. I'm saying that using a utility like Luadec, when it comes to decompiling people's scripts, is not necessary and often quite inconsiderate.
ima have to learn how the hole obfuscation thing works soon im going to apply for a move to the paid scrip thread here in about 5 days 40 ish post lol going to have to learn it ;p
rafau94
05-20-2014, 10:30 PM
could anyone explain me step by step, how to hide my code?
pixie_frigo
06-06-2014, 01:09 AM
Well im intrested too :)
I have very large lua scripts (500kb) so obfuscation is not realy an option anymore
That luadec didnt work because i compiled my scripts with 5.1 lua but I do wonder if there are things out there that can decode it :)
pixie_frigo
06-10-2014, 12:19 AM
nevermind!
Xeno Scripts
06-10-2014, 01:35 AM
If you don't understand it you probably shouldn't be using it. There is no reason at all to de-obfuscate someone's script.
That brings me on to another topic, it's not encryption it's obfuscation. Obfuscation is making your code hard to read. You can do this through any means you want.
For instance, you can write your whole script inside a function, call string.dump on the function, take the resulting string and paste it in to a new script that contains loadstring(DUMPED_STRING)(), and your code would be obfuscated. It's not all that difficult to reverse, but it still deters most people from trying. Another thing you can do is use the Lua compiler from http://lua.org to compile your Lua script in to byte-code. Again, reversible, but people shouldn't be trying to reverse it in the first place.
Obfuscation is a hell-of-a-hard word to learn. :rolleyes:
pixie_frigo
06-10-2014, 12:02 PM
Obfuscation is a hell-of-a-hard word to learn. :rolleyes:
i just start with obfu and than smash my keyboard so I obfussitciated the word itself even!
Anyways a cool tool I found yesterday is :
https://github.com/stravant/LuaMinify
just run in commandline:
lua CommandLineMinify.lua input.lua output.lua
:) (you need to have lua installed ofc)
Also set as much functions as you can as local
Furpan
06-10-2014, 03:10 PM
i just start with obfu and than smash my keyboard so I obfussitciated the word itself even!
Anyways a cool tool I found yesterday is :
https://github.com/stravant/LuaMinify
just run in commandline:
lua CommandLineMinify.lua input.lua output.lua
:) (you need to have lua installed ofc)
Also set as much functions as you can as local
also to use proper (), while (true) do, else it will "minify" it to whiletruedo
ppgab
06-10-2014, 03:28 PM
i just start with obfu and than smash my keyboard so I obfussitciated the word itself even!
Anyways a cool tool I found yesterday is :
https://github.com/stravant/LuaMinify
just run in commandline:
lua CommandLineMinify.lua input.lua output.lua
:) (you need to have lua installed ofc)
Also set as much functions as you can as local
i think you should just stick to bytecode instead of minify, bytecode is very time consuming to decompile and it rarely delivers the exact code anyways, not only that but bytecode also increases the performance of the script, maybe Darkstar could find a way to automatically decompile all your code but then it's Darkstar, the overall xenobot user wouldn't be able to steal your HUD ;),
but if you really dont want anyone to see your code you can use Scite compiler, but it might slow down the code
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.