From 982f92b9b65540b54b2a30f630f09ca3dbf50ef0 Mon Sep 17 00:00:00 2001 From: cgranleese-r7 Date: Mon, 12 Feb 2024 17:02:42 +0000 Subject: [PATCH] Improve error message for incompatible sessions --- lib/msf/core/session_compatibility.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/msf/core/session_compatibility.rb b/lib/msf/core/session_compatibility.rb index c57269f2a286..886fc3ede516 100644 --- a/lib/msf/core/session_compatibility.rb +++ b/lib/msf/core/session_compatibility.rb @@ -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 @@ -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