mirror of
https://github.com/nmap/nmap.git
synced 2026-08-04 06:40:48 +00:00
Gracefully handle EOF in ftp-anon.nse.
This commit is contained in:
parent
d1b34654b8
commit
f2dac38381
1 changed files with 3 additions and 3 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue