From 6cd7f4419710e89a9976b469ae4363acbe26cf19 Mon Sep 17 00:00:00 2001 From: Jack Heysel Date: Wed, 20 Mar 2024 11:39:19 -0700 Subject: [PATCH] rubocop --- .../http/opennms_horizon_authenticated_rce.rb | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/modules/exploits/linux/http/opennms_horizon_authenticated_rce.rb b/modules/exploits/linux/http/opennms_horizon_authenticated_rce.rb index 7f4077a99db2..fb92e3e29f36 100644 --- a/modules/exploits/linux/http/opennms_horizon_authenticated_rce.rb +++ b/modules/exploits/linux/http/opennms_horizon_authenticated_rce.rb @@ -839,25 +839,25 @@ def execute_command(cmd, _opts = {}) # https://docs.opennms.com/horizon/30/operation/notifications/getting-started.html def ensure_notifications_enabled res = send_request_cgi({ - 'method' => 'GET', - 'uri' => normalize_uri(target_uri.path, 'index.jsp'), - 'keep_cookies' => true - }) + 'method' => 'GET', + 'uri' => normalize_uri(target_uri.path, 'index.jsp'), + 'keep_cookies' => true + }) fail_with(Failure::UnexpectedReply, 'Failed to determine if notifications were enabled') unless res if res.get_html_document.xpath('//i[contains(@title, \'Notices: On\')]').empty? - vprint_status("Notifications are not enabled, meaning the target is not exploitable as is. Enabling notifications now...") + vprint_status('Notifications are not enabled, meaning the target is not exploitable as is. Enabling notifications now...') res2 = send_request_cgi({ - 'method' => 'POST', - 'uri' => normalize_uri(target_uri.path, 'admin', 'updateNotificationStatus'), - 'keep_cookies' => true, - 'vars_post' => { - 'status' => 'on' - } - }) + 'method' => 'POST', + 'uri' => normalize_uri(target_uri.path, 'admin', 'updateNotificationStatus'), + 'keep_cookies' => true, + 'vars_post' => { + 'status' => 'on' + } + }) fail_with(Failure::UnexpectedReply, 'Failed to enable notifications') unless res2 && res2.redirect? && res2.redirection.to_s.end_with?('/index.jsp') end - vprint_good("Notifications are enabled") + vprint_good('Notifications are enabled') end def exploit