mirror of
https://github.com/nmap/nmap.git
synced 2026-08-04 14:49:29 +00:00
Close the socket when finished getting the banner.
This commit is contained in:
parent
971fb7551d
commit
6595577d6e
1 changed files with 4 additions and 1 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue