{
  "added_at": "2026-11-04",
  "additional_evidence_urls": [
    "https://github.com/emirmrkaljevic/usb-rea/blob/3b77ccbe3b2c87e344a507937ac3c4a1b2a35eb1/docs/VALIDATION.md",
    "https://github.com/emirmrkaljevic/usb-rea/blob/3b77ccbe3b2c87e344a507937ac3c4a1b2a35eb1/docs/case-study-hydro-platinum.md",
    "https://github.com/emirmrkaljevic/usb-rea/blob/3b77ccbe3b2c87e344a507937ac3c4a1b2a35eb1/tests/data/SOURCES.md",
    "https://github.com/emirmrkaljevic/usb-rea/blob/3b77ccbe3b2c87e344a507937ac3c4a1b2a35eb1/.github/workflows/ci.yml",
    "https://github.com/emirmrkaljevic/usb-rea/blob/3b77ccbe3b2c87e344a507937ac3c4a1b2a35eb1/src/usb_rea/capture.py",
    "https://github.com/emirmrkaljevic/usb-rea/blob/3b77ccbe3b2c87e344a507937ac3c4a1b2a35eb1/src/usb_rea/replay.py",
    "https://github.com/emirmrkaljevic/usb-rea/blob/3b77ccbe3b2c87e344a507937ac3c4a1b2a35eb1/pyproject.toml",
    "https://github.com/emirmrkaljevic/usb-rea/blob/3b77ccbe3b2c87e344a507937ac3c4a1b2a35eb1/LICENSE",
    "https://github.com/emirmrkaljevic/usb-rea/releases/tag/v0.7.7",
    "https://pypi.org/project/usb-rea/0.7.7/"
  ],
  "category": "agent-mcp",
  "description_en": "Python CLI and stdio MCP server for inferring the USB protocol of a device whose only control software is a vendor app. While the user clicks through the app, it captures traffic with usbmon or USBPcap, takes a label for each action, diffs the packets per action and infers message layouts: constant bytes, rolling counters, scaled 8- to 32-bit values, lookup tables, packed bit fields and sum, XOR or CRC checksums. It also decodes device replies, handshakes with session tokens and image streams sent to device screens, links each inferred field to Wireshark frame numbers in a report, and generates a pyusb driver and a Wireshark Lua dissector.",
  "description_zh": "Python 命令行工具与 stdio MCP 服务器，用于推断只配有厂商应用的 USB 设备所用的协议。使用者在厂商应用中逐项操作时，它通过 usbmon 或 USBPcap 抓取流量，为每次操作记录标签，按操作比对数据包并推断消息格式：固定字节、滚动计数器、带缩放的 8 至 32 位数值、查找表、打包位字段，以及求和、异或或 CRC 校验。它还能解码设备回复、带会话令牌的握手和发往设备屏幕的图像流，在报告中把每个推断出的字段关联到 Wireshark 帧号，并生成 pyusb 驱动和 Wireshark Lua 解析器。",
  "entry_url": "https://awesomerea.org/resources/usb-rea/",
  "entry_url_zh": "https://awesomerea.org/zh/resources/usb-rea/",
  "evidence_url": "https://github.com/emirmrkaljevic/usb-rea/blob/3b77ccbe3b2c87e344a507937ac3c4a1b2a35eb1/README.md",
  "group": "agents",
  "id": "usb-rea",
  "json_url": "https://awesomerea.org/resources/usb-rea/record.json",
  "kind": "integration",
  "markdown_url": "https://awesomerea.org/resources/usb-rea/index.md",
  "markdown_url_zh": "https://awesomerea.org/zh/resources/usb-rea/index.md",
  "name": "usb-rea",
  "name_zh": "usb-rea：USB 设备协议推断命令行工具与 MCP 服务器",
  "record_type": "resource",
  "relationship": "independent-agent-integration",
  "requirement_facets": [
    "prerequisites",
    "limits",
    "testing",
    "license",
    "attribution"
  ],
  "requirements": [
    "Python 3.10+, with pyusb and the MCP SDK as dependencies; version 0.7.7 (released 2026-11-01) is on PyPI. Live capture needs Linux usbmon with dumpcap or tshark, or USBPcap on Windows; offline analysis reads pcap or pcapng files whose actions are marked with timestamps or listed in order with a pause between clicks. The user supplies the device and its vendor app, and the README says the tool only analyzes traffic of devices the user owns.",
    "The README marks the project alpha and lists limits per feature, among them one-byte modes, unsigned 32-bit readings, handshake tokens that must be copied verbatim and image streams of at least three frames. Sending packets to hardware through the replay command or MCP tool requires explicit confirmation.",
    "CI runs pytest on Python 3.10, 3.12 and 3.13, including tshark checks of the generated dissectors. docs/VALIDATION.md uses synthetic devices, captures synthesized from liquidctl's Kraken X and Hydro H100i Platinum drivers and rivalcfg's Rival 100 driver as ground truth, and two Wireshark sample captures downloaded on demand; one user-shared ASUS TUF Gaming LC III LCD capture is stored trimmed, with its image data zeroed. Emulated-gadget tests and real-hardware case studies remain open roadmap items.",
    "MIT per LICENSE and pyproject.toml.",
    "The README expands the name as “Reverse Engineer any USB gadget”."
  ],
  "requirements_zh": [
    "需要 Python 3.10+，依赖 pyusb 与 MCP SDK；0.7.7 版（2026-11-01 发布）已发布到 PyPI。实时抓包需要 Linux 的 usbmon 加 dumpcap 或 tshark，或 Windows 上的 USBPcap；离线分析读取 pcap 或 pcapng 文件，其中各项操作需带时间戳标记，或按顺序列出且每次点击之间留有停顿。设备及其厂商应用由使用者自备，README 称该工具只分析使用者自有设备的流量。",
    "README 将项目标为 alpha 阶段，并逐项列出功能局限，其中包括模式只能占一个字节、32 位读数不按有符号数处理、握手令牌必须原样复制，以及图像流至少需要三帧。通过 replay 命令或 MCP 工具向硬件发送数据包需要明确确认。",
    "CI 在 Python 3.10、3.12 和 3.13 上运行 pytest，其中包括用 tshark 检查生成的解析器。docs/VALIDATION.md 使用的基准包括合成设备、依据 liquidctl 的 Kraken X 与 Hydro H100i Platinum 驱动及 rivalcfg 的 Rival 100 驱动合成的抓包，以及按需下载的两个 Wireshark 示例抓包；仓库还保存了一份用户分享的 ASUS TUF Gaming LC III LCD 抓包，已裁剪并将图像数据清零。模拟 USB 设备测试和真实硬件案例仍是路线图上的未完成项。",
    "依 LICENSE 与 pyproject.toml 采用 MIT 许可。",
    "README 把名称解释为“Reverse Engineer any USB gadget”（逆向任意 USB 设备）。"
  ],
  "targets": [
    "protocol"
  ],
  "url": "https://github.com/emirmrkaljevic/usb-rea",
  "verification": "source-reviewed",
  "verified_at": "2026-11-02"
}
