diff --git a/cme/modules/empire_exec.py b/cme/modules/empire_exec.py index 2f04e953..d1ad3557 100644 --- a/cme/modules/empire_exec.py +++ b/cme/modules/empire_exec.py @@ -41,7 +41,11 @@ class CMEModule: obfuscate = True if "OBFUSCATE" in module_options else False # we can use commands instead of backslashes - this is because Linux and OSX treat them differently default_obfuscation = "Token,All,1" - obfuscate_cmd = module_options["OBFUSCATE_CMD"] if "OBFUSCATE_CMD" in module_options else default_obfuscation + obfuscate_cmd = ( + module_options["OBFUSCATE_CMD"] + if "OBFUSCATE_CMD" in module_options + else default_obfuscation + ) context.log.debug(f"Obfuscate: {obfuscate} - Obfuscate_cmd: {obfuscate_cmd}") # Pull the host and port from the config file @@ -89,7 +93,7 @@ class CMEModule: "UserAgent": "default", "Proxy": "default", "ProxyCreds": "default", - "Bypasses": "mattifestation etw" + "Bypasses": "mattifestation etw", }, } try: @@ -107,7 +111,9 @@ class CMEModule: if "not found" in stager_response.json()["detail"]: context.log.fail(f"Listener {module_options['LISTENER']} not found") else: - context.log.fail(f"Stager response received a non-200 when creating stager: {stager_response.status_code} {stager_response.text}") + context.log.fail( + f"Stager response received a non-200 when creating stager: {stager_response.status_code} {stager_response.text}" + ) sys.exit(1) context.log.debug(f"Response Code: {stager_response.status_code}") @@ -132,7 +138,9 @@ class CMEModule: f"Successfully generated launcher for listener '{module_options['LISTENER']}'" ) else: - context.log.fail(f"Something went wrong when retrieving stager Powershell command") + context.log.fail( + f"Something went wrong when retrieving stager Powershell command" + ) def on_admin_login(self, context, connection): if self.empire_launcher: