nerdexam
EC-Council

312-50V13 · Question #308

You start performing a penetration test against a specific website and have decided to start from grabbing all the links from the main page. What Is the best Linux pipe to achieve your milestone?

The correct answer is C. wget https://site.com | grep "< a href=\*http" | grep "site.com". To identify lines containing links from a webpage during a penetration test, a Linux pipe can retrieve the content and use grep commands to filter for anchor tags and specific domain patterns.

Submitted by yuki_2020· Mar 6, 2026Hacking Web Servers

Question

You start performing a penetration test against a specific website and have decided to start from grabbing all the links from the main page. What Is the best Linux pipe to achieve your milestone?

Options

How the community answered

(49 responses)
  • A
    6% (3)
  • B
    12% (6)
  • C
    80% (39)
  • D
    2% (1)

Why each option

To identify lines containing links from a webpage during a penetration test, a Linux pipe can retrieve the content and use `grep` commands to filter for anchor tags and specific domain patterns.

Adirb https://site.com | grep "site"

`dirb` is a web content scanner used for directory brute-forcing, not for extracting links from a main page's content.

Bcurl -s https://site.com | grep `'< a href-\'http" | grep "site-com- | cut -d "V" -f 2

The `cut` command in this option is improperly formatted (`-d "V" -f 2`) and would not correctly extract URLs, nor is the `grep "site-com-"` regex standard for this purpose.

Cwget https://site.com | grep "< a href=\*http" | grep "site.com"Correct

`wget https://site.com` retrieves the webpage content. The subsequent `grep "< a href=\*http"` filters for lines containing anchor tags that link to HTTP resources, and `grep "site.com"` further refines the output to include only links relevant to the target domain, effectively identifying lines with links.

Dwget https://site.com | cut-d"http-

This command is syntactically incomplete and would not function as intended to extract links from a webpage.

Concept tested: Linux command-line tools for web reconnaissance and text processing

Topics

#web scraping#command line tools#reconnaissance#link extraction

Community Discussion

No community discussion yet for this question.

Full 312-50V13 Practice