1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-02 12:59:02 +00:00

Gracefully handle EOF in ftp-anon.nse.

This commit is contained in:
david
2011-01-31 09:46:31 +00:00
parent d1b34654b8
commit f2dac38381

View File

@@ -78,12 +78,12 @@ local function list(socket, target, max_lines)
local listing = {}
while not max_lines or #listing < max_lines do
local status, data = list_socket:receive_buf("\r?\n", false)
if (not status and data == "EOF") or data == "" then
break
end
if not status then
return status, data
end
if data == "" then
break
end
listing[#listing + 1] = data
end