Skip to content

Commit c6f062d

Browse files
committed
Ensure that local variable upload_path is defined
Merge `upload_payload` and `parse_upload_response` so that the `upload_path` variable is defined for use in error messages in the event of failure.
1 parent 3803706 commit c6f062d

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

modules/exploits/multi/http/tomcat_mgr_upload.rb

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -345,10 +345,7 @@ def upload_payload
345345
upload_path = normalize_uri(target_uri.path.to_s, "html", "upload")
346346
vprint_status("#{peer} - Uploading #{war.length} bytes as #{@app_base}.war ...")
347347
res = send_war_payload(upload_path, war)
348-
return parse_upload_response(res)
349-
end
350348

351-
def parse_upload_response(res)
352349
unless res
353350
vprint_error("#{peer} - Upload failed on #{upload_path} [No Response]")
354351
return false

0 commit comments

Comments
 (0)