使用 -v 标志以详细模式重新运行扫描
在此步骤中,你将使用详细模式重新运行 Gobuster 扫描。-v 标志提供了关于扫描过程的更详细信息,包括每个发出的请求及其相应的响应状态。此模式对于调试或当你需要了解为何某些路径未被找到或返回意外响应时特别有用。
执行相同的 Gobuster 命令,但这次添加 -v 标志:
gobuster dir -u http://localhost -w /usr/share/wordlists/dirb/common.txt -x php,html,txt -z -v
观察输出。你会发现显示的详细信息量显著增加。对于 wordlist 中的每个单词,Gobuster 都会显示正在测试的 URL 和收到的 HTTP 状态码,即使对于不存在或返回错误状态的路径也是如此。
===============================================================
Gobuster v3.1.0
by OJ <ojob.dev>
===============================================================
[+] Url: http://localhost
[+] Threads: 10
[+] Wordlist: /usr/share/wordlists/dirb/common.txt
[+] Extensions: php, html, txt
[+] Status codes: 200,204,301,302,307,401,403
[+] User Agent: gobuster/3.1.0
[+] Timeout: 10s
===============================================================
2024/07/29 08:00:00 Starting gobuster in directory enumeration mode
Testing url: http://localhost/index.html (Status: 200)
Testing url: http://localhost/server-status (Status: 403)
Testing url: http://localhost/manual (Status: 301)
Testing url: http://localhost/icons (Status: 301)
Testing url: http://localhost/phpmyadmin (Status: 301)
Testing url: http://localhost/test.php (Status: 200)
Testing url: http://localhost/info.php (Status: 200)
Testing url: http://localhost/robots.txt (Status: 200)
Testing url: http://localhost/license.txt (Status: 200)
Testing url: http://localhost/README.txt (Status: 200)
Testing url: http://localhost/admin (Status: 404)
Testing url: http://localhost/login (Status: 404)
... (many more lines for each tested path)
===============================================================
2024/07/29 08:00:00 Finished
===============================================================
这种详细的输出提供了扫描过程的完整跟踪,这对于故障排除或深度分析非常有价值。