From f72b32bb671abcadf2c2b60dc2527fa084ce8560 Mon Sep 17 00:00:00 2001 From: Itay Mizeretz Date: Mon, 27 Nov 2017 15:51:56 +0200 Subject: [PATCH] Removed duplicate issues --- monkey_island/cc/services/report.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/monkey_island/cc/services/report.py b/monkey_island/cc/services/report.py index 609b17c31..30cdf14ec 100644 --- a/monkey_island/cc/services/report.py +++ b/monkey_island/cc/services/report.py @@ -208,8 +208,12 @@ class ReportService: @staticmethod def get_exploits(): - return [ReportService.process_exploit(exploit) for - exploit in mongo.db.telemetry.find({'telem_type': 'exploit', 'data.result': True})] + exploits = [] + for exploit in mongo.db.telemetry.find({'telem_type': 'exploit', 'data.result': True}): + new_exploit = ReportService.process_exploit(exploit) + if new_exploit not in exploits: + exploits.append(new_exploit) + return exploits @staticmethod def get_monkey_subnets(monkey_guid):