mirror of
https://github.com/nmap/nmap.git
synced 2025-12-31 20:09:02 +00:00
Allows the port to be a simple number
This commit is contained in:
@@ -161,7 +161,9 @@ end
|
||||
-- See RFC 2616 sections 14.23 and 5.2.
|
||||
local function get_host_field(host, port)
|
||||
if not host then return nil end
|
||||
port = type(port) == "number" and {number=port} or port
|
||||
if type(port) == "number" then
|
||||
port = {number=port, protocol="tcp", state="open", version={}}
|
||||
end
|
||||
local ssl = shortport.ssl(host, port)
|
||||
local pn = port.number
|
||||
if not ssl and pn == 80 or ssl and pn == 443 then
|
||||
|
||||
Reference in New Issue
Block a user