Little change in exe-only to work with x64 arch.
parent
993a7335b9
commit
e844247163
|
@ -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'
|
||||
|
|
Loading…
Reference in New Issue