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?
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.
More questions
Other PT0-003 practice questions
- Question 1[Attacks and Exploits] A penetration tester is trying to get unauthorized access to a web…
- Question 2[Attacks and Exploits] During an internal penetration test, a tester compromises a Window…
- Question 3[Attacks and Exploits] During an assessment, a penetration tester gains a low-privilege s…
- Question 4A penetration tester cannot complete a full vulnerability scan because the client's WAF i…
- Question 5[Tools and Code Analysis] Which of the following techniques is the best way to avoid dete…
- Question 6[Attacks and Exploits] A penetration tester finishes a security scan and uncovers numerou…
