File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
modules/exploits/linux/http Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -115,19 +115,19 @@ def check
115
115
116
116
if res . code == 200 and res . headers . to_json . include? 'X-Rancher-Version'
117
117
# get all rancher environments
118
- projects = JSON . parse ( res . body ) [ 'data' ] . map { |data | data [ 'id' ] }
118
+ projects = JSON . parse ( res . body ) [ 'data' ] . map { |data | data [ 'id' ] }
119
119
# get all hosts from environments
120
120
target_found = false
121
121
projects . each do |project |
122
122
res = send_request_raw (
123
- 'method' => 'GET' ,
124
- 'uri' => normalize_uri ( '/v1/projects' , project , 'hosts' ) ,
125
- 'headers' => { 'Accept' => 'application/json' }
123
+ 'method' => 'GET' ,
124
+ 'uri' => normalize_uri ( '/v1/projects' , project , 'hosts' ) ,
125
+ 'headers' => { 'Accept' => 'application/json' }
126
126
)
127
- hosts = JSON . parse ( res . body ) [ 'data' ] . map { |data | data [ 'id' ] }
127
+ hosts = JSON . parse ( res . body ) [ 'data' ] . map { |data | data [ 'id' ] }
128
128
hosts . each do |host |
129
129
target_found = true
130
- print_good ( "TARGETHOST #{ host } found on TARGETURI /v1/projects/#{ project } " )
130
+ print_good ( "TARGETHOST #{ host } found on TARGETURI /v1/projects/#{ project } " )
131
131
end
132
132
end
133
133
return Exploit ::CheckCode ::Appears if target_found == true
You can’t perform that action at this time.
0 commit comments