mirror of
https://github.com/nmap/nmap.git
synced 2026-08-04 06:40:48 +00:00
Fix get_script_interfaces: was crashing when filter function returned false
This commit is contained in:
parent
1daf966347
commit
94d6c605bb
1 changed files with 4 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue