nerdexam
CompTIA

PT0-002 · Question #238

Given the following script: Which of the following BEST characterizes the function performed by lines 5 and 6?

The correct answer is D. Prints each DNS query result already stored in variable b. response in variable b. Lines 5 and 6 are using a for loop to iterate over each answer in variable b and print its summary to the screen. This can help the penetration tester to view the DNS records returned by the query.

Reconnaissance and enumeration

Question

Given the following script:

Which of the following BEST characterizes the function performed by lines 5 and 6?

Exhibit

PT0-002 question #238 exhibit

Options

  • ARetrieves the start-of-authority information for the zone on DNS server 10.10.10.10
  • CLoops through variable b to count the results returned for the DNS query and prints that count to
  • DPrints each DNS query result already stored in variable b

How the community answered

(27 responses)
  • A
    7% (2)
  • C
    4% (1)
  • D
    89% (24)

Explanation

response in variable b. Lines 5 and 6 are using a for loop to iterate over each answer in variable b and print its summary to the screen. This can help the penetration tester to view the DNS records returned by the query.

Topics

#Scripting fundamentals#DNS enumeration#Information output#Reconnaissance techniques

Community Discussion

No community discussion yet for this question.

Full PT0-002 Practice