Has anyone ever done this with lua? I've done it a multiple times in my C++/C codes and to be honest now I need it the most.
The thing is my actual code is a small function, maybe 5-7 lines. Instead of messing it up, I thought I'd find some useless literally meaningless code that the interpreter won't mind it being there, and make it like literally do nothing, and in between the lines put my actual code. Does anyone have an idea where I could find this code or other ways to obfuscate my code?
There was a pretty recent discussion about Lua Obfuscation: [url]http://facepunch.com/showthread.php?t=1456538[/url]
The short version is: Don't really bother because no matter what you do it'll be almost trivial to get it readable again
Dont even bother, you wont get obfustication anywhere near C.
This always seems like a really odd thing for people to do with gmod lua, I think you should be personally do the opposite and make everything clean/add comments to actually assist the reader
[QUOTE=NiandraLades;47405246]This always seems like a really odd thing for people to do with gmod lua, I think you should be personally do the opposite and make everything clean/add comments to actually assist the reader[/QUOTE]
I am doing this for a reason. It's not something that they should view. Also @Exho, even if not, I just really need useless shit code that would work along with my code. No need of an obfuscation, just some random shit around my code.
The status quo of Lua code is to not obfuscate it. That means obfuscated code will stand out extremely clearly among non-obfuscated code.
Also there is no effective way to obfuscate only 5-7 lines of code. Sure, you can add bunch of dummy NOP code, but that's not gonna do anything when they figure out what the real code is. If you call *any* of the GMod library functions (eg http.Fetch), it'll be pretty damn clear what you're attempting to do under obfuscation even if variable names are scrambled.
[QUOTE=RedNinja;47405263]I am doing this for a reason. It's not something that they should view. Also @Exho, even if not, I just really need useless shit code that would work along with my code. No need of an obfuscation, just some random shit around my code.[/QUOTE]
I'm going to assume it's exploit code. Prove me wrong.
[QUOTE=NiandraLades;47405246]This always seems like a really odd thing for people to do with gmod lua, I think you should be personally do the opposite and make everything clean/add comments to actually assist the reader[/QUOTE]
So assist people trying to decrypt clientside Lua?
90% of people decrypting the Lua cache are 12 year olds with no knowledge of Lua doing so just to post it to leakforums for the rep.
[QUOTE=code_gs;47405737]So assist people trying to decrypt clientside Lua?[/QUOTE]
Oh, okay, that makes sense
[QUOTE=FPtje;47405296]I'm going to assume it's exploit code. Prove me wrong.[/QUOTE]
Not an exploit. I'm going to write a PHP script that gets the people who use this addon, and see if there's a match with any of my buyers on scriptfodder, because hell, my shit is being leaked way too much lately
[QUOTE=RedNinja;47406011]Not an exploit. I'm going to write a PHP script that gets the people who use this addon, and see if there's a match with any of my buyers on scriptfodder, because hell, my shit is being leaked way too much lately[/QUOTE]
Leakers take out any checks and put their own exploits in. They will most certainly find your obfuscated code and dismantle it. It's simply because they know Lua.
[QUOTE=RedNinja;47406011]Not an exploit. I'm going to write a PHP script that gets the people who use this addon, and see if there's a match with any of my buyers on scriptfodder, because hell, my shit is being leaked way too much lately[/QUOTE]
Maybe you should make things that people feel that they shouldn't be free in the first place. I introduced ARCLoad AFTER I got the community to respect me.
You will [b]never[/b] be able to obfuscate your GLua scripts in a way that would make it impossible to deobfuscate or reverse engineer. What you are trying to do sounds so incredibly easy to get around if you were to do what I just said to it. It's just a fact of life.
Obfuscation of Lua is good though? You've gotta be missing a whole lot of imagination if you think there is any language where "deobfuscation" is impossible.
It's possible to mangle names, complicate logic, replace control structures with alternatives. All things which make a script pretty damn hard to read if you do it right. People may work out what makes your script tick, it's doubtful they will end up with the original or something easy to modify without rewriting large portions.
Hell, you could write a VM if you really wanted and upload your scripts as bytecode.
Hey, most of you didn't get me. I don't mean to encrypt it fully and make it undecryptable; I just want to hide it between some dummy code. Sure some will find it, but the average leaker is a 11 years old kid who can't afford a script without mom's permission and thus they won't even notice. If they knew lua they'd make their shit and not steal it. Also @LegoGuy, I dont care what they think, whether it should be free or not, they're not the ones to decide that.
[QUOTE=FPtje;47406297]Leakers take out any checks and put their own exploits in. They will most certainly find your obfuscated code and dismantle it. It's simply because they know Lua.[/QUOTE]
That is false in most cases :D Many of them even keep the license key in there...
[QUOTE=Newjorciks;47407525]That is false in most cases :D Many of them even keep the license key in there...[/QUOTE]
No, you don't know how many times I've seen the steam ID of a guy called ChewGum in leaks. Almost all leaks have an exploit to make him superadmin.
Saying that he shouldn't obfuscate his code just because it will always be possible to deobfuscate it is like saying we shouldn't use anti viruses just because there will always be some viruses out there that get past it.
Anyways, any idea where I could find some dummy code?
[QUOTE=RedNinja;47408790]Anyways, any idea where I could find some dummy code?[/QUOTE]
This is the part of your question I don't understand. Just write some code? It'd probably be more effective to just put it all one line.
[QUOTE=RedNinja;47408790]Anyways, any idea where I could find some dummy code?[/QUOTE]
You really can't make your own dummy code?
It's really not going to help out by you just obfuscating 7 lines, it would do you more good to just leave it as a normal chunk of code where it blends in with everything else.
The way I would be 'obsfucating' it would be by having fake comments on the lines of code explaining what it does for the add-on and have fake var names.
So you can make it look like it checks for VIPs or version update. You can add extra code in there too to go along with the lie.
A lot of the time a cover up is blown due to the cover up itself.
Hiding in plain sight is the best bet in my opinion.
It's harder to debug obfuscated code. And don't get me wrong Willox, I wasn't saying it was pointless. Just that you'll never be able to fully prevent someone from modifying/taking your Lua codez!
About the debugging obfuscated code, all I can think of is writing your own obfuscator that keeps track of the names of things. This is a good example of what I'm talking about: [url]http://www.zelix.com/klassmaster/featuresStackTraceTranslate.html[/url]
[t]http://puu.sh/gStsd/3c33fe0b79.png[/t]
The easiest way I can think of how that could be done is if you incrementally name everything so stuff is like a0 a1 a2 a3 a4 a5 ... a9, and have some sort of map for those to be used to look up the original name.
It honestly just depends on how long the script is too. No one is going to want to sit through and fix code that's 5000 lines worth condensed to a single line, obfuscated variable names/functions, and random calls to check if the user has a valid copy. Well no one with a life I suppose.
Sorry, you need to Log In to post a reply to this thread.