1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-06 06:29:03 +00:00

Fix get_script_interfaces: was crashing when filter function returned false

This commit is contained in:
dmiller
2024-06-13 17:45:08 +00:00
parent 1daf966347
commit 94d6c605bb

View File

@@ -696,7 +696,10 @@ function get_script_interfaces(filter_func)
end
local ret = {}
for _, if_table in ipairs(nmap.list_interfaces()) do
insert(ret, filter_func(if_table))
local ift = filter_func(if_table)
if ift then
insert(ret, ift)
end
end
return ret
end