Fix for match_all_service_names

Removed the boolean and resorted to simply adding a "match all" service name regular expression.
This commit is contained in:
Tib3rius 2021-09-08 04:18:22 -04:00
parent 1f6d16ecf0
commit 49b2874390
2 changed files with 4 additions and 5 deletions

View File

@ -531,7 +531,7 @@ async def scan_target(target):
if re.search(s, service.name):
plugin_service_match = True
if plugin.match_all_service_names_boolean or plugin_service_match:
if plugin_service_match:
plugin_tag_set = set(plugin.tags)
matching_tags = False

View File

@ -108,7 +108,6 @@ class ServiceScan(Plugin):
self.services = []
self.service_names = []
self.ignore_service_names = []
self.match_all_service_names_boolean = False
self.run_once_boolean = False
self.require_ssl_boolean = False
@ -189,8 +188,8 @@ class ServiceScan(Plugin):
@final
def match_all_service_names(self, boolean):
self.match_all_service_names_boolean = boolean
# we need at least one service name to enter loop in autorecon and make plugin finally run
if boolean:
# Add a "match all" service name.
self.match_service_name('.*')
class Report(Plugin):