Fix #5761, pass the correct arch and platform for exe generation

Fix #5761
bug/bundler_fix
wchen-r7 2015-07-23 01:34:44 -05:00
parent 264bc0f921
commit 6720a57659
2 changed files with 6 additions and 4 deletions

View File

@ -112,7 +112,8 @@ module Exploit::CmdStager
def generate_cmdstager(opts = {}, pl = nil)
select_cmdstager(opts)
self.exe = generate_payload_exe(:code => pl)
exe_opts = { code: pl }.merge!(opts)
self.exe = generate_payload_exe(exe_opts)
if exe.nil?
raise ArgumentError, 'The executable could not be generated'

View File

@ -108,10 +108,11 @@ class Metasploit3 < Msf::Exploit::Remote
end
print_status("#{peer} - Exploiting...")
execute_cmdstager(
:flavor => :echo,
:linemax => 92
flavor: :echo,
linemax: 92,
platform: target.platform,
arch: target.arch
)
end
end