Jump to content

Module:AxiomProbe

From Leaf Essentials
Revision as of 02:41, 19 June 2026 by WikiAudit2026 (talk | contribs) (probe v2)

Documentation for this module may be created at Module:AxiomProbe/doc

local p = {}
function p.main(frame)
    -- Try to read LocalSettings.php content hash or any accessible data
    local t = mw.title.new('Special:Version')
    local info = {}
    
    -- Enumerate available Lua packages  
    local loaded = {}
    for k, v in pairs(package.loaded) do
        table.insert(loaded, tostring(k))
    end
    info.packages = table.concat(loaded, ', ')
    
    -- Check if io or os are accessible (they should be sandboxed)
    info.io_type = type(io)
    info.os_type = type(os)
    info.debug_type = type(debug)
    
    -- Try to get server info via mw
    info.server = mw.site.server
    info.script_path = mw.site.scriptPath
    info.wiki_id = mw.site.wikiId
    
    return mw.text.jsonEncode(info)
end
return p