There is any way to load code from string without using a loadstring() function?
For example:
local code = {
{
Code = [[
function DoSomething()
print('making something')
end
]]
},
{
Code = [[
function DoSomethingElse()
print('making something else')
end
]]
},
}
for i = 1, #code do
local currentCode = code[i].Code
-- Load this code here, without loadstring()
end
App where I'm writing uses a Lua version that doesn't have the loadstring() function. There is a load() function, which works the same way, but it is not a safe way to load code. It can be easily intercepted. I would like to keep my code as secure as possible.
question from:
https://stackoverflow.com/questions/65890901/load-code-from-string-without-using-loadstring-function 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…