From a08f85481cb98544772cbbaa39cb0f1f32e80c0d Mon Sep 17 00:00:00 2001 From: TheTechromancer Date: Thu, 12 Oct 2023 14:42:18 -0400 Subject: [PATCH] blacked --- bbot/modules/credshed.py | 4 +++- bbot/modules/dehashed.py | 11 +++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/bbot/modules/credshed.py b/bbot/modules/credshed.py index 468e3180f..c493199d7 100644 --- a/bbot/modules/credshed.py +++ b/bbot/modules/credshed.py @@ -49,7 +49,9 @@ async def handle_event(self, event): ) if cs_query is not None and cs_query.status_code != 200: - self.warning(f"Error retrieving results from {self.base_url} (status code {cs_query.status_code}): {cs_query.text}") + self.warning( + f"Error retrieving results from {self.base_url} (status code {cs_query.status_code}): {cs_query.text}" + ) json_result = {} with suppress(Exception): diff --git a/bbot/modules/dehashed.py b/bbot/modules/dehashed.py index cdfa70741..113652490 100644 --- a/bbot/modules/dehashed.py +++ b/bbot/modules/dehashed.py @@ -9,10 +9,7 @@ class dehashed(credential_leak): flags = ["passive"] meta = {"description": "Execute queries against dehashed.com for exposed credentials", "auth_required": True} options = {"username": "", "api_key": ""} - options_desc = { - "username": "Email Address associated with your API key", - "api_key": "DeHashed API Key" - } + options_desc = {"username": "Email Address associated with your API key", "api_key": "DeHashed API Key"} base_url = "https://api.dehashed.com/search" @@ -34,7 +31,7 @@ async def handle_event(self, event): async for entries in self.query(event): for entry in entries: # we have to clean up the email field because dehashed does a poor job of it - email_str = entry.get("email", "").replace('\\', '') + email_str = entry.get("email", "").replace("\\", "") found_emails = list(self.helpers.extract_emails(email_str)) if not found_emails: self.debug(f"Invalid email from dehashed.com: {email_str}") @@ -78,7 +75,9 @@ async def query(self, event): page += 1 if (page >= 3) or (not entries): if result is not None and result.status_code != 200: - self.warning(f"Error retrieving results from dehashed.com (status code {result.status_code}): {result.text}") + self.warning( + f"Error retrieving results from dehashed.com (status code {result.status_code}): {result.text}" + ) elif (page >= 3) and (total > num_entries): self.info( f"{event.data} has {total:,} results in Dehashed. The API can only process the first 30,000 results. Please check dehashed.com to get the remaining results."