baditaflorin/pcap-lens
GitHub: baditaflorin/pcap-lens
一款纯浏览器端的 PCAP 分析工具,支持协议解码、流图可视化和 Suricata 风格规则匹配,无需安装任何软件即可完成离线流量初步分析。
Stars: 0 | Forks: 0
# pcap-lens



在线应用:
https://baditaflorin.github.io/pcap-lens/
代码仓库:https://github.com/baditaflorin/pcap-lens
基于浏览器的 PCAP 分析器,支持协议解码、流图以及 Suricata 风格的规则匹配。
`pcap-lens` 是一个纯 GitHub Pages 应用,用于本地数据包捕获的初步分析。将 `.pcap` 或 `.pcapng` 文件拖放到浏览器中即可解码常见协议、构建会话,并运行已文档化的 Suricata 兼容 IDS 规则子集,无需安装 Wireshark 或运行 Suricata 容器。捕获的数据保留在浏览器内存中,不会被应用上传。

## 功能特性
- 在浏览器中进行经典 PCAP 和 PCAPNG 解析。
- Ethernet、Linux cooked capture v1、原始 IPv4/IPv6 链路处理。
- IPv4、IPv6、TCP、UDP、ICMP、DNS、HTTP、TLS 元数据以及 ARP 解码。
- 流聚合与端点图渲染。
- Suricata 风格的 v1 规则子集:action、protocol、addresses、ports、direction、`msg`、`sid`、`rev`、`classtype`、`content` 和 `nocase`。
- 构建元数据面板,显示版本以及来自 GitHub 的最新公开 `main` 分支 commit。
- 在线页面中包含指向 https://github.com/baditaflorin/pcap-lens 和 https://www.paypal.com/paypalme/florinbadita 的直接链接。
## 快速入门
```
npm install
make install-hooks
make dev
make test
make build
```
## 本地检查
```
make lint
make test
make smoke
```
`make smoke` 会将应用构建到 `docs/` 目录,使用 GitHub Pages 的基础路径在本地提供服务,并运行 Playwright 示例捕获的冒烟测试。
## 架构
```
flowchart LR
user["Browser user"]
pages["GitHub Pages /docs"]
app["React app"]
worker["Analysis worker"]
parser["PCAP/PCAPNG parser"]
decode["Protocol decoders"]
flows["Flow graph"]
rules["IDS rule matcher"]
github["Public GitHub API"]
user --> pages
pages --> app
app --> worker
worker --> parser
worker --> decode
worker --> flows
worker --> rules
app --> github
```
## 文档
架构:https://github.com/baditaflorin/pcap-lens/blob/main/docs/architecture.md
ADR:https://github.com/baditaflorin/pcap-lens/tree/main/docs/adr
部署指南:https://github.com/baditaflorin/pcap-lens/blob/main/docs/deploy.md
隐私政策:https://github.com/baditaflorin/pcap-lens/blob/main/docs/privacy.md
标签:ARP, CMS安全, DNS, GitHub Pages, ICMP, IP 地址批量处理, JavaScript, PCAPNG, PCAP分析, React, SOC Prime, Suricata, Syscalls, TCP, TLS, TypeScript, UDP, 内核驱动, 协议解码, 安全插件, 开发工具, 数据可视化, 暗色界面, 流图, 测试工具, 浏览器端, 特征检测, 现代安全运营, 离线分析, 端点分析, 网络协议, 网络安全, 网络排错, 网络流量可视化, 自动化攻击, 规则匹配, 防御工具, 防御绕过, 隐私保护, 静态网站