forked from p15670423/monkey
ui: display cross-segment issues as "pinged" if no services/ports
Issue #819
This commit is contained in:
parent
cc9b88b8e5
commit
c8b4089bd2
|
@ -452,24 +452,58 @@ class ReportPageComponent extends AuthComponent {
|
||||||
|
|
||||||
generateCrossSegmentIssue(crossSegmentIssue) {
|
generateCrossSegmentIssue(crossSegmentIssue) {
|
||||||
let crossSegmentIssueOverview = 'Communication possible from ' + crossSegmentIssue['source_subnet'] + ' to ' + crossSegmentIssue['target_subnet']
|
let crossSegmentIssueOverview = 'Communication possible from ' + crossSegmentIssue['source_subnet'] + ' to ' + crossSegmentIssue['target_subnet']
|
||||||
return <li key={crossSegmentIssueOverview}>
|
|
||||||
{crossSegmentIssueOverview}
|
return (
|
||||||
<CollapsibleWellComponent>
|
<li key={crossSegmentIssueOverview}>
|
||||||
<ul>
|
{crossSegmentIssueOverview}
|
||||||
{crossSegmentIssue['issues'].map(x =>
|
<CollapsibleWellComponent>
|
||||||
x['is_self'] ?
|
<ul>
|
||||||
<li key={x['hostname']}>
|
{crossSegmentIssue['issues'].map(issue => this.generateCrossSegmentIssueListItem(issue))}
|
||||||
{'Machine ' + x['hostname'] + ' has both ips: ' + x['source'] + ' and ' + x['target']}
|
</ul>
|
||||||
</li>
|
</CollapsibleWellComponent>
|
||||||
:
|
</li>
|
||||||
<li key={x['source'] + x['target']}>
|
);
|
||||||
{'IP ' + x['source'] + ' (' + x['hostname'] + ') connected to IP ' + x['target']
|
}
|
||||||
+ ' using the services: ' + Object.keys(x['services']).join(', ')}
|
|
||||||
</li>
|
generateCrossSegmentIssueListItem(issue) {
|
||||||
)}
|
if (issue['is_self']) {
|
||||||
</ul>
|
return this.generateCrossSegmentSingleHostMessage(issue);
|
||||||
</CollapsibleWellComponent>
|
}
|
||||||
</li>;
|
|
||||||
|
return this.generateCrossSegmentMultiHostMessage(issue);
|
||||||
|
}
|
||||||
|
|
||||||
|
generateCrossSegmentSingleHostMessage(issue) {
|
||||||
|
return (
|
||||||
|
<li key={issue['hostname']}>
|
||||||
|
{'Machine ' + issue['hostname'] + ' has both ips: ' + issue['source'] + ' and ' + issue['target']}
|
||||||
|
</li>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
generateCrossSegmentMultiHostMessage(issue) {
|
||||||
|
return (
|
||||||
|
<li key={issue['source'] + issue['target']}>
|
||||||
|
{
|
||||||
|
Object.keys(issue['services']).length > 0 ?
|
||||||
|
this.generateCrossSegmentServiceMessage(issue) :
|
||||||
|
this.generateCrossSegmentPingMessage(issue)
|
||||||
|
}
|
||||||
|
</li>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
generateCrossSegmentServiceMessage(issue) {
|
||||||
|
return (
|
||||||
|
'IP ' + issue['source'] + ' (' + issue['hostname'] + ') connected to IP ' + issue['target']
|
||||||
|
+ ' using the services: ' + Object.keys(issue['services']).join(', ')
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
generateCrossSegmentPingMessage(issue) {
|
||||||
|
return (
|
||||||
|
`IP ${issue['source']} (${issue['hostname']}) successfully pinged IP ${issue['target']}`
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
generateShellshockPathListBadges(paths) {
|
generateShellshockPathListBadges(paths) {
|
||||||
|
|
Loading…
Reference in New Issue