Avoid Msf::Module::Platform

We don't know how to generate an exe payload if the platform is
Msf::Module::Platform, so don't use it.
bug/bundler_fix
wchen-r7 2015-12-08 21:40:30 -06:00
parent 9e52663705
commit 07ef09e0b6
1 changed files with 3 additions and 2 deletions

View File

@ -181,12 +181,12 @@ protected
# Architecture shares the same load order.
unless opts[:platform]
if self.respond_to? :payload_instance
if self.respond_to?(:payload_instance) && payload_instance.platform.platforms != [Msf::Module::Platform]
opts[:platform] = payload_instance.platform
elsif self.respond_to? :target_platform
opts[:platform] = target_platform
elsif self.respond_to? :platform
opts[:platform] = platform
opts[:platform] = platform
end
end
@ -194,6 +194,7 @@ protected
if self.respond_to? :payload_instance
opts[:arch] = payload_instance.arch
elsif self.respond_to? :target_arch
$stderr.puts "target specific arch"
opts[:arch] = target_arch
elsif self.respond_to? :arch
opts[:arch] = arch