Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Nov 20th, 2012  |  syntax: C#  |  size: 1.75 KB  |  views: 297  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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.         }
clone this paste RAW Paste Data