Skip to content

Commit 6e830a8

Browse files
committed
Land rapid7#7737, print_warning on session_compatible?
2 parents d9f5385 + 1098bc6 commit 6e830a8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/msf/core/post_mixin.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def initialize(info={})
3030
# @raise [OptionValidateError] if {#session} returns nil
3131
def setup
3232
unless session_compatible?(session)
33-
raise Msf::OptionValidateError.new(["SESSION (type not valid for this module)"])
33+
print_warning('SESSION may not be compatible with this module.')
3434
end
3535

3636
super
@@ -168,8 +168,8 @@ def session_compatible?(sess_or_sid)
168168
# Check to make sure architectures match
169169
mod_arch = self.module_info['Arch']
170170
unless mod_arch.nil?
171-
mod_arch = [mod_arch] unless mod_arch.kind_of?(Array)
172-
return false unless mod_arch.include? s.arch
171+
mod_arch = [mod_arch] unless mod_arch.kind_of?(Array)
172+
return false unless mod_arch.include?(s.arch)
173173
end
174174

175175
# If we got here, we haven't found anything that definitely

0 commit comments

Comments
 (0)