由 Andrew Horton urbanadventurer 与 Brendan Coles bcoles 开发
最新发布:v0.6.4. 2026年4月3日
许可证:GPLv2
本产品受许可协议中详述的条款约束。有关 WhatWeb 的更多信息,请访问 https://github.com/urbanadventurer/
Wiki:https://github.com/urbanadventurer/WhatWeb/wiki/
如果您对 WhatWeb 有任何问题、评论或疑虑,请在联系开发者之前查阅文档。我们始终欢迎您的反馈。
WhatWeb 识别网站。它的目标是回答“那是什么网站?”这个问题。WhatWeb 能够识别网页技术,包括内容管理系统(CMS)、博客平台、统计/分析包、JavaScript 库、Web 服务器和嵌入式设备。WhatWeb 拥有超过 1800 个插件,每个插件用于识别不同的内容。WhatWeb 还能识别版本号、电子邮件地址、账户 ID、Web 框架模块、SQL 错误等等。
WhatWeb 可以隐蔽而快速,也可以彻底但缓慢。WhatWeb 支持攻击级别来控制速度与可靠性之间的权衡。当您在浏览器中访问网站时,该事务包含了许多关于该网站由哪些 Web 技术驱动的线索。有时,仅访问一个网页就足以识别网站,但当信息不足时,WhatWeb 可以进一步询问网站。默认的攻击级别称为 'stealthy',是最快的,只需对网站发出一次 HTTP 请求。这适合扫描公共网站。更高级的攻击模式是为渗透测试而开发的。
大多数 WhatWeb 插件都很彻底,能够识别从细微到明显的一系列线索。例如,大多数 WordPress 网站可以通过 meta HTML 标签来识别,例如 '',但少数 WordPress 网站会移除这个识别标签,不过这并不能难倒 WhatWeb。WordPress 的 WhatWeb 插件有超过 15 项测试,包括检查 favicon、默认安装文件、登录页面,以及检查相对链接中的 "/wp-content/"。
使用 WhatWeb 扫描 reddit.com。``` $ ./whatweb reddit.com http://reddit.com [301 Moved Permanently] Country[UNITED STATES][US], HTTPServer[snooserv], IP[151.101.65.140], RedirectLocation[https://www.reddit.com/], UncommonHeaders[retry-after,x-served-by,x-cache-hits,x-timer], Via-Proxy[1.1 varnish] https://www.reddit.com/ [200 OK] Cookies[edgebucket,eu_cookie_v2,loid,rabt,rseor3,session_tracker,token], Country[UNITED STATES][US], Email[[email protected],[email protected]], Frame, HTML5, HTTPServer[snooserv], HttpOnly[token], IP[151.101.37.140], Open-Graph-Protocol[website], Script[text/javascript], Strict-Transport-Security[max-age=15552000; includeSubDomains; preload], Title[reddit: the front page of the internet], UncommonHeaders[fastly-restarts,x-served-by,x-cache-hits,x-timer], Via-Proxy[1.1 varnish], X-Frame-Options[SAMEORIGIN]
## 用法```
.$$$ $. .$$$ $.
$$$$ $$. .$$$ $$$ .$$$$$$. .$$$$$$$$$$. $$$$ $$. .$$$$$$$. .$$$$$$.
$ $$ $$$ $ $$ $$$ $ $$$$$$. $$$$$ $$$$$$ $ $$ $$$ $ $$ $$ $ $$$$$$.
$ `$ $$$ $ `$ $$$ $ `$ $$$ $$' $ `$ `$$ $ `$ $$$ $ `$ $ `$ $$$'
$. $ $$$ $. $$$$$$ $. $$$$$$ `$ $. $ :' $. $ $$$ $. $$$$ $. $$$$$.
$::$ . $$$ $::$ $$$ $::$ $$$ $::$ $::$ . $$$ $::$ $::$ $$$$
$;;$ $$$ $$$ $;;$ $$$ $;;$ $$$ $;;$ $;;$ $$$ $$$ $;;$ $;;$ $$$$
$$$$$$ $$$$$ $$$$ $$$ $$$$ $$$ $$$$ $$$$$$ $$$$$ $$$$$$$$$ $$$$$$$$$'
WhatWeb - Next generation web scanner version 0.6.4.
Developed by Andrew Horton (urbanadventurer) and Brendan Coles (bcoles)
Homepage: https://morningstarsecurity.com/research/whatweb
Usage: whatweb [options] <URLs>
TARGET SELECTION:
<TARGETs> Enter URLs, hostnames, IP addresses, filenames or
IP ranges in CIDR, x.x.x-x, or x.x.x.x-x.x.x.x
format.
--input-file=FILE, -i Read targets from a file. You can pipe
hostnames or URLs directly with -i /dev/stdin.
TARGET MODIFICATION:
--url-prefix Add a prefix to target URLs.
--url-suffix Add a suffix to target URLs.
--url-pattern Insert the targets into a URL. Requires --input-file,
eg. www.example.com/%insert%/robots.txt
AGGRESSION:
The aggression level controls the trade-off between speed/stealth and
reliability.
--aggression, -a=LEVEL Set the aggression level. Default: 1.
Aggression levels are:
1. Stealthy Makes one HTTP request per target. Also follows redirects.
3. Aggressive If a level 1 plugin is matched, additional requests will be
made.
4. Heavy Makes a lot of HTTP requests per target. Aggressive tests from
all plugins are used for all URLs.
HTTP OPTIONS:
--user-agent, -U=AGENT Identify as AGENT instead of WhatWeb/0.6.3.
--header, -H Add an HTTP header. eg "Foo:Bar". Specifying a default
header will replace it. Specifying an empty value, eg.
"User-Agent:" will remove the header.
--follow-redirect=WHEN Control when to follow redirects. WHEN may be `never',
`http-only', `meta-only', `same-site', or `always'.
Default: always.
--max-redirects=NUM Maximum number of contiguous redirects. Default: 10.
AUTHENTICATION:
--user, -u=<user:password> HTTP basic authentication.
--cookie, -c=COOKIES Provide cookies, e.g. 'name=value; name2=value2'.
--cookiejar=FILE Read cookies from a file.
--no-cookies Disable automatic cookie handling (improves performance
with high thread counts).
### Cookie Handling
WhatWeb automatically handles cookies across redirects by default. This improves fingerprinting accuracy on sites requiring session management.
- `--cookie, -c=COOKIES` - Set initial cookies manually
- `--cookie-jar=FILE` - Load cookies from file
- `--no-cookies` - Disable automatic cookie handling
**Performance Note:** With high thread counts (>100), cookie handling may impact performance. Use `--no-cookies` for maximum speed on large scans.
PROXY:
--proxy <hostname[:port]> Set proxy hostname and port.
Default: 8080.
--proxy-user <username:password> Set proxy user and password.
PLUGINS:
--list-plugins, -l List all plugins.
--info-plugins, -I=[SEARCH] List all plugins with detailed information.
Optionally search with keywords in a comma
delimited list.
--search-plugins=STRING Search plugins for a keyword.
--plugins, -p=LIST Select plugins. LIST is a comma delimited set of
selected plugins. Default is all.
Each element can be a directory, file or plugin name and
can optionally have a modifier, eg. + or -
Examples: +/tmp/moo.rb,+/tmp/foo.rb
title,md5,+./plugins-disabled/
./plugins-disabled,-md5
-p + is a shortcut for -p +plugins-disabled.
--grep, -g=STRING|REGEXP Search for STRING or a Regular Expression. Shows
only the results that match.
Examples: --grep "hello"
--grep "/he[l]*o/"
--custom-plugin=DEFINITION Define a custom plugin named Custom-Plugin,
Examples: ":text=>'powered by abc'"
":version=>/powered[ ]?by ab[0-9]/"
":ghdb=>'intitle:abc \"powered by abc\"'"
":md5=>'8666257030b94d3bdb46e05945f60b42'"
--dorks=PLUGIN List Google dorks for the selected plugin.
OUTPUT:
--verbose, -v Verbose output includes plugin descriptions. Use twice
for debugging.
--colour,--color=WHEN control whether colour is used. WHEN may be `never',
`always', or `auto'.
--quiet, -q Do not display brief logging to STDOUT.
--no-errors Suppress error messages.
LOGGING:
--log-brief=FILE Log brief, one-line output.
--log-verbose=FILE Log verbose output.
--log-errors=FILE Log errors.
--log-xml=FILE Log XML format.
--log-json=FILE Log JSON format.
--log-sql=FILE Log SQL INSERT statements.
--log-sql-create=FILE Create SQL database tables.
--log-json-verbose=FILE Log JSON Verbose format.
--log-magictree=FILE Log MagicTree XML format.
--log-object=FILE Log Ruby object inspection format.
--log-mongo-database Name of the MongoDB database.
--log-mongo-collection Name of the MongoDB collection. Default: whatweb.
--log-mongo-host MongoDB hostname or IP address. Default: 0.0.0.0.
--log-mongo-username MongoDB username. Default: nil.
--log-mongo-password MongoDB password. Default: nil.
--log-elastic-index Name of the index to store results. Default: whatweb
--log-elastic-host Host:port of the elastic http interface. Default: 127.0.0.1:9200
PERFORMANCE & STABILITY:
--max-threads, -t Number of simultaneous threads. Default: 25.
--open-timeout Time in seconds. Default: 15.
--read-timeout Time in seconds. Default: 30.
--wait=SECONDS Wait SECONDS between connections.
This is useful when using a single thread.
HELP & MISCELLANEOUS:
--short-help Short usage help.
--help, -h Complete usage help.
--debug Raise errors in plugins.
--version Display version information. (WhatWeb 0.6.4).
EXAMPLE USAGE:
* Scan example.com.
./whatweb example.com
* Scan reddit.com slashdot.org with verbose plugin descriptions.
./whatweb -v reddit.com slashdot.org
* An aggressive scan of wired.com detects the exact version of WordPress.
./whatweb -a 3 www.wired.com
* Scan the local network quickly and suppress errors.
whatweb --no-errors 192.168.0.0/24
* Scan the local network for https websites.
whatweb --no-errors --url-prefix https:// 192.168.0.0/24
* Scan for crossdomain policies in the Alexa Top 1000.
./whatweb -i plugin-development/alexa-top-100.txt \
--url-suffix /crossdomain.xml -p crossdomain_xml
支持以下日志类型:
可以通过指定多个命令行日志选项同时输出到多个日志。需要 SQL 输出的高级用户应阅读源代码以了解不支持的特性。
匹配通过以下方式进行:
列出支持的插件:
$ ./whatweb -l
Plugin Name - Description
--------------------------------------------------------------------------------
1024-CMS - 1024 is one of a few CMS's leading the way with the implementation...
360-Web-Manager - 360-Web-Manager
3COM-NBX - 3COM NBX phone system. The NBX NetSet utility is a web interface i...
3dcart - 3dcart - The 3dcart Shopping Cart Software is a complete ecommerce s...
4D - 4D web application deployment server
4images - 4images is a powerful web-based image gallery management system. Fe...
... (truncated)
要查看有关插件的更多详细信息或按关键字搜索插件:
$ ./whatweb -I phpBB
WhatWeb Detailed Plugin List
Searching for phpBB
================================================================================
Plugin: phpBB
--------------------------------------------------------------------------------
Description: phpBB is a free forum
Website: http://phpbb.org/
Author: Andrew Horton
Version: 0.3
Features: [Yes] Pattern Matching (7)
[Yes] Version detection from pattern matching
[Yes] Function for passive matches
[Yes] Function for aggressive matches
[Yes] Google Dorks (1)
Google Dorks:
[1] "Powered by phpBB"
================================================================================
默认情况下会加载所有插件。
可以通过 -p 或 --plugin 命令行选项,以逗号分隔的列表形式,按目录、文件或插件名称选择插件。
每个列表项可以有一个修饰符:+ 添加到完整集合,- 从完整集合中移除,无修饰符则覆盖默认值。
命令行选项 --dorks 返回所选插件的 Google dorks。例如,--dorks wordpress 返回 "is proudly powered by WordPress"
命令行选项 --grep、-g 会在目标页面中搜索所选字符串,如果找到,则在一个名为 Grep 的插件中返回匹配项。
WhatWeb 提供多个攻击性级别。默认情况下,攻击性级别设置为 1(隐蔽),它会发送单个 HTTP GET 请求,并跟随重定向。
--aggression, -a
1. Stealthy Makes one HTTP request per target. Also follows redirects.
2. Unused
3. Aggressive Can make a handful of HTTP requests per target. This triggers
aggressive plugins for targets only when those plugins are
identified with a level 1 request first.
4. Heavy Makes a lot of HTTP requests per target. Aggressive tests from
all plugins are used for all URLs.
第 3 级攻击性插件会猜测更多 URL,并执行可能不适合未经授权进行的操作。WhatWeb 目前在插件中不支持任何入侵/利用级别的测试。
级别 1 的隐蔽扫描识别出 smartor.is-root.com/forum/ 使用 phpBB 版本 2:
$ ./whatweb smartor.is-root.com/forum/
http://smartor.is-root.com/forum/ [200] PasswordField[password], HTTPServer[Apache/2.2.15], PoweredBy[phpBB], Apache[2.2.15], IP[88.198.177.36], phpBB[2], PHP[5.2.13], X-Powered-By[PHP/5.2.13], Cookies[phpbb2mysql_data,phpbb2mysql_sid], Title[Smartors Mods Forums - Reloaded], Country[GERMANY][DE]
级别 3 的攻击性扫描会触发 phpBB 插件中的额外测试,从而识别出该网站使用 phpBB 2.0.20 或更高版本:
$ ./whatweb -p plugins/phpbb.rb -a 3 smartor.is-root.com/forum/
http://smartor.is-root.com/forum/ [200] phpBB[2,>2.0.20]
请注意使用 -p 参数仅选择 phpBB 插件。在攻击性模式下尝试识别软件版本时,建议(但不是必须)选择特定插件。这种方法会更加隐蔽,因为它会限制请求数量。
WhatWeb 没有缓存,因此如果你对重定向的 URL 使用攻击性插件,可能会多次获取相同的文件。
WhatWeb 提供多个选项来提高性能和稳定性。
可以使用 --wait 和 --max-threads 命令来辅助规避 IDS。
WhatWeb 会根据线程数自动优化屏幕输出和日志文件的输出性能:
低线程数(1-5):
中线程数(6-50):
高线程数(51+):
你可以覆盖屏幕输出和日志文件的这些默认值:```bash
./whatweb --output-sync -t 100 --log-brief=results.txt targets.txt
./whatweb --output-buffer-size=50 -t 100 --log-verbose=detailed.log targets.txt
./whatweb --output-buffer-size=0 -t 10 --log-json=results.json targets.txt
这些优化适用于所有输出格式,包括 brief、verbose、XML、JSON 及其他日志格式。
#### 技术细节
**输出同步行为:**
- **启用**:每一行输出立即刷新到磁盘/屏幕(较慢但实时)
- **禁用**:输出在写入前先缓冲在内存中(较快但有延迟)
**缓冲区大小影响:**
- **大小 1**:缓冲极少,输出几乎即时
- **大小 10**:小缓冲区在写入前可容纳约 10 条结果
- **大小 25+**:更大的缓冲区减少 I/O 系统调用,以提升性能
- **大小 0**:完全无缓冲(等同于启用同步)
### 性能分析支持
启用性能分析以识别瓶颈:```bash
# Basic profiling to stderr
WHATWEB_PROFILE=1 ./whatweb -t 25 targets.txt
# Save profile to file
WHATWEB_PROFILE=1 WHATWEB_PROFILE_FILE=profile.txt ./whatweb -t 25 targets.txt
注意:性能分析需要 ruby-prof gem:gem install ruby-prof
使用 -U 或 --user-agent 命令行选项更改 user-agent 可以避免 WhatWeb 的 Snort IDS 规则。
如果你正在扫描 IP 地址范围,使用像 massscan 这样的端口扫描器来发现哪些主机开放了 80 端口,然后再用 WhatWeb 扫描,这样效率更高。
使用 Charset 插件进行字符集检测会大幅降低性能,因为它需要更多 CPU。JSON 和 MongoDB 日志记录需要此功能。
WhatWeb 支持用于 MongoDB 日志记录和字符集检测的可选依赖。
可选依赖是 Gemfile 被分成多个组以及 WhatWeb 不附带 Gemfile.lock 的原因。如果你想要 Gemfile.lock,运行 bundle install 时就会生成。
你可以使用 Bundler 组来安装它们:
要启用 MongoDB 日志记录:```bash
bundle install --with mongo
GEMFILE_GROUPS="default mongo" bundle install
### 字符集检测
要启用字符集检测(JSON 和 MongoDB 日志记录需要):```bash
# Install dependencies
bundle install --with rchardet
# If you're using an older version of Bundler
GEMFILE_GROUPS="default rchardet" bundle install
# Copy the charset plugin
cp plugins-disabled/charset.rb my-plugins/
要一次性安装所有可选依赖:```bash
bundle install --with mongo rchardet
GEMFILE_GROUPS="default mongo rchardet" bundle install
注意:字符集检测会大幅降低性能,因为它需要更多 CPU。仅在需要时启用。
## 编写插件
插件编写很简单。首先从 *my-plugins/* 文件夹中的插件教程开始。
* [插件教程](https://github.com/urbanadventurer/WhatWeb/tree/master/my-plugins)。
插件教程的概览在这里。[plugin-tutorials.txt](https://github.com/urbanadventurer/WhatWeb/tree/master/plugin-development/plugin-tutorials.txt)
完成教程之后,请阅读 [wiki](https://github.com/urbanadventurer/WhatWeb/wiki/) 中的 Development(开发)部分。
* [插件编写来源](https://github.com/urbanadventurer/WhatWeb/wiki/Sources-for-Plugin-Writing)
* [如何开发 WhatWeb 插件(未更新)](https://github.com/urbanadventurer/WhatWeb/wiki/How-to-develop-WhatWeb-plugins)
## 更新与更多信息
WhatWeb 开发版会定期更新。
* 查看开发分支以获取未发布更新。
浏览 wiki 获取更多文档和高级用法技巧。
* Wiki: https://github.com/urbanadventurer/WhatWeb/wiki/
## 发布历史
- 版本 0.6.4 发布于 2026 年 4 月 3 日
- 版本 0.6.3 发布于 2025 年 10 月 18 日
- 版本 0.6.2 发布于 2025 年 8 月 25 日
- 版本 0.6.1 发布于 2025 年 7 月 30 日
- 版本 0.5.4 发布于 2020 年 12 月 14 日
- 版本 0.5.3 发布于 2020 年 10 月 1 日
- 版本 0.5.2 发布于 2020 年 6 月 9 日
- 版本 0.5.1 发布于 2020 年 2 月 25 日
- 版本 0.5.0 发布于 2019 年 6 月 9 日
- 版本 0.4.9 发布于 2017 年 11 月 23 日
- 版本 0.4.8-dev(2012 年至 2017 年持续发布)
- 版本 0.4.7 发布于 2011 年 4 月 5 日
- 版本 0.4.6 发布于 2011 年 3 月 25 日
- 版本 0.4.5 发布于 2010 年 8 月 17 日
- 版本 0.4.4 发布于 2010 年 6 月 29 日
- 版本 0.4.3 发布于 2010 年 5 月 24 日
- 版本 0.4.2 发布于 2010 年 4 月 30 日
- 版本 0.4.1 发布于 2010 年 4 月 28 日
- 版本 0.4 发布于 2010 年 3 月 14 日
- 版本 0.3 于 2009 年 11 月 2 日在 Kiwicon III(kiwicon.org)发布
## 致谢
### 开发者
+ Andrew Horton (@urbanadventurer)
+ Brendan Coles (@bcoles)
### 贡献者
感谢以下为 WhatWeb 做出贡献的人士。
+ Emilio Casbas
+ Louis Nyffenegger
+ Patrik Wallström (@pawal)
+ Caleb Anderson (@dirtyfilthy)
+ Tonmoy Saikia
+ Aung Khant (@yehgdotnet)
+ Erik Inge Bolsø
+ [email protected]
+ Steve Milner (@ashcrow)
+ Michal Ambroz
+ Gremwell
+ Sagar Prakash Junnarkar (@sagarjunnarkar)
+ GertBerger
+ Quintin Poirier
+ Eric Sesterhenn
+ dengjw (@jawa)
+ Pedro Worcel (@droop)
+ Matthieu Keller (@maggick)
+ Peter (2pvdl)
+ Napz (@RootCon)
+ @nilx042
+ Fabian Affolter (@fabaff)
+ Andrew Silvernail (@buff3r)
+ Andre Ricardo (@andrericardo)
+ nikosk
+ Patrick Thomas (@coffeetocode)
+ Guillaume Delcaour (@guikcd)
+ Sean (@wiifm69)
+ Matthieu Keller (@maggick)
+ Raul (@raurodse)
+ Andrew Petro (@apetro)
+ Artem Taranyuk (@610)
+ Matti Paksula (@matti)
+ Tim Smith (@tas50)
+ Sarthak Munshi (@saru95)
+ @rdubourguais
+ @SlivTaMere
+ @Code0x58
+ @iGeek098
+ @andreas-becker
+ @csalazar
+ Igor Rzegocki (@ajgon)
+ @juananpe
+ @lins05
+ @anozoozian
+ Bhavin Senjaliya (@bhavin1223)
+ Chad Brigance (@ChadBrigance)
+ Daniel Maldonado
+ Elias Dorneles (@eliasdorneles)
+ Eugene Amirov
+ Gregory Boddin (@gboddin)
+ Guillaume Delacour
+ Janosch Maier (@phylu)
+ Max Davitt (@themaxdavitt)
+ Naglis Jonaitis (@naglis)
+ Shuai Lin
+ Sigit Dewanto (@sigit)
+ @wh1tenoise
+ @golewski
+ @Allactaga
+ @elcodigok
+ @SlivTaMere
+ @rmaksimov
+ Melvil Guillaume (@mguillau42)
+ @LrsK
+ @abenson
+ @blshkv
+ Weidsom Nascimento (@weidsom)
+ Marcelo Gimenes (@cgimenes)
+ @xambroz
+ Baptiste Fontaine (@bfontaine)
+ @definity
+ @huntertl
+ Michael Ippolito (@spookycave)
+ @mkauschi
+ @frapava98
+ John de Kroon (@johndekroon)
+ @mtisec
+ Claude from Anthropic
很难记住所有为 WhatWeb 做出贡献的人。如果你的名字被遗漏了,请告诉我。