Island: Modify exploit telemetry processing to conform to changes to ExploiterResultData

This commit is contained in:
Shreya Malviya 2022-02-22 14:08:39 +05:30
parent dff5bde894
commit e47239f81c
2 changed files with 3 additions and 3 deletions

View File

@ -78,7 +78,7 @@ class EdgeService(Edge):
def update_based_on_exploit(self, exploit: Dict):
self.exploits.append(exploit)
self.save()
if exploit["result"]:
if exploit["exploitation_success"]:
self.set_exploited()
def set_exploited(self):

View File

@ -24,7 +24,7 @@ def process_exploit_telemetry(telemetry_json):
check_machine_exploited(
current_monkey=Monkey.get_single_monkey_by_guid(telemetry_json["monkey_guid"]),
exploit_successful=telemetry_json["data"]["result"],
exploit_successful=telemetry_json["data"]["exploitation_success"],
exploiter=telemetry_json["data"]["exploiter"],
target_ip=telemetry_json["data"]["machine"]["ip_addr"],
timestamp=telemetry_json["timestamp"],
@ -65,7 +65,7 @@ def update_network_with_exploit(edge: EdgeService, telemetry_json):
new_exploit.pop("machine")
new_exploit["timestamp"] = telemetry_json["timestamp"]
edge.update_based_on_exploit(new_exploit)
if new_exploit["result"]:
if new_exploit["exploitation_success"]:
NodeService.set_node_exploited(edge.dst_node_id)