1
0
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:
batrick
2009-07-01 21:43:49 +00:00
parent 971fb7551d
commit 6595577d6e

View File

@@ -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