mirror of
https://github.com/nmap/nmap.git
synced 2026-08-03 22:29:06 +00:00
open / open|filtered tables work for shortport.service now
This commit is contained in:
parent
05656f057b
commit
005a84fc59
1 changed files with 12 additions and 4 deletions
|
|
@ -44,11 +44,19 @@ service = function(service, _proto, _state)
|
|||
service_table = service
|
||||
end
|
||||
|
||||
if(type(state) == "string") then
|
||||
state_table = {state}
|
||||
elseif(type(state) == "table") then
|
||||
state_table = state
|
||||
end
|
||||
|
||||
return function(host, port)
|
||||
if(port.protocol == proto and port.state == state) then
|
||||
for _, service in ipairs(service_table) do
|
||||
if(port.service == service) then
|
||||
return true
|
||||
for _, state in pairs(state_table) do
|
||||
if(port.protocol == proto and port.state == state) then
|
||||
for _, service in ipairs(service_table) do
|
||||
if(port.service == service) then
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue