mirror of
https://github.com/nmap/nmap.git
synced 2025-12-10 09:49:05 +00:00
Pass "ssl" as the third paramater to connect() in pop3.lua capabilities() and
smtp-commands.nse if version detection set the port service_tunnel to "ssl".
This commit is contained in:
@@ -149,7 +149,8 @@ function capabilities(host, port)
|
||||
local socket = nmap.new_socket()
|
||||
local capas = {}
|
||||
socket:set_timeout(10000)
|
||||
if not socket:connect(host.ip, port.number) then return nil, "Could Not Connect" end
|
||||
local proto = (port.version and port.version.service_tunnel == "ssl" and "ssl") or "tcp"
|
||||
if not socket:connect(host.ip, port.number, proto) then return nil, "Could Not Connect" end
|
||||
|
||||
status, line = socket:receive_lines(1)
|
||||
if not stat(line) then return nil, "No Response" end
|
||||
|
||||
Reference in New Issue
Block a user