mirror of
https://github.com/nmap/nmap.git
synced 2025-12-06 04:31:29 +00:00
Avoid crash if only testing port for likely SSL, not host. Fixes #1286
This commit is contained in:
@@ -234,6 +234,8 @@ function ssl(host, port)
|
|||||||
port_or_service(LIKELY_SSL_PORTS, LIKELY_SSL_SERVICES, {"tcp", "sctp"})(host, port) then
|
port_or_service(LIKELY_SSL_PORTS, LIKELY_SSL_SERVICES, {"tcp", "sctp"})(host, port) then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
-- If we're just looking up port info, stop here.
|
||||||
|
if not host then return false end
|
||||||
-- if we didn't detect something *not* SSL, check it ourselves
|
-- if we didn't detect something *not* SSL, check it ourselves
|
||||||
if port.version and port.version.name_confidence <= 3 and host.registry then
|
if port.version and port.version.name_confidence <= 3 and host.registry then
|
||||||
comm = comm or require "comm"
|
comm = comm or require "comm"
|
||||||
|
|||||||
Reference in New Issue
Block a user