Skip to content

Mouseww/anything-analyzer

Repository files navigation

Anything Analyzer

Universal web protocol analyzer — 一款内嵌浏览器的桌面应用,通过 Chrome DevTools Protocol 实时捕获网络请求、JS Hook、存储变化,并借助 AI 进行智能协议分析。

Electron React TypeScript License

Features

  • 内嵌浏览器 — 多标签页浏览器,支持弹窗自动捕获为内部标签(OAuth 流程友好)
  • 全量网络抓包 — 基于 CDP Fetch 拦截,捕获所有 HTTP 请求/响应(含 headers、body)
  • SSE / WebSocket 识别 — 自动检测流式通信和 WebSocket 升级请求并标记
  • JS Hook 注入 — 拦截 fetchXMLHttpRequestcrypto.subtledocument.cookie 调用
  • 存储快照 — 定时采集 Cookie、localStorage、sessionStorage 变化
  • AI 智能分析 — 场景预分类 + 鉴权链提取 + 通用协议分析(支持 OpenAI / Anthropic / 自定义 LLM)
  • 暗色主题 — 基于 Ant Design 的现代暗色界面

Screenshots

image

Tech Stack

Layer Technology
Framework Electron 35 + electron-vite
Frontend React 19 + Ant Design 5 + TypeScript
Database better-sqlite3 (local SQLite)
Protocol Chrome DevTools Protocol (CDP)
AI OpenAI / Anthropic / Custom LLM API

Getting Started

Prerequisites

  • Node.js >= 18
  • pnpm (recommended) or npm
  • Visual Studio Build Tools (Windows, for native module compilation)

Install

git clone https://github.com/MouseWW/anything-analyzer.git
cd anything-analyzer
pnpm install

Development

pnpm dev

Build

# Build distributable
pnpm build

# Package as installer (Windows .exe)
pnpm run build && npx electron-builder --win

Test

pnpm test

Usage

  1. Create Session — 点击左下角 "New Session",输入名称和目标 URL
  2. Browse — 在内嵌浏览器中操作目标网站(支持多标签页)
  3. Capture — 点击 "Start Capture" 开始抓包,所有网络请求实时展示
  4. Analyze — 停止捕获后点击 "Analyze",AI 生成协议分析报告

LLM Configuration

点击左下角 Settings 配置 LLM Provider:

  • OpenAI — 填入 API Key 和 Model(如 gpt-4o
  • Anthropic — 填入 API Key 和 Model(如 claude-sonnet-4-20250514
  • Custom — 任何 OpenAI 兼容的 API(填入 Base URL)

Architecture

src/
├── main/                    # Electron main process
│   ├── ai/                  # AI analysis pipeline
│   │   ├── ai-analyzer.ts   #   orchestrator
│   │   ├── data-assembler.ts #  data preparation
│   │   ├── prompt-builder.ts #  prompt generation
│   │   └── scene-detector.ts #  rule-based scene classification
│   ├── capture/             # Capture engine
│   │   ├── capture-engine.ts #  data sink → SQLite + renderer
│   │   ├── js-injector.ts   #   hook script injection
│   │   └── storage-collector.ts # periodic storage snapshots
│   ├── cdp/
│   │   └── cdp-manager.ts   # Chrome DevTools Protocol manager
│   ├── db/                  # SQLite database layer
│   ├── session/
│   │   └── session-manager.ts # session lifecycle + per-tab capture
│   ├── tab-manager.ts       # Multi-tab WebContentsView management
│   ├── window.ts            # Main window + layout management
│   └── ipc.ts               # IPC handler registration
├── preload/                 # Context bridge + hook script
├── renderer/                # React UI
│   ├── components/          # UI components
│   │   ├── TabBar.tsx       #   browser tab bar
│   │   ├── BrowserPanel.tsx #   address bar + navigation
│   │   ├── ControlBar.tsx   #   capture controls
│   │   ├── RequestLog.tsx   #   request list table
│   │   ├── ReportView.tsx   #   AI analysis report
│   │   └── ...
│   └── hooks/               # React hooks
└── shared/
    └── types.ts             # Shared type definitions

本项目不具备以下能力:

  • 不具备【非法获取计算机数据】的功能
  • 不具备【非法修改计算机数据】的功能
  • 不具备【非法控制计算机系统】的功能
  • 不具备【破坏计算机系统】的功能
  • 不具备【内置AI模型】 (AI模型由用户自己配置,请按照《生成式人工智能服务管理暂行办法》合规使用大模型)

务必不要使用本工具进行任何违反中国法律的行为!!!

务必不要使用本工具进行任何违反中国法律的行为!!!

务必不要使用本工具进行任何违反中国法律的行为!!!


Finally,Thanks to everyone on LinuxDo for their support! Welcome to join https://linux.do/ for all kinds of technical exchanges, cutting-edge AI information, and AI experience sharing, all on Linuxdo!


License

MIT

About

利用 browser + CDP capture + AI analysis 傻瓜式生成 注册机 | 2API | 其他浏览器行为 的协议分析文档

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages