Agent: Use format strings in powershell exploiter log statements

This commit is contained in:
Mike Salvatore 2021-08-24 15:32:51 -04:00
parent f046e9d7a7
commit 1da79f78bf
1 changed files with 4 additions and 4 deletions

View File

@ -57,16 +57,16 @@ class PowerShellExploiter(HostExploiter):
client = self._authenticate(username, password)
LOG.info(
"Successfully logged into {self.host.ip_addr} using Powershell. User: "
"{username}"
f"Successfully logged into {self.host.ip_addr} using Powershell. User: "
f"{username}"
)
self.report_login_attempt(True, username, password)
return client
except Exception as ex: # noqa: F841
LOG.debug(
"Error logging into {self.host.ip_addr} using Powershell. User: "
"{username}, Error: {ex}"
f"Error logging into {self.host.ip_addr} using Powershell. User: "
f"{username}, Error: {ex}"
)
self.report_login_attempt(False, username, password)