forked from p15670423/monkey
Island: change island report to only send exploited machine count to UI instead of whole machine list
This commit is contained in:
parent
15fad50393
commit
4c1747d2e6
|
@ -610,7 +610,7 @@ class ReportService:
|
||||||
monkey_latest_modify_time = Monkey.get_latest_modifytime()
|
monkey_latest_modify_time = Monkey.get_latest_modifytime()
|
||||||
|
|
||||||
scanned_nodes = ReportService.get_scanned()
|
scanned_nodes = ReportService.get_scanned()
|
||||||
exploited_nodes = get_monkey_exploited()
|
exploited_cnt = len(get_monkey_exploited())
|
||||||
report = {
|
report = {
|
||||||
"overview": {
|
"overview": {
|
||||||
"manual_monkeys": ReportService.get_manual_monkey_hostnames(),
|
"manual_monkeys": ReportService.get_manual_monkey_hostnames(),
|
||||||
|
@ -628,7 +628,7 @@ class ReportService:
|
||||||
},
|
},
|
||||||
"glance": {
|
"glance": {
|
||||||
"scanned": scanned_nodes,
|
"scanned": scanned_nodes,
|
||||||
"exploited": exploited_nodes,
|
"exploited_cnt": exploited_cnt,
|
||||||
"stolen_creds": ReportService.get_stolen_creds(),
|
"stolen_creds": ReportService.get_stolen_creds(),
|
||||||
"azure_passwords": ReportService.get_azure_creds(),
|
"azure_passwords": ReportService.get_azure_creds(),
|
||||||
"ssh_keys": ReportService.get_ssh_keys(),
|
"ssh_keys": ReportService.get_ssh_keys(),
|
||||||
|
|
|
@ -288,9 +288,9 @@ class ReportPageComponent extends AuthComponent {
|
||||||
<h2>
|
<h2>
|
||||||
Overview
|
Overview
|
||||||
</h2>
|
</h2>
|
||||||
<SecurityIssuesGlance issuesFound={this.state.report.glance.exploited.length > 0}/>
|
<SecurityIssuesGlance issuesFound={this.state.report.glance.exploited_cnt > 0}/>
|
||||||
{
|
{
|
||||||
this.state.report.glance.exploited.length > 0 ?
|
this.state.report.glance.exploited_cnt > 0 ?
|
||||||
''
|
''
|
||||||
:
|
:
|
||||||
<p className='alert alert-info'>
|
<p className='alert alert-info'>
|
||||||
|
@ -524,7 +524,7 @@ class ReportPageComponent extends AuthComponent {
|
||||||
|
|
||||||
generateReportGlanceSection() {
|
generateReportGlanceSection() {
|
||||||
let exploitPercentage =
|
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 (
|
return (
|
||||||
<div id='glance'>
|
<div id='glance'>
|
||||||
<h3>
|
<h3>
|
||||||
|
@ -535,7 +535,7 @@ class ReportPageComponent extends AuthComponent {
|
||||||
The Monkey discovered <span
|
The Monkey discovered <span
|
||||||
className='badge badge-warning'>{this.state.report.glance.scanned.length}</span> machines and
|
className='badge badge-warning'>{this.state.report.glance.scanned.length}</span> machines and
|
||||||
successfully breached <span
|
successfully breached <span
|
||||||
className='badge badge-danger'>{this.state.report.glance.exploited.length}</span> of them.
|
className='badge badge-danger'>{this.state.report.glance.exploited_cnt}</span> of them.
|
||||||
</p>
|
</p>
|
||||||
<div className='text-center' style={{margin: '10px'}}>
|
<div className='text-center' style={{margin: '10px'}}>
|
||||||
<Line style={{width: '300px', marginRight: '5px'}} percent={exploitPercentage} strokeWidth='4'
|
<Line style={{width: '300px', marginRight: '5px'}} percent={exploitPercentage} strokeWidth='4'
|
||||||
|
|
Loading…
Reference in New Issue