Skip to content

Commit

Permalink
Land rapid7#19336, Fix SSH scanner tests when report summary enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
sjanusz-r7 authored Jul 22, 2024
2 parents db5ace8 + ba52331 commit 1108afb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/msf/core/auxiliary/report_summary.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def run
# @param [Hash] credential_data
# @return [Metasploit::Credential::Login]
def create_credential_login(credential_data)
return super unless framework.features.enabled?(Msf::FeatureManager::SHOW_SUCCESSFUL_LOGINS) && datastore['ShowSuccessfulLogins']
return super unless framework.features.enabled?(Msf::FeatureManager::SHOW_SUCCESSFUL_LOGINS) && datastore['ShowSuccessfulLogins'] && @report

credential = {
public: credential_data[:username],
Expand All @@ -65,7 +65,7 @@ def create_credential_login(credential_data)
# @param [Msf::Sessions::<SESSION_CLASS>] sess
# @return [Msf::Sessions::<SESSION_CLASS>]
def start_session(obj, info, ds_merge, crlf = false, sock = nil, sess = nil)
return super unless framework.features.enabled?(Msf::FeatureManager::SHOW_SUCCESSFUL_LOGINS) && datastore['ShowSuccessfulLogins']
return super unless framework.features.enabled?(Msf::FeatureManager::SHOW_SUCCESSFUL_LOGINS) && datastore['ShowSuccessfulLogins'] && @report

result = super
@report[rhost].merge!({ successful_sessions: [] })
Expand Down

0 comments on commit 1108afb

Please sign in to comment.