mirror of
https://github.com/nmap/nmap.git
synced 2026-10-21 03:11:48 +00:00
Avoid crash if only testing port for likely SSL, not host. Fixes #1286
This commit is contained in:
parent
c95330ddf0
commit
8ae3ee2c7c
1 changed files with 2 additions and 0 deletions
|
|
@ -234,6 +234,8 @@ function ssl(host, port)
|
|||
port_or_service(LIKELY_SSL_PORTS, LIKELY_SSL_SERVICES, {"tcp", "sctp"})(host, port) then
|
||||
return true
|
||||
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 port.version and port.version.name_confidence <= 3 and host.registry then
|
||||
comm = comm or require "comm"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue