QuestionQ78

VerifiedReconnaissance and Enumeration

A penetration tester must test a very large number of URLs for public accessibility. Given the following code snippet:

Question Image

Which of the following changes is necessary?

Explanation

A Requests Response exposes its HTTP result through status_code; it does not provide a status attribute. Also, status code 401 means authentication is required, so it cannot indicate that a URL is publicly accessible. The condition must therefore be corrected to test status_code using the intended public-access criterion.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!