Agent: Format with Black

This commit is contained in:
Mike Salvatore 2022-03-30 13:51:48 -04:00
parent 53d36a7a0c
commit 86b8cf63b9
3 changed files with 3 additions and 3 deletions

View File

@ -11,7 +11,6 @@ logger = logging.getLogger(__name__)
class MimikatzCredentialCollector(ICredentialCollector):
def collect_credentials(self, options=None) -> Sequence[Credentials]:
logger.info("Attempting to collect windows credentials with pypykatz.")
creds = pypykatz_handler.get_windows_creds()

View File

@ -30,6 +30,7 @@ def get_ssh_info(telemetry_messenger: ITelemetryMessenger) -> Iterable[Dict]:
def _get_home_dirs() -> Iterable[Dict]:
import pwd
root_dir = _get_ssh_struct("root", "")
home_dirs = [
_get_ssh_struct(x.pw_name, x.pw_dir) for x in pwd.getpwall() if x.pw_dir.startswith("/home")

View File

@ -145,12 +145,12 @@ class DrupalExploiter(WebRCE):
def is_response_cached(r: requests.Response) -> bool:
""" Check if a response had the cache header. """
"""Check if a response had the cache header."""
return "X-Drupal-Cache" in r.headers and r.headers["X-Drupal-Cache"] == "HIT"
def find_exploitbale_article_ids(base_url: str, lower: int = 1, upper: int = 100) -> set:
""" Find target articles that do not 404 and are not cached """
"""Find target articles that do not 404 and are not cached"""
articles = set()
while lower < upper:
node_url = urljoin(base_url, str(lower))