mirror of
https://github.com/nmap/nmap.git
synced 2025-12-23 16:09:02 +00:00
Whitespace in http-headers.
This commit is contained in:
@@ -21,9 +21,9 @@ Performs a HEAD request for the root folder ("/") of a web server and displays t
|
|||||||
-- | Content-Type: text/html
|
-- | Content-Type: text/html
|
||||||
-- |
|
-- |
|
||||||
-- |_ (Request type: HEAD)
|
-- |_ (Request type: HEAD)
|
||||||
--
|
--
|
||||||
--@args path The path to request, such as <code>/index.php</code>. Default <code>/</code>.
|
--@args path The path to request, such as <code>/index.php</code>. Default <code>/</code>.
|
||||||
--@args useget Set to force GET requests instead of HEAD.
|
--@args useget Set to force GET requests instead of HEAD.
|
||||||
|
|
||||||
author = "Ron Bowes"
|
author = "Ron Bowes"
|
||||||
|
|
||||||
@@ -31,12 +31,11 @@ license = "Same as Nmap--See http://nmap.org/book/man-legal.html"
|
|||||||
|
|
||||||
categories = {"discovery", "safe"}
|
categories = {"discovery", "safe"}
|
||||||
|
|
||||||
|
|
||||||
portrule = shortport.http
|
portrule = shortport.http
|
||||||
|
|
||||||
action = function(host, port)
|
action = function(host, port)
|
||||||
local path = stdnse.get_script_args(SCRIPT_NAME..".path") or "/"
|
local path = stdnse.get_script_args(SCRIPT_NAME..".path") or "/"
|
||||||
local useget = stdnse.get_script_args(SCRIPT_NAME..".useget")
|
local useget = stdnse.get_script_args(SCRIPT_NAME..".useget")
|
||||||
local request_type = "HEAD"
|
local request_type = "HEAD"
|
||||||
local status = false
|
local status = false
|
||||||
local result
|
local result
|
||||||
@@ -71,7 +70,6 @@ action = function(host, port)
|
|||||||
end
|
end
|
||||||
|
|
||||||
table.insert(result.rawheader, "(Request type: " .. request_type .. ")")
|
table.insert(result.rawheader, "(Request type: " .. request_type .. ")")
|
||||||
|
|
||||||
return stdnse.format_output(true, result.rawheader)
|
return stdnse.format_output(true, result.rawheader)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user