PT0-003 practice question 19 of 30

[Tools and Code Analysis] A penetration tester needs to test a very large number of URLs for public access. Given the following code snippet: 1…

Choose your answer, then check it against the explanation.

[Tools and Code Analysis] 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?

Answer options
Question 19 of 30

Keep practicing

Take the free PT0-003 practice test

Ten exam-style questions with answers and explanations, plus the exam facts and study guides.

Start the free practice test

More questions

Other PT0-003 practice questions

Scroll to Top