@@ -893,7 +893,7 @@ def self.to_vba(framework,code,opts={})
893
893
end
894
894
895
895
def self . to_win32pe_vba ( framework , code , opts = { } )
896
- to_exe_vba ( to_win32pe ( framework , code , opts ) )
896
+ to_exe_vba ( to_executable ( framework , code , opts ) )
897
897
end
898
898
899
899
def self . to_exe_vbs ( exes = '' , opts = { } )
@@ -1674,10 +1674,12 @@ def self.to_executable_fmt(framework, arch, plat, code, fmt, exeopts)
1674
1674
1675
1675
case fmt
1676
1676
when 'asp'
1677
- output = Msf ::Util ::EXE . to_win32pe_asp ( framework , code , exeopts )
1677
+ exe = to_executable_fmt ( framework , arch , plat , code , 'exe' , exeopts )
1678
+ output = Msf ::Util ::EXE . to_exe_asp ( exe , exeopts )
1678
1679
1679
1680
when 'aspx'
1680
- output = Msf ::Util ::EXE . to_win32pe_aspx ( framework , code , exeopts )
1681
+ exe = to_executable_fmt ( framework , arch , plat , code , 'exe' , exeopts )
1682
+ output = Msf ::Util ::EXE . to_exe_aspx ( exe , exeopts )
1681
1683
1682
1684
when 'dll'
1683
1685
output = case arch
@@ -1737,14 +1739,16 @@ def self.to_executable_fmt(framework, arch, plat, code, fmt, exeopts)
1737
1739
output = Msf ::Util ::EXE . to_vba ( framework , code , exeopts )
1738
1740
1739
1741
when 'vba-exe'
1740
- exe = Msf :: Util :: EXE . to_win32pe ( framework , code , exeopts )
1742
+ exe = to_executable_fmt ( framework , arch , plat , code , 'exe' , exeopts )
1741
1743
output = Msf ::Util ::EXE . to_exe_vba ( exe )
1742
1744
1743
1745
when 'vbs'
1744
- output = Msf ::Util ::EXE . to_win32pe_vbs ( framework , code , exeopts . merge ( { :persist => false } ) )
1746
+ exe = to_executable_fmt ( framework , arch , plat , code , 'exe' , exeopts )
1747
+ output = Msf ::Util ::EXE . to_exe_vbs ( exe , exeopts . merge ( { :persist => false } ) )
1745
1748
1746
1749
when 'loop-vbs'
1747
- output = Msf ::Util ::EXE . to_win32pe_vbs ( framework , code , exeopts . merge ( { :persist => true } ) )
1750
+ exe = exe = to_executable_fmt ( framework , arch , plat , code , 'exe' , exeopts )
1751
+ output = Msf ::Util ::EXE . to_exe_vbs ( exe , exeopts . merge ( { :persist => true } ) )
1748
1752
1749
1753
when 'war'
1750
1754
arch ||= [ ARCH_X86 ]
0 commit comments