CompTIA PenTest+ Certification Exam PT0-002 Question # 54 Topic 6 Discussion

CompTIA PenTest+ Certification Exam PT0-002 Question # 54 Topic 6 Discussion

PT0-002 Exam Topic 6 Question 54 Discussion:
Question #: 54
Topic #: 6

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.