Fix post mixin platform/session check
parent
e5ea4a53d3
commit
50c2ed8509
|
@ -166,7 +166,7 @@ module Msf::PostMixin
|
|||
if self.platform and self.platform.kind_of?(Msf::Module::PlatformList)
|
||||
[
|
||||
# Add as necessary
|
||||
"windows", "linux", "osx"
|
||||
'win', 'linux', 'osx'
|
||||
].each do |name|
|
||||
if self.platform =~ /#{name}/
|
||||
p = Msf::Module::PlatformList.transform(name)
|
||||
|
@ -176,7 +176,7 @@ module Msf::PostMixin
|
|||
elsif self.platform and self.platform.kind_of?(Msf::Module::Platform)
|
||||
p_klass = Msf::Module::Platform
|
||||
case self.platform
|
||||
when 'windows'
|
||||
when 'win'
|
||||
return false unless self.platform.kind_of?(p_klass::Windows)
|
||||
when 'osx'
|
||||
return false unless self.platform.kind_of?(p_klass::OSX)
|
||||
|
@ -188,8 +188,6 @@ module Msf::PostMixin
|
|||
# Check to make sure architectures match
|
||||
mod_arch = self.module_info['Arch']
|
||||
mod_arch = [mod_arch] unless mod_arch.kind_of?(Array)
|
||||
# TODO: what should be done with the likes of ARCH_CMD (and others) ?
|
||||
return false unless mod_arch.include?(self.arch)
|
||||
|
||||
# If we got here, we haven't found anything that definitely
|
||||
# disqualifies this session. Assume that means we can use it.
|
||||
|
|
Loading…
Reference in New Issue