From 4c1747d2e612dbbed28eb40d4e96e7ea7fe31756 Mon Sep 17 00:00:00 2001 From: VakarisZ Date: Wed, 28 Jul 2021 15:58:17 +0300 Subject: [PATCH] Island: change island report to only send exploited machine count to UI instead of whole machine list --- monkey/monkey_island/cc/services/reporting/report.py | 4 ++-- .../ui/src/components/report-components/SecurityReport.js | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/monkey/monkey_island/cc/services/reporting/report.py b/monkey/monkey_island/cc/services/reporting/report.py index 6b9265435..3bc56f737 100644 --- a/monkey/monkey_island/cc/services/reporting/report.py +++ b/monkey/monkey_island/cc/services/reporting/report.py @@ -610,7 +610,7 @@ class ReportService: monkey_latest_modify_time = Monkey.get_latest_modifytime() scanned_nodes = ReportService.get_scanned() - exploited_nodes = get_monkey_exploited() + exploited_cnt = len(get_monkey_exploited()) report = { "overview": { "manual_monkeys": ReportService.get_manual_monkey_hostnames(), @@ -628,7 +628,7 @@ class ReportService: }, "glance": { "scanned": scanned_nodes, - "exploited": exploited_nodes, + "exploited_cnt": exploited_cnt, "stolen_creds": ReportService.get_stolen_creds(), "azure_passwords": ReportService.get_azure_creds(), "ssh_keys": ReportService.get_ssh_keys(), diff --git a/monkey/monkey_island/cc/ui/src/components/report-components/SecurityReport.js b/monkey/monkey_island/cc/ui/src/components/report-components/SecurityReport.js index f7cffd277..6825fb1d4 100644 --- a/monkey/monkey_island/cc/ui/src/components/report-components/SecurityReport.js +++ b/monkey/monkey_island/cc/ui/src/components/report-components/SecurityReport.js @@ -288,9 +288,9 @@ class ReportPageComponent extends AuthComponent {

Overview

- 0}/> + 0}/> { - this.state.report.glance.exploited.length > 0 ? + this.state.report.glance.exploited_cnt > 0 ? '' :

@@ -524,7 +524,7 @@ class ReportPageComponent extends AuthComponent { generateReportGlanceSection() { let exploitPercentage = - (100 * this.state.report.glance.exploited.length) / this.state.report.glance.scanned.length; + (100 * this.state.report.glance.exploited_cnt) / this.state.report.glance.scanned.length; return (

@@ -535,7 +535,7 @@ class ReportPageComponent extends AuthComponent { The Monkey discovered {this.state.report.glance.scanned.length} machines and successfully breached {this.state.report.glance.exploited.length} of them. + className='badge badge-danger'>{this.state.report.glance.exploited_cnt} of them.