CompTIA PenTest+ Exam PT0-003 Question # 41 Topic 5 Discussion

CompTIA PenTest+ Exam PT0-003 Question # 41 Topic 5 Discussion

PT0-003 Exam Topic 5 Question 41 Discussion:
Question #: 41
Topic #: 5

A penetration tester needs to test a very large number of URLs for public access. Given the following code snippet:

1 import requests

2 import pathlib

3

4 for url in pathlib.Path("urls.txt").read_text().split("\n"):

5 response = requests.get(url)

6 if response.status == 401:

7 print("URL accessible")

Which of the following changes is required?


A.

The condition on line 6


B.

The method on line 5


C.

The import on line 1


D.

The delimiter in line 3


Get Premium PT0-003 Questions

Contribute your Thoughts:


Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.