more osx support

bug/bundler_fix
Brent Cook 2017-08-22 14:01:48 -05:00
parent 7263c7a66e
commit bb120962aa
1 changed files with 7 additions and 6 deletions

View File

@ -685,15 +685,16 @@ class MetasploitModule < Msf::Exploit::Remote
when 'linux' when 'linux'
path = temp_path || '/tmp/' path = temp_path || '/tmp/'
payload_exe = "#{path}#{payload_exe}" payload_exe = "#{path}#{payload_exe}"
if @os.downcase =~ /win/ when 'osx'
print_warning("#{@os} system detected but using Linux target...") path = temp_path || '/tmp/'
end payload_exe = "#{path}#{payload_exe}"
when 'win' when 'win'
path = temp_path || './' path = temp_path || './'
payload_exe = "#{path}#{payload_exe}.exe" payload_exe = "#{path}#{payload_exe}.exe"
unless @os.downcase =~ /win/ end
print_warning("#{@os} system detected but using Windows target...")
end if @os.downcase =~ target['Platform']
print_warning("#{@os} system detected but using #{target['Platform']} target...")
end end
return payload_exe, pl_exe return payload_exe, pl_exe