Skip to content

Commit 6075c79

Browse files
committed
Land rapid7#3467 - failure message for nil payload
2 parents 27ef12b + 191c871 commit 6075c79

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

modules/exploits/multi/http/struts_code_exec_parameters.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,9 @@ def exploit
120120
#Set up generic values.
121121
payload_exe = rand_text_alphanumeric(4 + rand(4))
122122
pl_exe = generate_payload_exe
123+
if pl_exe.nil?
124+
fail_with(Failure::BadConfig, "#{peer} - Failed to generate an EXE payload, please select a correct payload")
125+
end
123126
append = false
124127
#Now arch specific...
125128
case target['Platform']

0 commit comments

Comments
 (0)