Agent: Use format strings in powershell exploiter log statements
This commit is contained in:
parent
f046e9d7a7
commit
1da79f78bf
|
@ -57,16 +57,16 @@ class PowerShellExploiter(HostExploiter):
|
||||||
client = self._authenticate(username, password)
|
client = self._authenticate(username, password)
|
||||||
|
|
||||||
LOG.info(
|
LOG.info(
|
||||||
"Successfully logged into {self.host.ip_addr} using Powershell. User: "
|
f"Successfully logged into {self.host.ip_addr} using Powershell. User: "
|
||||||
"{username}"
|
f"{username}"
|
||||||
)
|
)
|
||||||
self.report_login_attempt(True, username, password)
|
self.report_login_attempt(True, username, password)
|
||||||
|
|
||||||
return client
|
return client
|
||||||
except Exception as ex: # noqa: F841
|
except Exception as ex: # noqa: F841
|
||||||
LOG.debug(
|
LOG.debug(
|
||||||
"Error logging into {self.host.ip_addr} using Powershell. User: "
|
f"Error logging into {self.host.ip_addr} using Powershell. User: "
|
||||||
"{username}, Error: {ex}"
|
f"{username}, Error: {ex}"
|
||||||
)
|
)
|
||||||
self.report_login_attempt(False, username, password)
|
self.report_login_attempt(False, username, password)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue