Certified Ethical Hacker (CEH v11) — Question 202

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?

Answer options

Correct answer: B

Explanation

The correct answer is B because it uses 'curl' to silently fetch the webpage content, then filters for links with 'grep', and extracts the actual URLs using 'cut'. Option A lacks the ability to extract the URLs in a clean manner, and options C and D do not effectively retrieve all the relevant links from the main page.