1
0
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:
ron
2009-08-21 23:42:07 +00:00
parent b64134be14
commit 08073b43b8
2 changed files with 4 additions and 1 deletions

View File

@@ -146,7 +146,7 @@ end
-- @param port_number The number of the port to check -- @param port_number The number of the port to check
-- @return bool True if port is usually ssl, otherwise false -- @return bool True if port is usually ssl, otherwise false
local function is_ssl(port_number) 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 table_size = table.maxn(common_ssl_ports)
local i = 0 local i = 0
while i < table_size do while i < table_size do

View File

@@ -280,6 +280,9 @@ local function getPipelineMax( response )
if response.header and response.header.connection ~= "close" then if response.header and response.header.connection ~= "close" then
if response.header["keep-alive"] then if response.header["keep-alive"] then
local max = string.match( response.header["keep-alive"], "max\=(%d*)") local max = string.match( response.header["keep-alive"], "max\=(%d*)")
if(max == nil) then
return 40
end
return max return max
else return 40 end else return 40 end
end end