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.
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
...
This section is not available anymore. Please use the main Exam Page.PT0-002 Exam Questions
Log in to ExamTopics
Sign in:
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.
RRabbit_111
Highly Voted 9 months, 2 weeks agolifehacker0777
Most Recent 7 months, 2 weeks ago