1
mirror of https://github.com/rapid7/metasploit-framework synced 2024-11-05 14:57:30 +01:00

Fix a bug generating executables when no arch was defined

git-svn-id: file:///home/svn/framework3/trunk@6976 4d416f70-5f16-0410-b530-b9f4589650da
This commit is contained in:
HD Moore 2009-08-25 23:23:39 +00:00
parent 882ae5b9dd
commit 7555e259db

View File

@ -191,8 +191,15 @@ case cmd
case fmt
when 'exe'
exe = Msf::Util::EXE.to_win32pe($framework, raw) if arch.index( ARCH_X86 )
exe = Msf::Util::EXE.to_win64pe($framework, raw) if arch.index( ARCH_X86_64 ) or arch.index( ARCH_X64 )
exe = nil
if(not arch or (arch.index(ARCH_X86)))
exe = Msf::Util::EXE.to_win32pe($framework, raw)
end
if(arch and (arch.index( ARCH_X86_64 ) or arch.index( ARCH_X64 )))
exe = Msf::Util::EXE.to_win64pe($framework, raw) if arch.index( ARCH_X86_64 ) or arch.index( ARCH_X64 )
end
if(not output)
$stdout.write(exe)
else