diff --git a/lib/msf/core/exploit/exe.rb b/lib/msf/core/exploit/exe.rb index 832bbb93f8..225a886a73 100644 --- a/lib/msf/core/exploit/exe.rb +++ b/lib/msf/core/exploit/exe.rb @@ -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