From 191c871e9b692f58e3abe3e44e63d4fac26cbd2f Mon Sep 17 00:00:00 2001 From: jvazquez-r7 Date: Fri, 20 Jun 2014 14:07:49 -0500 Subject: [PATCH] [SeeRM #8815] Dont try to exploit when generate_payload_exe fails --- modules/exploits/multi/http/struts_code_exec_parameters.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/exploits/multi/http/struts_code_exec_parameters.rb b/modules/exploits/multi/http/struts_code_exec_parameters.rb index 2ebaee2ca1..03add8c9be 100644 --- a/modules/exploits/multi/http/struts_code_exec_parameters.rb +++ b/modules/exploits/multi/http/struts_code_exec_parameters.rb @@ -120,6 +120,9 @@ class Metasploit3 < Msf::Exploit::Remote #Set up generic values. payload_exe = rand_text_alphanumeric(4 + rand(4)) pl_exe = generate_payload_exe + if pl_exe.nil? + fail_with(Failure::BadConfig, "#{peer} - Failed to generate an EXE payload, please select a correct payload") + end append = false #Now arch specific... case target['Platform']