Month End Special Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: simple70

Exam PT0-003 All Questions
Exam PT0-003 All Questions

View all questions & answers for the PT0-003 exam

CompTIA PenTest+ PT0-003 Question # 9 Topic 1 Discussion

PT0-003 Exam Topic 1 Question 9 Discussion:
Question #: 9
Topic #: 1

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.