Little change in exe-only to work with x64 arch.

unstable
agix 2013-05-19 19:01:03 +02:00
parent 993a7335b9
commit e844247163
1 changed files with 10 additions and 3 deletions

View File

@ -364,10 +364,13 @@ require 'digest/sha1'
exe
end
def self.to_win32pe_only(framework, code, opts={})
def self.to_winpe_only(framework, code, opts={}, arch="x86")
# Allow the user to specify their own EXE template
set_template_default(opts, "template_x86_windows_old.exe")
set_template_default(opts, "template_"+arch+"_windows.exe")
puts opts
pe = Rex::PeParsey::Pe.new_from_file(opts[:template], true)
@ -1968,7 +1971,11 @@ End Sub
when 'exe-only'
if(not arch or (arch.index(ARCH_X86)))
output = Msf::Util::EXE.to_win32pe_only(framework, code, exeopts)
output = Msf::Util::EXE.to_winpe_only(framework, code, exeopts)
end
if(arch and (arch.index( ARCH_X86_64 ) or arch.index( ARCH_X64 )))
output = Msf::Util::EXE.to_winpe_only(framework, code, exeopts, "x64")
end
when 'elf'