lanScan/http-status.nse
2023-04-10 21:26:53 +02:00

26 lines
452 B
Lua

local shortport = require "shortport"
description = [[
Get root page and return status code
]]
---
-- @usage nmap -p80 --script http-status.nse <target>
--
-- @output
-- 404
---
categories = {"discovery", "intrusive"}
author = "Adrien Malingrey"
license = "Same as Nmap--See https://nmap.org/book/man-legal.html"
portrule = shortport.http
local http = require "http"
action = function(host, port)
return http.get( host, port, "/" ).status
end