QuestionQ59

Operations

Drag the code snippets from below into the missing locations to perform the login operation and security check on the vManage web server at the specified IP address. Some code options are not used.

Drag & Drop
import requests

login_url = 'https://10.20.20.254:8443/j_security_check'

session = requests.session()


if b'<html>' in response.content:
    print('Login Failed')
else:
    print('Login Success')
Explanation

Cisco vManage form authentication posts credentials to the j_security_check endpoint using the j_username and j_password form fields. A requests session preserves the resulting authentication cookies, and the POST response is the value that must be examined for the failure indicator.

Community Discussion

No comments yet. Be the first to start the discussion!