mirror of
https://github.com/nmap/nmap.git
synced 2025-12-10 09:49:05 +00:00
Fix two bugs in the http libraries:
1) Re-add 443 to the common ssl ports (it was accidentally removed in an earlier patch) 2) If the header doesn't return the number of pipelined requests to perform, default to 40 instead of leaving it nil
This commit is contained in:
@@ -146,7 +146,7 @@ end
|
||||
-- @param port_number The number of the port to check
|
||||
-- @return bool True if port is usually ssl, otherwise false
|
||||
local function is_ssl(port_number)
|
||||
local common_ssl_ports = {465, 989, 990, 992, 993, 994, 995, 587, 6697, 6679, 8443}
|
||||
local common_ssl_ports = {443, 465, 989, 990, 992, 993, 994, 995, 587, 6697, 6679, 8443}
|
||||
local table_size = table.maxn(common_ssl_ports)
|
||||
local i = 0
|
||||
while i < table_size do
|
||||
|
||||
@@ -280,6 +280,9 @@ local function getPipelineMax( response )
|
||||
if response.header and response.header.connection ~= "close" then
|
||||
if response.header["keep-alive"] then
|
||||
local max = string.match( response.header["keep-alive"], "max\=(%d*)")
|
||||
if(max == nil) then
|
||||
return 40
|
||||
end
|
||||
return max
|
||||
else return 40 end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user