mirror of
https://github.com/nmap/nmap.git
synced 2026-01-30 10:09:03 +00:00
Close the socket when finished getting the banner.
This commit is contained in:
@@ -96,7 +96,10 @@ get_banner = function(host, port, opts)
|
||||
opts = initopts(opts)
|
||||
opts.recv_before = true
|
||||
local socket, nothing, correct, banner = tryssl(host, port, "", opts)
|
||||
if socket then return true, banner end
|
||||
if socket then
|
||||
socket:close()
|
||||
return true, banner
|
||||
end
|
||||
return false, banner
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user