Skip to content

Instantly share code, notes, and snippets.

@pablophg
Created November 9, 2014 07:51
Show Gist options
  • Save pablophg/fc3cdcb281fc50cfc979 to your computer and use it in GitHub Desktop.
Save pablophg/fc3cdcb281fc50cfc979 to your computer and use it in GitHub Desktop.
Lua sandbox
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