From f27194a8ce4bae06162d2fdc6ec37d3196ebcf43 Mon Sep 17 00:00:00 2001 From: Meatballs Date: Wed, 20 Nov 2013 20:14:59 +0000 Subject: [PATCH 1/3] Always default to payload options --- lib/msf/core/exploit/exe.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/msf/core/exploit/exe.rb b/lib/msf/core/exploit/exe.rb index cfee6d58af..56032aac6b 100644 --- a/lib/msf/core/exploit/exe.rb +++ b/lib/msf/core/exploit/exe.rb @@ -133,8 +133,10 @@ protected # Prefer the target's platform/architecture information, but use # the module's if no target specific information exists + opts[:platform] ||= payload_instance.platform if self.respond_to? payload_instance opts[:platform] ||= target_platform if self.respond_to? :target_platform opts[:platform] ||= platform if self.respond_to? :platform + opts[:arch] ||= payload_instance.arch if self.respond_to? :payload_instance opts[:arch] ||= target_arch if self.respond_to? :target_arch opts[:arch] ||= arch if self.respond_to? :arch end From 7253cc73d501be8f0b2987323ba56b55bdb11bce Mon Sep 17 00:00:00 2001 From: Meatballs Date: Wed, 20 Nov 2013 20:28:00 +0000 Subject: [PATCH 2/3] :payload_instance --- lib/msf/core/exploit/exe.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/msf/core/exploit/exe.rb b/lib/msf/core/exploit/exe.rb index 56032aac6b..2b5e1b807b 100644 --- a/lib/msf/core/exploit/exe.rb +++ b/lib/msf/core/exploit/exe.rb @@ -133,7 +133,8 @@ protected # Prefer the target's platform/architecture information, but use # the module's if no target specific information exists - opts[:platform] ||= payload_instance.platform if self.respond_to? payload_instance + puts "here!" + opts[:platform] ||= payload_instance.platform if self.respond_to? :payload_instance opts[:platform] ||= target_platform if self.respond_to? :target_platform opts[:platform] ||= platform if self.respond_to? :platform opts[:arch] ||= payload_instance.arch if self.respond_to? :payload_instance From 3ed84d1e0b9bce475f89c9a51e2a0d66f85a6458 Mon Sep 17 00:00:00 2001 From: Meatballs Date: Wed, 20 Nov 2013 20:29:54 +0000 Subject: [PATCH 3/3] Remove puts --- lib/msf/core/exploit/exe.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/msf/core/exploit/exe.rb b/lib/msf/core/exploit/exe.rb index 2b5e1b807b..4dcbe1edbc 100644 --- a/lib/msf/core/exploit/exe.rb +++ b/lib/msf/core/exploit/exe.rb @@ -133,7 +133,6 @@ protected # Prefer the target's platform/architecture information, but use # the module's if no target specific information exists - puts "here!" opts[:platform] ||= payload_instance.platform if self.respond_to? :payload_instance opts[:platform] ||= target_platform if self.respond_to? :target_platform opts[:platform] ||= platform if self.respond_to? :platform