From a2a012348ff1866549b1e466e5858171f247b0bb Mon Sep 17 00:00:00 2001 From: github-actions Date: Tue, 5 Nov 2024 16:28:00 -0500 Subject: [PATCH] fix CSP extractor --- bbot/modules/internal/excavate.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bbot/modules/internal/excavate.py b/bbot/modules/internal/excavate.py index bc777e66c2..94032c554a 100644 --- a/bbot/modules/internal/excavate.py +++ b/bbot/modules/internal/excavate.py @@ -527,9 +527,8 @@ class CSPExtractor(ExcavateRule): async def process(self, yara_results, event, yara_rule_settings, discovery_context): for identifier in yara_results.keys(): for csp_str in yara_results[identifier]: - domains = await self.helpers.re.findall(bbot_regexes.dns_name_regex, csp_str) - unique_domains = set(domains) - for domain in unique_domains: + domains = await self.excavate.scan.extract_in_scope_hostnames(csp_str) + for domain in domains: await self.report(domain, event, yara_rule_settings, discovery_context, event_type="DNS_NAME") class EmailExtractor(ExcavateRule):