forked from p15670423/monkey
agent: Wrap ransomware payload build/run in run_ransomware()
This commit is contained in:
parent
6773f695ba
commit
76cf8a1bb4
|
@ -236,8 +236,7 @@ class InfectionMonkey(object):
|
||||||
if not self._keep_running:
|
if not self._keep_running:
|
||||||
break
|
break
|
||||||
|
|
||||||
telemetry_messenger = TelemetryMessengerWrapper()
|
InfectionMonkey.run_ransomware()
|
||||||
RansomewarePayload(WormConfiguration.ransomware, telemetry_messenger).run_payload()
|
|
||||||
|
|
||||||
if (not is_empty) and (WormConfiguration.max_iterations > iteration_index + 1):
|
if (not is_empty) and (WormConfiguration.max_iterations > iteration_index + 1):
|
||||||
time_to_sleep = WormConfiguration.timeout_between_iterations
|
time_to_sleep = WormConfiguration.timeout_between_iterations
|
||||||
|
@ -467,3 +466,8 @@ class InfectionMonkey(object):
|
||||||
def log_arguments(self):
|
def log_arguments(self):
|
||||||
arg_string = " ".join([f"{key}: {value}" for key, value in vars(self._opts).items()])
|
arg_string = " ".join([f"{key}: {value}" for key, value in vars(self._opts).items()])
|
||||||
LOG.info(f"Monkey started with arguments: {arg_string}")
|
LOG.info(f"Monkey started with arguments: {arg_string}")
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def run_ransomware():
|
||||||
|
telemetry_messenger = TelemetryMessengerWrapper()
|
||||||
|
RansomewarePayload(WormConfiguration.ransomware, telemetry_messenger).run_payload()
|
||||||
|
|
Loading…
Reference in New Issue