We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 57304a3 commit 977b344Copy full SHA for 977b344
lib/msf/core/exploit/vim_soap.rb
@@ -185,8 +185,8 @@ def vim_get_session
185
'headers' => { 'SOAPAction' => @soap_action}
186
}, 25)
187
return false unless res and res.code == 200
188
- @server_objects = Hash.from_xml(res.body)['Envelope']['Body']['RetrieveServiceContentResponse']['returnval']
189
- @soap_action = "urn:vim25/#{@server_objects['about']['apiVersion']}"
+ @server_objects = (((Hash.from_xml(res.body)['Envelope'] || {})['Body'] || {})['RetrieveServiceContentResponse'] || {})['returnval']
+ @soap_action = "urn:vim25/#{(@server_objects['about'] || {})['apiVersion']}"
190
if res.headers['Set-Cookie']
191
@vim_cookie = res.headers['Set-Cookie']
192
return true
0 commit comments