Pre-Summer Special Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: validbest

Exam PT0-002 All Questions
Exam PT0-002 All Questions

View all questions & answers for the PT0-002 exam

CompTIA PenTest+ PT0-002 Question # 42 Topic 5 Discussion

PT0-002 Exam Topic 5 Question 42 Discussion:
Question #: 42
Topic #: 5

bash

Copy code

for ip in $(seq 1 254);

do echo $(echo "192.168.15.$ip ") $(host 192.168.15.$ip dns.company.com | grep "domain name pointer")

done | grep "domain name pointer" | cut -d" " -f1,6

Which of the following best explains the purpose of this script?


A.

To query the DNS for IP addresses and corresponding hostnames in a subnet


B.

To output a list of all IP addresses in a subnet for later scanning


C.

To ping every IP address in a subnet to discover live hosts


D.

To search for DNS servers among the IP addresses in a subnet


Get Premium PT0-002 Questions

Contribute your Thoughts:


Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.