From 02faebe529a484e8d0bac93ff373f7bb40eb6474 Mon Sep 17 00:00:00 2001 From: TheTechromancer Date: Wed, 20 Sep 2023 13:23:19 -0400 Subject: [PATCH] reintroduce custom dns resolvers for projectdiscovery tools --- bbot/modules/deadly/nuclei.py | 5 +++-- bbot/modules/httpx.py | 7 +++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/bbot/modules/deadly/nuclei.py b/bbot/modules/deadly/nuclei.py index 0ea880b31..bb8d1ed9a 100644 --- a/bbot/modules/deadly/nuclei.py +++ b/bbot/modules/deadly/nuclei.py @@ -185,10 +185,11 @@ async def execute_nuclei(self, nuclei_input): self.concurrency, "-disable-update-check", "-stats-json", - # "-r", - # self.helpers.resolver_file, ] + if self.helpers.system_resolvers: + command += ["-r", self.helpers.resolver_file] + for cli_option in ("severity", "templates", "iserver", "itoken", "tags", "etags"): option = getattr(self, cli_option) diff --git a/bbot/modules/httpx.py b/bbot/modules/httpx.py index aa375f7ea..ef77668db 100644 --- a/bbot/modules/httpx.py +++ b/bbot/modules/httpx.py @@ -98,9 +98,12 @@ async def handle_batch(self, *events): f"User-Agent: {self.scan.useragent}", "-response-size-to-read", f"{self.max_response_size}", - # "-r", - # self.helpers.resolver_file, ] + + dns_resolvers = ",".join(self.helpers.system_resolvers) + if dns_resolvers: + command += ["-r", dns_resolvers] + for hk, hv in self.scan.config.get("http_headers", {}).items(): command += ["-header", f"{hk}: {hv}"] proxy = self.scan.config.get("http_proxy", "")