exam questions

Exam PT0-002 All Questions

View all questions & answers for the PT0-002 exam

Exam PT0-002 topic 1 question 180 discussion

Actual exam question from CompTIA's PT0-002
Question #: 180
Topic #: 1
[All PT0-002 Questions]

A penetration tester is testing a new API for the company's existing services and is preparing the following script:



Which of the following would the test discover?

  • A. Default web configurations
  • B. Open web ports on a host
  • C. Supported HTTP methods
  • D. Listening web servers in a domain
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
RRabbit_111
Highly Voted 9 months, 2 weeks ago
Selected Answer: C
The correct answer is C. Supported HTTP methods. The script is making a request for each of the specified HTTP methods (GET, POST, PUT, TRACE, CONNECT, OPTIONS). The script is testing to see which of these methods are supported by the API. This would allow the penetration tester to determine which methods are available for use when interacting with the API.
upvoted 10 times
...
lifehacker0777
Most Recent 7 months, 2 weeks ago
Selected Answer: C
Corrected script, #!/bin/bash for each in GET POST OUT TRACE CONNECT OPTIONS; do printf "$each" printf "$each / HTTP/1.1\nHost/1.1\nHost:www.comptia.org\r\n\r\n" | nc www.comptia.org 80 done https://stackoverflow.com/questions/32341518/how-to-make-an-http-get-request-manually-with-netcat
upvoted 4 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago