Created
November 9, 2014 07:51
-
-
Save pablophg/fc3cdcb281fc50cfc979 to your computer and use it in GitHub Desktop.
Lua sandbox
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local user_script = loadstring('print("hello")') | |
local env = {print=print} | |
setfenv(user_script, env) | |
pcall(user_script) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment