Advertisement
Guest User

Untitled

a guest
Nov 20th, 2012
605
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.75 KB | None | 0 0
  1.         private static void SetupSandBox()
  2.         {
  3.             LuaVM.DoString("Interpreter = {}");
  4.             LuaVM.DoString("luanet.load_assembly('WOTV')");
  5.             LuaVM.DoString("Interpreter.Gamemode = luanet.import_type('WOTV.Interface.Gamemode')");
  6.             LuaVM.DoString("ro = newtag() function readonly(value) local t = {value=value} settag(t, ro) return t end");
  7.             LuaVM.DoString("settagmethod(ro, \"setglobal\", function(x) error(x..\" is read only.\") end)");
  8.             LuaVM.DoString("function protect(table) return setmetatable({}, { __index = table, __newindex = function(table, key, value) error(\"attempted to modify a read only table\") end, __metatable = false }) end");
  9.             LuaVM.DoString("luanet = nil");
  10.             LuaVM.DoString("package = nil");
  11.             LuaVM.DoString("require = function() print(\"Warning: plugin attempted to call require but the request was blocked.\") end");
  12.             LuaVM.DoString("module = nil");
  13.             LuaVM.DoString("rawequal = nil");
  14.             LuaVM.DoString("rawget = nil");
  15.             LuaVM.DoString("rawset = nil");
  16.             LuaVM.DoString("setfenv = nil");
  17.             LuaVM.DoString("setmetatable = nil");
  18.             LuaVM.DoString("debug = nil");
  19.             LuaVM.DoString("newproxy = nil");
  20.             LuaVM.DoString("collectgarbage=nil");
  21.             LuaVM.DoString("dofile = nil");
  22.             LuaVM.DoString("getfenv = nil");
  23.             LuaVM.DoString("getmetatable = nil");
  24.             LuaVM.DoString("load = nil");
  25.             LuaVM.DoString("loadfile = nil");
  26.             LuaVM.DoString("loadstring = nil");
  27.             LuaVM.DoString("os = nil");
  28.             LuaVM.DoString("io = nil");
  29.             LuaVM.DoString("_G = Interpreter");
  30.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement