From c6f062d49e5652b63f789856a632486c458b93ff Mon Sep 17 00:00:00 2001 From: Jon Cave Date: Fri, 10 Apr 2015 10:58:20 +0100 Subject: [PATCH] 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. --- modules/exploits/multi/http/tomcat_mgr_upload.rb | 3 --- 1 file changed, 3 deletions(-) diff --git a/modules/exploits/multi/http/tomcat_mgr_upload.rb b/modules/exploits/multi/http/tomcat_mgr_upload.rb index 25bae56dff..b8b674d5c3 100644 --- a/modules/exploits/multi/http/tomcat_mgr_upload.rb +++ b/modules/exploits/multi/http/tomcat_mgr_upload.rb @@ -345,10 +345,7 @@ class Metasploit3 < Msf::Exploit::Remote upload_path = normalize_uri(target_uri.path.to_s, "html", "upload") vprint_status("#{peer} - Uploading #{war.length} bytes as #{@app_base}.war ...") res = send_war_payload(upload_path, war) - return parse_upload_response(res) - end - def parse_upload_response(res) unless res vprint_error("#{peer} - Upload failed on #{upload_path} [No Response]") return false