From bb120962aaab396fad5a36e12ad827d92779cff4 Mon Sep 17 00:00:00 2001 From: Brent Cook Date: Tue, 22 Aug 2017 14:01:48 -0500 Subject: [PATCH] more osx support --- modules/exploits/multi/misc/java_jdwp_debugger.rb | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/modules/exploits/multi/misc/java_jdwp_debugger.rb b/modules/exploits/multi/misc/java_jdwp_debugger.rb index a9a7e53498..b42d0fab0d 100644 --- a/modules/exploits/multi/misc/java_jdwp_debugger.rb +++ b/modules/exploits/multi/misc/java_jdwp_debugger.rb @@ -685,15 +685,16 @@ class MetasploitModule < Msf::Exploit::Remote when 'linux' path = temp_path || '/tmp/' payload_exe = "#{path}#{payload_exe}" - if @os.downcase =~ /win/ - print_warning("#{@os} system detected but using Linux target...") - end + when 'osx' + path = temp_path || '/tmp/' + payload_exe = "#{path}#{payload_exe}" when 'win' path = temp_path || './' payload_exe = "#{path}#{payload_exe}.exe" - unless @os.downcase =~ /win/ - print_warning("#{@os} system detected but using Windows target...") - end + end + + if @os.downcase =~ target['Platform'] + print_warning("#{@os} system detected but using #{target['Platform']} target...") end return payload_exe, pl_exe