@@ -1959,22 +1959,17 @@ def self.to_executable_fmt(framework, arch, plat, code, fmt, exeopts)
1959
1959
output = Msf ::Util ::EXE . to_win32pe_aspx ( framework , code , exeopts )
1960
1960
1961
1961
when 'dll'
1962
- if ( not arch or ( arch . index ( ARCH_X86 ) ) )
1963
- output = Msf ::Util ::EXE . to_win32pe_dll ( framework , code , exeopts )
1964
- end
1965
-
1966
- if ( arch and ( arch . index ( ARCH_X86_64 ) or arch . index ( ARCH_X64 ) ) )
1967
- output = Msf ::Util ::EXE . to_win64pe_dll ( framework , code , exeopts )
1968
- end
1969
-
1962
+ output = case arch
1963
+ when ARCH_X86 , nil then to_win32pe_dll ( framework , code , exeopts )
1964
+ when ARCH_X86_64 then to_win64pe_dll ( framework , code , exeopts )
1965
+ when ARCH_64 then to_win64pe_dll ( framework , code , exeopts )
1966
+ end
1970
1967
when 'exe'
1971
- if ( not arch or ( arch . index ( ARCH_X86 ) ) )
1972
- output = Msf ::Util ::EXE . to_win32pe ( framework , code , exeopts )
1973
- end
1974
-
1975
- if ( arch and ( arch . index ( ARCH_X86_64 ) or arch . index ( ARCH_X64 ) ) )
1976
- output = Msf ::Util ::EXE . to_win64pe ( framework , code , exeopts )
1977
- end
1968
+ output = case arch
1969
+ when ARCH_X86 , nil then to_win32pe ( framework , code , exeopts )
1970
+ when ARCH_X86_64 then to_win64pe ( framework , code , exeopts )
1971
+ when ARCH_64 then to_win64pe ( framework , code , exeopts )
1972
+ end
1978
1973
1979
1974
when 'exe-small'
1980
1975
if ( not arch or ( arch . index ( ARCH_X86 ) ) )
@@ -2010,11 +2005,6 @@ def self.to_executable_fmt(framework, arch, plat, code, fmt, exeopts)
2010
2005
end
2011
2006
end
2012
2007
2013
- # this should really be 'jar'
2014
- when 'java'
2015
-
2016
-
2017
-
2018
2008
when 'macho'
2019
2009
output = case arch
2020
2010
when ARCH_X86 , nil then to_osx_x86_macho ( framework , code , exeopts )
0 commit comments