diff --git a/msfpayload b/msfpayload index 79857b0554..2240b83199 100755 --- a/msfpayload +++ b/msfpayload @@ -161,7 +161,11 @@ if (cmd =~ /^(p|y|r|d|c|j|x|b|v|w)/) plat = payload.platform.platforms exe = Msf::Util::EXE.to_executable($framework, arch, plat, buf) - exe = Msf::Util::EXE.to_jsp_war(exe) + if(!exe and plat.index(Msf::Module::Platform::Java)) + exe = payload.generate_war.pack + else + exe = Msf::Util::EXE.to_jsp_war(exe) + end if(exe)