Question 34 of 76 from exam 350-201-CBRCOR: Performing CyberOps Using Cisco Security Technologies

Question 34 of 76 from exam 350-201-CBRCOR: Performing CyberOps Using Cisco Security Technologies

Question

def get_umbrella_dispos (domains) :
# put in right format to pass as argument in POST request
values = str (json. dumps (domains) )
req = requests.post (investigate_url, data=values, header:
# time for timestamp of verdict domain
time = datetime.now() .isoformat ()
# error handling if true then the request was HTTP 200, so successful
if(req.status_code == 200):
print ("SUCCESS: request has the following cod
output = req.json()

headers)

200\n")

if(domain_status == -1):
print ("The domain %(domain)s is found MALICIOUS at %(time)s\n" % {‘domain': domain, ‘time': time})
elif (domain_status == 1):
print ("The domain %(domain)s is found CLEAN at %(time)s\:
{'domain': domain, ‘time': time})
else:
print ("The domain %(domain)s is found UNDEFINED / RISKY at %(time)s\n" %
{'domain': domain, 'time': time})

else:
print ("an error has occurred with the following code $(error)s, please consult the following link:
https: //docs.umbrella.com/investigate-api/"$
{‘error': req.status_code})

Refer to the exhibit.

Which code snippet will parse the response to identify the status of the domain as malicious, clean or undefined? A.

for domain in domains[]:
domain_status = domain_output[“status”]

B.

while domain in domains:
domain_status = domain_output [“status”]

C.

for domain in domains:
domain_output = output [domain]
domain_status = domain_output[“status”]

D.

while domains in domains:
domain_output = output [domain]
domain_status = domain_output (“status”)

Explanations

C.