mirror of
https://github.com/nmap/nmap.git
synced 2025-12-29 19:09:01 +00:00
Remove trailing whitespace in lua files
Whitespace is not significant, so this should not be a problem. https://secwiki.org/w/Nmap/Code_Standards
This commit is contained in:
@@ -22,7 +22,7 @@ various names of the form <name>.example.com are tried.
|
||||
]]
|
||||
|
||||
---
|
||||
-- @usage
|
||||
-- @usage
|
||||
-- nmap --script http-vhosts -p 80,8080,443 <target>
|
||||
--
|
||||
-- @arg http-vhosts.domain The domain that hostnames will be prepended to, for
|
||||
@@ -43,12 +43,12 @@ various names of the form <name>.example.com are tried.
|
||||
--
|
||||
-- @todo feature: move hostnames to an external file and allow the user to use another one
|
||||
-- @internal: see http://seclists.org/nmap-dev/2010/q4/401 and http://seclists.org/nmap-dev/2010/q4/445
|
||||
--
|
||||
--
|
||||
--
|
||||
--
|
||||
-- @todo feature: add option report and implement it
|
||||
-- @internal after stripping sensitive info like ip, domain names, hostnames
|
||||
-- and redirection targets from the result, append it to a file
|
||||
-- that can then be uploaded. If enough info is gathered, the names
|
||||
-- @internal after stripping sensitive info like ip, domain names, hostnames
|
||||
-- and redirection targets from the result, append it to a file
|
||||
-- that can then be uploaded. If enough info is gathered, the names
|
||||
-- will be weighted. It can be shared with metasploit
|
||||
--
|
||||
-- @todo feature: fill nsedoc
|
||||
@@ -81,7 +81,7 @@ end
|
||||
|
||||
---
|
||||
-- Makes a target name with a name and a domain
|
||||
-- @param name string
|
||||
-- @param name string
|
||||
-- @param domain string
|
||||
-- @return string
|
||||
local makeTargetName = function(name,domain)
|
||||
@@ -102,12 +102,12 @@ end
|
||||
-- key -> table
|
||||
-- @param result table
|
||||
-- @return string
|
||||
local collapse = function(result)
|
||||
local collapse = function(result)
|
||||
local collapsed = {""}
|
||||
for code, group in next, result do
|
||||
if #group > arg_collapse then
|
||||
table.insert(collapsed, ("%d names had status %s"):format(#group, code))
|
||||
else
|
||||
else
|
||||
for _,name in ipairs(group) do
|
||||
table.insert(collapsed, name)
|
||||
end
|
||||
@@ -130,7 +130,7 @@ local testThread = function(result, host, port, name)
|
||||
result[status] = result[status] or {}
|
||||
if ( 300 <= http_response.status and http_response.status < 400 ) then
|
||||
table.insert(result[status], ("%s : %s -> %s"):format(targetname, status, (http_response.header.location or "(no Location provided)")))
|
||||
else
|
||||
else
|
||||
table.insert(result[status], ("%s : %s"):format(targetname, status))
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user