diff --git a/lib/msf/ui/console/command_dispatcher/db.rb b/lib/msf/ui/console/command_dispatcher/db.rb index f03cfea1a8..eb4c7bdc8d 100644 --- a/lib/msf/ui/console/command_dispatcher/db.rb +++ b/lib/msf/ui/console/command_dispatcher/db.rb @@ -765,6 +765,10 @@ class Db opts[:port] = ports if ports framework.db.services(opts).each do |service| + unless service.state == 'open' + next if onlyup + end + host = service.host matched_service_ids << service.id