Warn user when session not compat instead of failing
This commit changes the post mixin so that the session compat check only shows a warning rather than throwing an exception and stopping the module from working completely. This is off the back of the discussion involved with #7736bug/bundler_fix
parent
fa016de78a
commit
1098bc6d90
|
@ -30,7 +30,7 @@ module Msf::PostMixin
|
|||
# @raise [OptionValidateError] if {#session} returns nil
|
||||
def setup
|
||||
unless session_compatible?(session)
|
||||
raise Msf::OptionValidateError.new(["SESSION (type not valid for this module)"])
|
||||
print_warning('SESSION may not be compatible with this module.')
|
||||
end
|
||||
|
||||
super
|
||||
|
@ -168,8 +168,8 @@ module Msf::PostMixin
|
|||
# Check to make sure architectures match
|
||||
mod_arch = self.module_info['Arch']
|
||||
unless mod_arch.nil?
|
||||
mod_arch = [mod_arch] unless mod_arch.kind_of?(Array)
|
||||
return false unless mod_arch.include? s.arch
|
||||
mod_arch = [mod_arch] unless mod_arch.kind_of?(Array)
|
||||
return false unless mod_arch.include?(s.arch)
|
||||
end
|
||||
|
||||
# If we got here, we haven't found anything that definitely
|
||||
|
|
Loading…
Reference in New Issue