What Is the best Linux pipe to achieve your milestone?

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?
A . dirb https://site.com | grep "site"
B . curl -s https://sile.com | grep ‘’< a href-’http" | grep "Site-com- | cut -d "V" -f 2
C . wget https://stte.com | grep "< a href=*http" | grep "site.com"
D . wgethttps://site.com | cut-d"http-

Answer: C

Subscribe
Notify of
guest
1 Comment
Inline Feedbacks
View all comments
Hari
Hari
4 months ago

Answer: B

Explanation:
curl -s = quiet/silent, no progress meter/error messages
grep “<a href=\”http” = grep lines with hyperlinks to URLs, quotation mark is escaped by backslash
grep “iana.org” = grep lines with iana.org domain
cut -d “\”” -f 2 = output only 2nd field in each grepped line, fields in grepped lines are delimited by quotation marks, quotation mark is escaped by backslash here too