Say I have Lua built into a C ++ application. The question may seem strange, but I wonder if there is a standard way to disable Lua functions from C ++?
For example, I would like to disable the creation of a new variable, except for a few defined ones, for example:
local time = 10
local size = 20
function test()
return time * size
end
I would like to make Lua VM fail if I define anything else but time, sizeand test. Is it possible that it is impossible to hack a virtual machine?
Or, for example, I would like to disable loops (both operators forand while).
source
share