Fixes .war file creation

This commit is contained in:
Meatballs 2013-12-22 20:58:21 +00:00
parent 2510580c19
commit f112e78de9
No known key found for this signature in database
GPG Key ID: 5380EAF01F2F8B38
3 changed files with 4 additions and 3 deletions

View File

@ -44,6 +44,8 @@
}
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