forked from p15670423/monkey
Island: Extract getScannedVsExploitedStats() method
This commit is contained in:
parent
6fdf0858ac
commit
ced3c3b137
|
@ -18,23 +18,29 @@ class RansomwareReport extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
getExploitationStats() {
|
getExploitationStats() {
|
||||||
let num_scanned = this.props.report.propagation_stats.num_scanned_nodes;
|
|
||||||
let num_exploited = this.props.report.propagation_stats.num_exploited_nodes;
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<h2>
|
<h2>
|
||||||
Propagation
|
Propagation
|
||||||
</h2>
|
</h2>
|
||||||
<p>
|
{this.getScannedVsExploitedStats()}
|
||||||
The Monkey discovered <span className='badge badge-warning'>{num_scanned}</span> machines
|
|
||||||
and successfully breached <span className='badge badge-danger'>{num_exploited}</span> of them.
|
|
||||||
</p>
|
|
||||||
{this.getExploitationStatsPerExploit()}
|
{this.getExploitationStatsPerExploit()}
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getScannedVsExploitedStats() {
|
||||||
|
let num_scanned = this.props.report.propagation_stats.num_scanned_nodes;
|
||||||
|
let num_exploited = this.props.report.propagation_stats.num_exploited_nodes;
|
||||||
|
|
||||||
|
return(
|
||||||
|
<p>
|
||||||
|
The Monkey discovered <span className='badge badge-warning'>{num_scanned}</span> machines
|
||||||
|
and successfully breached <span className='badge badge-danger'>{num_exploited}</span> of them.
|
||||||
|
</p>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
getExploitationStatsPerExploit() {
|
getExploitationStatsPerExploit() {
|
||||||
let exploit_counts = this.props.report.propagation_stats.num_exploited_per_exploit;
|
let exploit_counts = this.props.report.propagation_stats.num_exploited_per_exploit;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue