mirror of
https://github.com/nmap/nmap.git
synced 2026-08-03 22:29:06 +00:00
Restore STARTTLS support in ssl-ccs-injection
This commit is contained in:
parent
b73a7254e0
commit
8f6cd9ccc5
1 changed files with 15 additions and 5 deletions
|
|
@ -132,11 +132,21 @@ local function test_ccs_injection(host, port, version)
|
|||
})
|
||||
|
||||
local status, err
|
||||
local s = nmap.new_socket()
|
||||
local status = s:connect(host, port)
|
||||
if not status then
|
||||
stdnse.print_debug(1, "Connection to server failed")
|
||||
return false
|
||||
local s
|
||||
local specialized = sslcert.getPrepareTLSWithoutReconnect(port)
|
||||
if specialized then
|
||||
status, s = specialized(host, port)
|
||||
if not status then
|
||||
stdnse.print_debug(3, "Connection to server failed")
|
||||
return
|
||||
end
|
||||
else
|
||||
s = nmap.new_socket()
|
||||
status = s:connect(host, port)
|
||||
if not status then
|
||||
stdnse.print_debug(3, "Connection to server failed")
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
-- Set a sufficiently large timeout
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue