From 7eaeef69193e44011174b8f03ad50ccac7fc5ac9 Mon Sep 17 00:00:00 2001 From: Dhayalan Date: Wed, 13 Mar 2019 13:07:59 +0100 Subject: [PATCH 1/3] Update ReportPage.js Fix for issue #213 --- .../monkey_island/cc/ui/src/components/pages/ReportPage.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/monkey/monkey_island/cc/ui/src/components/pages/ReportPage.js b/monkey/monkey_island/cc/ui/src/components/pages/ReportPage.js index b5ab30581..e62bdcc59 100644 --- a/monkey/monkey_island/cc/ui/src/components/pages/ReportPage.js +++ b/monkey/monkey_island/cc/ui/src/components/pages/ReportPage.js @@ -403,9 +403,8 @@ class ReportPageComponent extends AuthComponent { generateReportRecommendationsSection() { return (
-

- Domain related recommendations -

+ {Object.keys(this.state.report.recommendations.domain_issues).length !=0 ? +

Domain related recommendations

: null }
{this.generateIssues(this.state.report.recommendations.domain_issues)}
From 3c5625404cac8948ed560126a4ec111df0a20e19 Mon Sep 17 00:00:00 2001 From: VakarisZ Date: Tue, 16 Apr 2019 14:16:41 +0300 Subject: [PATCH 2/3] SSH exploiter handles exception better --- monkey/infection_monkey/exploit/sshexec.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monkey/infection_monkey/exploit/sshexec.py b/monkey/infection_monkey/exploit/sshexec.py index 8a58f18c6..395b3e448 100644 --- a/monkey/infection_monkey/exploit/sshexec.py +++ b/monkey/infection_monkey/exploit/sshexec.py @@ -84,7 +84,7 @@ class SSHExploiter(HostExploiter): self.report_login_attempt(True, user, curpass) break - except Exception as exc: + except paramiko.AuthenticationException as exc: LOG.debug("Error logging into victim %r with user" " %s and password '%s': (%s)", self.host, user, curpass, exc) From 93b0c34f07fc4157c16196c02835c81b78705c14 Mon Sep 17 00:00:00 2001 From: Shay Nehmad Date: Tue, 16 Apr 2019 16:36:43 +0300 Subject: [PATCH 3/3] Fixed comparison to be !== and not != also, fixed the same issue for machine-related issues and added documentation. --- .../cc/ui/src/components/pages/ReportPage.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/monkey/monkey_island/cc/ui/src/components/pages/ReportPage.js b/monkey/monkey_island/cc/ui/src/components/pages/ReportPage.js index 873d31253..43be6367c 100644 --- a/monkey/monkey_island/cc/ui/src/components/pages/ReportPage.js +++ b/monkey/monkey_island/cc/ui/src/components/pages/ReportPage.js @@ -404,14 +404,17 @@ class ReportPageComponent extends AuthComponent { generateReportRecommendationsSection() { return (
- {Object.keys(this.state.report.recommendations.domain_issues).length !=0 ? + {/* Checks if there are any domain issues. If there are more then one: render the title. Otherwise, + * don't render it (since the issues themselves will be empty. */} + {Object.keys(this.state.report.recommendations.domain_issues).length !== 0 ?

Domain related recommendations

: null }
{this.generateIssues(this.state.report.recommendations.domain_issues)}
-

- Machine related Recommendations -

+ {/* Checks if there are any issues. If there are more then one: render the title. Otherwise, + * don't render it (since the issues themselves will be empty. */} + {Object.keys(this.state.report.recommendations.issues).length !== 0 ? +

Machine related recommendations

: null }
{this.generateIssues(this.state.report.recommendations.issues)}