On 18/03/17 10:47 PM, Soni L. wrote:
You don't need to worry about 2 and 3 if you disable "os" lib.
os is disabled except clock, difftime and time.
Wrapping "io" lib is painful but possible.
Remember to also remove "require", "loadfile", "dofile", etc, then
reimplement them using wrapped "io". Use a wrapped "load"/"loadstring"
and implement signed bytecode loading so you don't load untrusted
bytecode. (With the caveat that an user could manually retrieve the key
and manually load untrusted bytecode, but the key isn't portable anyway
so it's a non-issue. Just use a secure CSPRNG when the user runs the
game for the first time.)
Did exactly that.
Bytecode is disabled entirely since there seem to be exploits.
--David