Skip to content

Commit

Permalink
Improve error message for incompatible sessions
Browse files Browse the repository at this point in the history
  • Loading branch information
cgranleese-r7 committed Feb 12, 2024
1 parent 69eaf75 commit 982f92b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/msf/core/session_compatibility.rb
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ def session_incompatibility_reasons(sess_or_sid)

# Can't be compatible if it's the wrong type
if session_types && !session_types.include?(s.type)
issues << "incompatible session type: #{s.type}"
issues << "incompatible session type: #{s.type}. This module works with: #{session_types.join(', ')}."
end

# Check to make sure architectures match
Expand All @@ -208,9 +208,9 @@ def session_incompatibility_reasons(sess_or_sid)

if platform && platform.is_a?(Msf::Module::PlatformList) && !platform.empty?
if s.platform.blank?
issues << 'Unknown session platform'
issues << "Unknown session platform. This module works with: #{platform.names.join(', ')}."
elsif !platform.supports?(Msf::Module::PlatformList.transform(s.platform))
issues << "incompatible session platform: #{s.platform}"
issues << "incompatible session platform: #{s.platform}. This module works with: #{platform.names.join(', ')}."
end
end

Expand Down

0 comments on commit 982f92b

Please sign in to comment.