Add session warnings on new lies

This commit is contained in:
adfoster-r7 2021-09-15 17:42:56 +01:00
parent 39ca4660a9
commit 6072382666
No known key found for this signature in database
GPG Key ID: 3BD4FA3818818F04
1 changed files with 5 additions and 2 deletions

View File

@ -50,8 +50,11 @@ module Msf::PostMixin
check_for_session_readiness if session.type == "meterpreter"
incompatibility_reasons = session_incompatibility_reasons(session)
unless incompatibility_reasons.empty?
print_warning("SESSION may not be compatible with this module (#{incompatibility_reasons.join('. ')})")
if incompatibility_reasons.any?
print_warning("SESSION may not be compatible with this module:")
incompatibility_reasons.each do |reason|
print_warning(" * #{reason}")
end
end
# Msf::Exploit#setup for exploits, NoMethodError for post modules