From f37776f830b1474dc6258725b1e2ccf0fbd4da5c Mon Sep 17 00:00:00 2001 From: Matt Miller Date: Wed, 14 Dec 2005 00:43:18 +0000 Subject: [PATCH] fix for mod platform git-svn-id: file:///home/svn/incoming/trunk@3222 4d416f70-5f16-0410-b530-b9f4589650da --- lib/msf/core/exploit_driver.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/msf/core/exploit_driver.rb b/lib/msf/core/exploit_driver.rb index 9ea25a4a6f..d41c04af77 100644 --- a/lib/msf/core/exploit_driver.rb +++ b/lib/msf/core/exploit_driver.rb @@ -49,7 +49,10 @@ class ExploitDriver # current exploit. Assumes that target_idx is valid. # def compatible_payload?(payload) - return ((payload.platform & exploit.targets[target_idx].platform).empty? == false) + # Try to use the target's platform in preference of the exploit's + exp_platform = exploit.targets[target_idx].platform || exploit.platform + + return ((payload.platform & exp_platform).empty? == false) end ##