Skip to content

Commit

Permalink
fix web proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Aug 20, 2024
1 parent ecae65a commit 11795e9
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions bbot/modules/deadly/ffuf.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ class ffuf(BaseModule):
async def setup(self):
self.canary = "".join(random.choice(string.ascii_lowercase) for i in range(10))
wordlist_url = self.config.get("wordlist", "")
self.proxy = self.scan.web_config.get("http_proxy", "")
self.debug(f"Using wordlist [{wordlist_url}]")
self.wordlist = await self.helpers.wordlist(wordlist_url)
self.wordlist_lines = list(self.helpers.read_file(self.wordlist))
Expand Down Expand Up @@ -243,6 +244,9 @@ async def execute_ffuf(
self.debug("invalid mode specified, aborting")
return

if self.proxy:
command += ["-x", self.proxy]

if apply_filters:
if ext in filters.keys():
if filters[ext][0] == ("ABORT"):
Expand Down
2 changes: 1 addition & 1 deletion bbot/modules/deadly/nuclei.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ async def setup(self):
self.warning(f"Failure while updating nuclei templates: {update_results.stderr}")
else:
self.warning("Error running nuclei template update command")
self.proxy = self.scan.config.get("http_proxy", "")
self.proxy = self.scan.web_config.get("http_proxy", "")
self.mode = self.config.get("mode", "severe").lower()
self.ratelimit = int(self.config.get("ratelimit", 150))
self.concurrency = int(self.config.get("concurrency", 25))
Expand Down
2 changes: 1 addition & 1 deletion bbot/modules/gowitness.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ async def setup(self):
self.threads = self.config.get("threads", 0)
if not self.threads:
self.threads = default_thread_count
self.proxy = self.scan.config.get("http_proxy", "")
self.proxy = self.scan.web_config.get("http_proxy", "")
self.resolution_x = self.config.get("resolution_x")
self.resolution_y = self.config.get("resolution_y")
self.visit_social = self.config.get("social", True)
Expand Down
2 changes: 1 addition & 1 deletion bbot/modules/wpscan.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ async def setup(self):
self.ignore_events = ["xmlrpc", "readme"]
self.api_key = self.config.get("api_key", "")
self.enumerate = self.config.get("enumerate", "vp,vt,tt,cb,dbe,u,m")
self.proxy = self.scan.config.get("http_proxy", "")
self.proxy = self.scan.web_config.get("http_proxy", "")
self.threads = self.config.get("threads", 5)
self.request_timeout = self.config.get("request_timeout", 60)
self.connection_timeout = self.config.get("connection_timeout", 30)
Expand Down
2 changes: 1 addition & 1 deletion bbot/scanner/preset/environ.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def prepare(self):
environ.update(bbot_environ)

# handle HTTP proxy
http_proxy = self.preset.config.get("http_proxy", "")
http_proxy = self.preset.config.get("web", {}).get("http_proxy", "")
if http_proxy:
environ["HTTP_PROXY"] = http_proxy
environ["HTTPS_PROXY"] = http_proxy
Expand Down
2 changes: 1 addition & 1 deletion bbot/scanner/preset/preset.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class Preset:
"1.2.3.0/24",
flags=["subdomain-enum"],
modules=["nuclei"],
config={"http_proxy": "http://127.0.0.1"}
config={"web": {"http_proxy": "http://127.0.0.1"}}
)
>>> scan = Scanner(preset=preset)
Expand Down

0 comments on commit 11795e9

Please sign in to comment.