forked from p34709852/monkey
Agent: Rename message to error_message
This commit is contained in:
parent
ce6ca64b4d
commit
bc0adb2193
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue