Skip to content

Commit ba52331

Browse files
committed
Fix SSH scanner tests when report summary enabled
1 parent e549e0c commit ba52331

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/msf/core/auxiliary/report_summary.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def run
4444
# @param [Hash] credential_data
4545
# @return [Metasploit::Credential::Login]
4646
def create_credential_login(credential_data)
47-
return super unless framework.features.enabled?(Msf::FeatureManager::SHOW_SUCCESSFUL_LOGINS) && datastore['ShowSuccessfulLogins']
47+
return super unless framework.features.enabled?(Msf::FeatureManager::SHOW_SUCCESSFUL_LOGINS) && datastore['ShowSuccessfulLogins'] && @report
4848

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

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

0 commit comments

Comments
 (0)