Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
node_modules/
dist/
.DS_Store
.vscode/
*.log
9 changes: 8 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
.git/
.vscode/
node_modules/
.DS_Store
tests/
docs/
*.md
!README.md
eslint.config.mjs
.prettierrc
.prettierignore
tsconfig.json
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules
dist
rules
bun.lock
8 changes: 8 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"semi": true,
"singleQuote": false,
"tabWidth": 2,
"trailingComma": "all",
"printWidth": 100,
"endOfLine": "lf"
}
81 changes: 64 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,82 @@
# WhatsWeb

Identifies websites.
网站指纹识别与安全扫描工具。 / Identifies websites.

## Installation

``` bash
$ npm i -g whatsweb
# Or
$ yarn global add whatsweb
```bash
# 使用 Bun (推荐)
bun install -g whatsweb

# 使用 npm
npm install -g whatsweb
```

## Usage

``` bash
$ whatsweb URLs [options]
```bash
whatsweb [options] URLs
```

### Options

```
-V, --version output the version number
-f <file> Targets file path
-c, --concurrency <num> Start specified NUMBER of concurrency (default: 10)
--network <mask> Scan all Target/MASK hosts
--timeout <ms> Max scan minutes for request (default: 10000)
--user-agent <string> Custom User-Agent (default: Mozilla/5.0 whatsweb/0.1.0)
-o, --output <path> Output file path
--show-error Show error message
-h, --help output usage information
-V, --version 输出版本号
-f <file> 从文件读取目标列表
-c, --concurrency <num> 并发数 (默认: 50)
--network <mask> 扫描 Target/MASK 网段内所有主机
--timeout <ms> 请求超时毫秒数 (默认: 10000)
--user-agent <string> 自定义 User-Agent
-o, --output <path> 输出文件路径 (JSONL 格式)
--show-error 显示错误信息
-h, --help 显示帮助
```

### Example

[![example](https://asciinema.org/a/QlO4vqhnPEF0Hwf5zqCFjKgT2.png)](https://asciinema.org/a/QlO4vqhnPEF0Hwf5zqCFjKgT2)
```bash
# 扫描单个目标
whatsweb http://example.com

# 扫描多个目标
whatsweb http://a.com http://b.com http://c.com

# 从文件读取 + 并发 20 + 输出到文件
whatsweb -f targets.txt -c 20 -o results.jsonl

# 扫描整个 /24 网段
whatsweb http://192.168.1.1 --network 24
```

## Tech Stack

- **Runtime**: Bun
- **Language**: TypeScript
- **HTTP**: Bun native fetch
- **Utilities**: es-toolkit, p-limit, zod
- **Fingerprinting**: wappalyzer@6.10.66
- **GeoIP**: geoip-lite

## Architecture

插件化架构:核心引擎 + 可扩展的插件系统。

内置插件:
- **Base Information** — HTTP 状态、标题、重定向、x-* 头
- **Email** — HTML 中的邮箱地址提取
- **Geolocation** — IP 地理位置
- **Wappalyzer** — 技术栈识别
- **BBScan** — 敏感路径扫描

## Development

```bash
bun install # 安装依赖
bun test # 运行测试
bun run lint # Lint 检查
bun run dev # 开发运行
```

## License

MIT
433 changes: 433 additions & 0 deletions bun.lock

Large diffs are not rendered by default.

Loading