Page 3 of 4
Re: How to Protect a Resulting .Exe?
Posted: Mon Aug 20, 2012 2:48 pm
by Puzzlem00n
How on earth did this get back on the top... This question was answered months ago.
Anyway, Omar has an interesting idea with the assets thing and custom binary. It would be cool if you could make that work!
I was reading a lot of stuff on DRM the other day, and apparently, many studies show that you're more likely to stop piracy if you don't prevent it. People are more likely to pay for something if it doesn't have any annoying security measures in the first place. I wonder if games would make more if the money paid is treated more like a donation for a free product.
Re: How to Protect a Resulting .Exe?
Posted: Mon Aug 20, 2012 5:49 pm
by Robin
Hiding assets has exactly the same problems as hiding code:
OmarShehata wrote:One way to encrypt art assets off the top of my head would be to add some jumbled binary data in the middle of all your assets, that you would remove before using the images, and save it as your own extension, such that anyone trying to open the files won't know how to open them.
One line of code, 's all you need: after de-jumbling, save the image data to a file.
Besides, you can always capture the output of images and sounds.
A better way to prevent people from ripping you off might be to show yourself: make it clear you are a human, an individual just like your users and not a faceless company. People tend to have moral qualms about stealing from people they see as individuals just like them.
Re: How to Protect a Resulting .Exe?
Posted: Mon Aug 20, 2012 6:23 pm
by Lafolie
Robin speaks the truth. 's the old Robin Hood effect.
DIdn't realise the pun until after I read that. D'oh.
Re: How to Protect a Resulting .Exe?
Posted: Fri Sep 14, 2012 4:37 pm
by Noktai
I've seen some love games submitted to steam greenlight, did you try some sort of protection?
I wouldn't really feel comfortable with all my source code and assets exposed to such a large base of users.
Re: How to Protect a Resulting .Exe?
Posted: Fri Sep 14, 2012 5:15 pm
by qaisjp
OMG seriously easy!
Firstly (optional), obfuscate your code (when you release it, keep clean-source version on your HDD). (This speeds the game up, if you do it correctly)
Secondly (important), in all your lua files, add this to your first line:
Code: Select all
iHateDecompilers = {{{{{{{{42423423,{34},{{{{{{{{}}}}}}}}},{}},{}},{}},{}},{}},{}} -- this is probably got some problem in syntax but you can fix it
Thirdly (important), compile your lua code using LUAC.exe (This speeds the game up). (The above code will prevent decompiling because it confuses the decompiler(luadec) )
Then test the Love game to see if it works (the code won't be readable)
Then you can make it into the exe normally.
For images you can edit the image using Notepad and to use it you just read from the file, remove the edit using the algorithm you used and then do love.graphics.newImageData
This has been done before, however I cannot show you we used to achieve this as I would be in very big trouble for releasing our images (people would keep stealing the assets, we prepared a recipe for them)
Re: How to Protect a Resulting .Exe?
Posted: Fri Sep 14, 2012 7:02 pm
by coffee
iHateDecompilers = {{{{{{{{42423423,{34},{{{{{{{{}}}}}}}}},{}},{}},{}},{}},{}},{}}
<shocked>wait, what?</shocked>
Are you joking right? There is some technical basis to this work? "sauce" please!
Re: How to Protect a Resulting .Exe?
Posted: Fri Sep 14, 2012 10:15 pm
by verilog
Code: Select all
iHateDecompilers = {{{{{{{{42423423,{34},{{{{{{{{}}}}}}}}},{}},{}},{}},{}},{}},{}} -- this is probably got some problem in syntax but you can fix it
I too, share coffee's surprise and kindly request the technical justification of this, if available.
Re: How to Protect a Resulting .Exe?
Posted: Sat Sep 15, 2012 1:41 am
by kikito
Noktai wrote:I've seen some love games submitted to steam greenlight, did you try some sort of protection?
I wouldn't really feel comfortable with all my source code and assets exposed to such a large base of users.
I would say that the most efficient solution to your problem is ... not technical, then. Make an effort not to feel that way.
The encryption path only brings pain and madness.
Re: How to Protect a Resulting .Exe?
Posted: Sat Sep 15, 2012 12:10 pm
by qaisjp
verilog wrote:Code: Select all
iHateDecompilers = {{{{{{{{42423423,{34},{{{{{{{{}}}}}}}}},{}},{}},{}},{}},{}},{}} -- this is probably got some problem in syntax but you can fix it
I too, share coffee's surprise and kindly request the technical justification of this, if available.
Well, luadec decompiles Lua code compiled.
Creating one variable with a weird table structure (as above) confuses the decompiler, and crashes it...
I spent a good 10 minutes making this for you, drag clean-vulnerable.lua to test.bat and continue with the process. Then check decompiled.lua and compiled.lua
Do the same thing for clean-unvulnerable.lua to see it.
The bat file will explain to you what is happening, first it compiles the lua file, then attempts to decompile it, and then it runs the .lua file to show you that it gives the same output...
Re: How to Protect a Resulting .Exe?
Posted: Sat Sep 15, 2012 1:06 pm
by coffee
qaisjp wrote:verilog wrote:Code: Select all
iHateDecompilers = {{{{{{{{42423423,{34},{{{{{{{{}}}}}}}}},{}},{}},{}},{}},{}},{}} -- this is probably got some problem in syntax but you can fix it
I too, share coffee's surprise and kindly request the technical justification of this, if available.
Well, luadec decompiles Lua code compiled.
Creating one variable with a weird table structure (as above) confuses the decompiler, and crashes it...
I spent a good 10 minutes making this for you, drag clean-vulnerable.lua to test.bat and continue with the process. Then check decompiled.lua and compiled.lua
Do the same thing for clean-unvulnerable.lua to see it.
The bat file will explain to you what is happening, first it compiles the lua file, then attempts to decompile it, and then it runs the .lua file to show you that it gives the same output...
decompiler_example.zip
Since I'm @ OSX didn't test it. I suppose you take advantage of some buffer flaw of luadec. But remember that luadec is not the only decompiler around.
http://lua-users.org/wiki/LuaTools