Agent: Rename message to error_message

This commit is contained in:
Kekoa Kaaikala 2022-10-07 13:14:03 +00:00
parent ce6ca64b4d
commit bc0adb2193
1 changed files with 7 additions and 7 deletions

View File

@ -148,16 +148,16 @@ class SMBExploiter(HostExploiter):
else:
# failed exploiting with this user/pass
self.report_login_attempt(False, user, password, lm_hash, ntlm_hash)
message = f"Failed to login using SMB with {creds_for_log}"
self._publish_exploitation_event(timestamp, False, error_message=message)
error_message = f"Failed to login using SMB with {creds_for_log}"
self._publish_exploitation_event(timestamp, False, error_message=error_message)
except Exception as exc:
message = (
error_message = (
f"Error while trying to copy file using SMB to {self.host.ip_addr} with "
f"{creds_for_log}:{exc}"
)
logger.error(message)
self._publish_exploitation_event(timestamp, False, error_message=message)
logger.error(error_message)
self._publish_exploitation_event(timestamp, False, error_message=error_message)
continue
return remote_full_path, SelectedCredentials(user, password, lm_hash, ntlm_hash), timestamp
@ -245,8 +245,8 @@ class SMBExploiter(HostExploiter):
self._publish_propagation_event(start_time, True)
status = ScanStatus.USED
except Exception:
message = "Failed to start the service"
self._publish_propagation_event(start_time, False, error_message=message)
error_message = "Failed to start the service"
self._publish_propagation_event(start_time, False, error_message=error_message)
status = ScanStatus.SCANNED
self.telemetry_messenger.send_telemetry(T1035Telem(status, UsageEnum.SMB))