mirror of
https://github.com/nmap/nmap.git
synced 2025-12-09 22:21:29 +00:00
o Fixed multiple NSE scripts that weren't always properly closing their
sockets. The error message was:
"bad argument #1 to 'close' (nsock expected, got no value)"
This commit is contained in:
@@ -48,7 +48,7 @@ action = function(host, port)
|
||||
result1 = try(socket:receive_lines(1))
|
||||
|
||||
if not string.match(result1, "^250") then
|
||||
socket.close()
|
||||
socket:close()
|
||||
-- TODO: use print_debug instead
|
||||
return "EHLO with errors or timeout. Enable --script-trace to see what is happening."
|
||||
end
|
||||
@@ -70,7 +70,7 @@ action = function(host, port)
|
||||
result2 = try(socket:receive_lines(1))
|
||||
|
||||
if not string.match(result2, "^214") then
|
||||
socket.close()
|
||||
socket:close()
|
||||
-- TODO: use print_debug instead
|
||||
return "HELP with errors or timeout. Enable --script-trace to see what is happening."
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user