diff --git a/monkey/infection_monkey/exploit/powershell.py b/monkey/infection_monkey/exploit/powershell.py index 9c34227ee..066dfc508 100644 --- a/monkey/infection_monkey/exploit/powershell.py +++ b/monkey/infection_monkey/exploit/powershell.py @@ -55,7 +55,7 @@ class PowerShellExploiter(HostExploiter): try: use_ssl = self._is_client_using_https() except PowerShellRemotingDisabledError as e: - logging.info(e) + logger.info(e) self.exploit_result.error_message = ( "PowerShell Remoting appears to be disabled on the remote host" ) @@ -91,22 +91,22 @@ class PowerShellExploiter(HostExploiter): def _is_client_using_https(self) -> bool: try: - logging.debug("Checking if powershell remoting is enabled over HTTP.") + logger.debug("Checking if powershell remoting is enabled over HTTP.") self._try_http() return False except AuthenticationError: return False except Exception as e: - logging.debug(f"Powershell remoting over HTTP seems disabled: {e}") + logger.debug(f"Powershell remoting over HTTP seems disabled: {e}") try: - logging.debug("Checking if powershell remoting is enabled over HTTPS.") + logger.debug("Checking if powershell remoting is enabled over HTTPS.") self._try_https() return True except AuthenticationError: return True except Exception as e: - logging.debug(f"Powershell remoting over HTTPS seems disabled: {e}") + logger.debug(f"Powershell remoting over HTTPS seems disabled: {e}") raise PowerShellRemotingDisabledError("Powershell remoting seems to be disabled.") def _try_http(self):