試験312-50v13-JPN トピック1 問題121 スレッド

ECCouncil 312-50v13-JPNのリアル試験問題集
問題 #: 121
トピック #: 1
特定の Web サイトに対する侵入テストを開始し、まずメイン ページからすべてのリンクを取得することにしました。
マイルストーンを達成するための最適な Linux パイプは何ですか?

おすすめの解答:B 解答を投票する

This question is about web link enumeration using Linux CLI tools - a common initial step during information gathering in penetration testing, covered in CEH v13 Module 02: Footprinting and Reconnaissance.
Objective:
Extract all hyperlinks (i.e., <a href="http...">) from the homepage of a target site to collect subpages, links, or external URLs.
Let's analyze each component of Option B:
=
=
curl -s https://site.com | grep '<a href='http' | grep "site.com" | cut -d "v" -f 2 curl -s https://site.com: Silently fetches the HTML source of the main page.
grep '<a href='http': Filters lines containing anchor tags with href attributes that begin with http.
grep "site.com": Further filters those that point to site.com.
cut -d "v" -f 2: Cuts the line based on the delimiter v to isolate part of the URL - though not perfect, it attempts to extract the visible link.
While not perfectly formed (due to slightly inconsistent quote usage), Option B demonstrates the correct logic chain for web link enumeration using pipes in Linux: fetching, filtering, and extracting.
Why Other Options Are Incorrect:
A). dirb https://site.com | grep "site"
# dirb is used for brute-forcing directories, not grabbing links from HTML.
C). wget https://site.com | grep "<a href=*http" | grep "site.com"
# Incorrect. wget will download the entire content (including binary files by default), and piping it directly to grep without -O - or -q -O - makes it ineffective.
D). wget https://site.com | cut -d"http"
# Incorrect. Syntax error (cut -d"http" is invalid without correct delimiter formatting), and again wget needs to be directed to stdout using -O -.
Corrected Optimal Syntax for Real-World Use:
bash
CopyEdit
curl -s https://site.com | grep -oP 'href="\Khttp[^"]+' | grep "site.com" This uses -oP with Perl-compatible regex to extract only URLs and is a method recommended in CEH iLabs and demonstrations.
Reference from CEH v13 Study Materials:
Module 02 - Footprinting and Reconnaissance, Section: Website Footprinting and Web Crawling CEH iLabs - Website Information Gathering Lab CEH Engage Range: Passive and Active Footprinting Phase - Linux Scripting Tasks

Tsuchiya 2026-07-22 01:28:17

コメント

正解:
?」こちらは投票コメントになっております。普通のコメントに切り替えます。
ニックネーム: 送信 キャンセル
投票コメントをあげるごとに、選択した解答の投票数を1つ増やすことができます。

他人の解答コメントを賛成するのも、その解答に一票を入れることになります。したがって、すでに同じ意見の投票コメントが存在する場合、新規コメントをする代わりに賛成することもできます。

弊社を連絡する

我々は12時間以内ですべてのお問い合わせを答えます。

オンラインサポート時間:( UTC+9 ) 9:00-24:00
月曜日から土曜日まで

サポート:現在連絡