nerdexam
CompTIA

CS0-003 · Question #13

A security analyst is trying to identify possible network addresses from different source networks belonging to the same company and region. Which of the following shell script functions could help…

The correct answer is C. function y() { dig $(dig -x $1 | grep PTR | tail -n 1 | awk -F ".in-addr" '{print. The shell script function that could help identify possible network addresses from different source networks belonging to the same company and region is: function y() { dig $(dig -x $1 | grep PTR | tail -n 1 | awk -F ".in-addr" '{print $1}').origin.asn.cymru.com TXT +short }…

Submitted by joshua94· Mar 6, 2026Security operations

Question

A security analyst is trying to identify possible network addresses from different source networks belonging to the same company and region. Which of the following shell script functions could help achieve the goal?

Options

  • Afunction w() { a=$(ping -c 1 $1 | awk-F "/" 'END{print $1}') && echo "$1 | $a" }
  • Bfunction x() { b=traceroute -m 40 $1 | awk 'END{print $1}') && echo "$1 | $b" }
  • Cfunction y() { dig $(dig -x $1 | grep PTR | tail -n 1 | awk -F ".in-addr" '{print
  • Dfunction z() { c=$(geoiplookup$1) && echo "$1 | $c" }

How the community answered

(49 responses)
  • A
    10% (5)
  • B
    2% (1)
  • C
    84% (41)
  • D
    4% (2)

Explanation

The shell script function that could help identify possible network addresses from different source networks belonging to the same company and region is: function y() { dig $(dig -x $1 | grep PTR | tail -n 1 | awk -F ".in-addr" '{print $1}').origin.asn.cymru.com TXT +short } This function takes an IP address as an argument and performs two DNS lookups using the dig command. The first lookup uses the -x option to perform a reverse DNS lookup and get the hostname associated with the IP address. The second lookup uses the origin.asn.cymru.com domain to get the autonomous system number (ASN) and other information related to the IP address, such as the country code, registry, or allocation date. The function then prints the IP address and the ASN information, which can help identify any network addresses that belong to the same ASN or region.

Topics

#Network reconnaissance#DNS lookup#Shell scripting#OSINT

Community Discussion

No community discussion yet for this question.

Full CS0-003 Practice