问题
I want to protect my Lua codes on my project, I'm using Corona SDK.
I saw some lua files being obfuscated like this one
https://github.com/ChartBoost/corona-sdk/blob/master/ChartboostSDK/chartboost.lua
Is there any application to protect my source code?
回答1:
The file you mentioned is not encrypted: it's just precompiled bytecode for Lua 5.1. It can be read with luac -l -p
(not in source form but in VM instructions, which are probably enough to reconstruct the source). If you want to reconstruct the source, try LuaDec for Lua 5.1.
You can precompile your code using luac
or string.dump
.
来源:https://stackoverflow.com/questions/17915486/how-to-encrypt-lua-codes