惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
人人都是产品经理
人人都是产品经理
Cisco Talos Blog
Cisco Talos Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
V
V2EX
博客园 - 三生石上(FineUI控件)
Martin Fowler
Martin Fowler
WordPress大学
WordPress大学
D
Docker
S
SegmentFault 最新的问题
博客园 - 聂微东
美团技术团队
Apple Machine Learning Research
Apple Machine Learning Research
月光博客
月光博客
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Last Week in AI
Last Week in AI
M
MIT News - Artificial intelligence
F
Fortinet All Blogs
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
The GitHub Blog
The GitHub Blog
GbyAI
GbyAI
L
LangChain Blog
Vercel News
Vercel News
博客园 - 叶小钗
MongoDB | Blog
MongoDB | Blog
Stack Overflow Blog
Stack Overflow Blog
H
Help Net Security
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
The Cloudflare Blog
Engineering at Meta
Engineering at Meta
T
Threat Research - Cisco Blogs
T
Threatpost
Scott Helme
Scott Helme
T
Tailwind CSS Blog
Latest news
Latest news
Stack Overflow Blog
Stack Overflow Blog
Blog — PlanetScale
Blog — PlanetScale
The Register - Security
The Register - Security
罗磊的独立博客
P
Proofpoint News Feed
腾讯CDC
S
Schneier on Security
雷峰网
雷峰网
A
About on SuperTechFans
T
Tenable Blog
F
Full Disclosure
Cyberwarzone
Cyberwarzone
博客园_首页
有赞技术团队
有赞技术团队
K
Kaspersky official blog

Hacker News: Show HN

AI-powered screenshot naming for macOS GitHub - LiteLLM-Labs/lite-harness: Unified Server for running OpenCode, Claude Code, Codex HermesBench Show HN: Kanji Pairs Explorer Show HN: Thaw – Git branch for a running LLM (fork agents, skip prefill) Show HN: Babo – A scripting natural language that works as intended Show HN: HN Station – A local-first HN desktop client with split-pane reading Donald Trump Stock Trade Tracker | Quiver Quantitative ProReview - Catch AI Before It Wrecks Production Phive internet all time Show HN: Helm plugin for working with OCI-based Helm charts GitHub - dima-quant/nimic: Nimic is a pure Python module that facilitates writing AOT compilable code with a subset of Python (DSL). Based on ctypes built-in module, it includes emulation of native types, pointers and operations on them, implementing dispatch, operator overloading, and templates. Nimic closely follows Nim programming language, to which nimic code transpiles. AIC AI Lab Show HN: React-Rewrite – A visual editor for React that writes code, no LLM GitHub - raine/claude-code-proxy: Use Claude Code with your ChatGPT or Kimi subscription via a local Anthropic-compatible proxy omen.ops — Joseon court observability leaf : Terminal Markdown previewer — GUI-like experience. Show HN: I think I by accident created something beautiful about LLM [video] Show HN: UN Condemnation Statistics Show HN: Community Ninja – Find customers searching for your product iPhone 版“Today” - App Store Release v1.3.0 — AI-Powered Migration Explanation & Migrations Folder Support · migradiff/migra Show HN: HumanForScale – See how big things are DropLock Show HN: Ego lite – why our browser agent writes JavaScript not CLI commands Extend AI · sound like you, everywhere SnapState — Your workspace, perfected. Helios. Is plug-in solar worth it? GitHub - riddleling/docOCR: macOS CLI and HTTP OCR tool for converting document images to Markdown. Geostakes — Stake. Guess. Win. Show HN: AI-org – org-mode powered by AI GitHub - PepperDev/totpgate: Lightweight SPA TOTP port knocking daemon GitHub - ppnpm/clinlang: Shorthand writing for doctors. Write shortly and later convert into structured case documentations. cartographer-skill/skills/cartographer/SKILL.md at main · spinchange/cartographer-skill GitHub - schildep/verified-polygon-intersection: Formally verified polygon intersection FreeCal — calendars for your organisation Show HN: Self Publish Studio Owl VIP Email Alerts | Gmail Notifications for Specific Senders Show HN: I rebuilt the $1M dollar homepage Show HN: [Geo-Cast] hear what other people are saying ClawChat GitHub - migradiff/migra: The actively maintained fork of migra — PostgreSQL schema diff and migration script generator. vibebnb · bring back Airbnb's vibe filters GitHub - jmaczan/tiny-vllm: Build your own high performance LLM inference engine in C++ and CUDA - a smaller version of vLLM Reposeek - Find the repo to build on GitHub - hunvreus/heypi: Chat agents for your team, with approvals and sandboxed tools. Slack, Discord, Telegram, webhooks. Show HN: Heirlooms – pass your legacy to family after stop breathing Headlines Show HN: I launched a micro-gig marketplace and used it to buy my own GTM plan Show HN: AionOS – self-healing microkernel in Zig (boots on real hardware) GitHub - njbrake/dotpi: My ds4 + pi configuration for success Sverklo - Repo Memory for Coding Agents Show HN: Gaia Atlas – Local Stellar Map GitHub - joshduffy/claude-handoff-guard: Hook-enforced ownership for AI coding session handoffs Show HN: Prezlo – We built an API that tells AI agent whether to trust an expert GitHub - kenm47/nvEnvy: Fast, keyboard-driven note-taking app for macOS — a modern rebuild of nvALT in Swift/SwiftUI. vibewarz — bot-vs-bot arena Inkfeed TV Explorer — 10,000 Free TV Channels Show HN: Oort – A prompt library where every listing has a shipped project GitHub - Bella3202019/promptloop: Claude Code for prompt eval Stefan Le Noach Show HN: A smarter CSS selector generator Phoenix Code - Free Open Source Code Editor | Successor to Brackets Korean OEM/ODM Manufacturer Sourcing Platform | OEMKorea GitHub - OWASP/www-project-agent-memory-guard: OWASP Foundation web repository GitHub - fynyky/elemental: Simple reactive front-end library Show HN: Community Reviews for Electronic Components GitHub - vaddisrinivas/tab-council: Chrome MV3 extension that turns AI tabs into a structured model council Show HN: Stillis – An open-ended anonymous polling platform for anything YAVCHN Show HN: OpenHive – AI agents share solutions so other agents dont re-solve them Repolog — SEO, Performance, Security & AI Readiness audits Show HN: TypistStories, new Gothic novel released Integuru - Generate fast, reliable APIs for any platform JobTrue — Your home base for the job search. LocalizeASO - ASO Localization for App Store Screenshots and Metadata RFC Reader — search & read IETF RFCs Kotlin API Search MobileGym: A Verifiable and Highly Parallel Simulation Platform for Mobile GUI Agent Research KeptWell — Your family's medical binder, replaced. Cliparr | Instant media clipper for Plex, Jellyfin, and local video files. GitHub - glebmish/claude-code-replay: Replay Claude Code session logs to reconstruct lost project files, commit by commit. One Tile GitHub - aavilagallego/TheFoundry: The Foundry is a User Friendly - Enterprise Ready Multi-Agent System (MAS) bootstrapping framework. Monitoring | Firecrawl Show HN: A free, open-source replacement for Evernote (and paid note takers) Show HN: Orbital Package System (Ops) Free Furigana Converter: Kanji to Hiragana | EZFurigana How I built Ensemble · Brutal Cut Claude Code Costs ~50% Without Quality Loss | Headroom GitHub - stateflow-dev/adaptive-runtime: Adaptive Runtime Layer for Stateful AI Systems Show HN: Artwork in the style of Mark Rothko GitHub - fayazara/Screendrop: A native macOS menu bar app for taking screenshots, recording the screen, annotating captures, and sharing them when needed. It is built for a fast local workflow: capture something, preview it immediately, mark it up, save it, copy it, or upload it from the same floating preview. deepface.dev GitHub - gitricko/hermes-webtop: An agent that grows with you Sensonym - Forget Flashcards, Learn Languages by Doing Steam 上的 Code: Terraform Tap — The browser with no tabs.
GitHub - yeet-src/usbsnoop: Live, system-wide USB transfer sniffer in eBPF — decodes USB traffic inline (control SETUP, SCSI, HID) from two universal URB hooks. No usbmon, no hardware sniffer. CO-RE portable.
r3tr0 · 2026-05-31 · via Hacker News: Show HN

usbsnoop demo

A real-time, colorized feed of USB traffic system-wide — built on the two universal URB chokepoints every host-controller driver funnels through, so it works on xHCI/EHCI/OHCI/dwc alike with no per-controller tracepoints and no usbmon. Fully CO-RE portable.

fentry hook what it tells us
usb_submit_urb a transfer was queued (device, endpoint, type, payload)
usb_hcd_giveback_urb it completed (status, bytes moved, latency, payload)

An lru_hash keyed by the URB pointer stitches the two together: submit stamps a start time, completion reads it back for the submit→complete latency, then deletes it. This mirrors httpbody's request/response pairing — SUBMIT is the "request" (what the host sends), COMPLETE the "response" (what the device returns).

Control transfers get their 8-byte SETUP packet decoded into the standard request name (GET_DESCRIPTOR, SET_CONFIGURATION, …); data stages render as text when they look textual and as a hexdump otherwise.

Output is one line per event (compact). The first time a device appears it gets a legend line (bus-dev, vid:pid, product, link speed); after that each row carries only the short DEV tag, so the left-hand columns stay aligned and scannable under heavy traffic. Each row shows time, kind (SUBMIT/CMPLT), transfer type, epNdir, the direction arrow ( device→host IN, host→device OUT), byte counts, status, latency, and the owning kernel driver, then a · and the most useful detail (decoded SETUP, SCSI command, or a short payload preview). Pass --hex for the full multi-line hexdump instead. Hex bytes are colored by value class (null blue, printable ASCII cyan, whitespace green, other control magenta, high/non-ASCII yellow) on a TTY; piped output is plain.

Use cases

  • Reverse-engineering peripherals — watch a device enumerate and exchange vendor control requests and HID reports live, no hardware sniffer or usbmon setup. SETUP packets and payloads are decoded as you poke at the device.
  • Driver / firmware debugging — see exactly which commands your driver or app sends a device and what comes back, with submit→complete latency on every transfer.
  • Mass-storage / SCSI inspection — Bulk-Only Transport wrappers decode to the SCSI command (READ(10) lba=… blocks=…, WRITE(10), CSW PASS/FAIL).
  • Catching errors--errors-only surfaces stalls (EPIPE), timeouts, babble, and CRC errors across every device at once.
  • Spotting rogue devices — a freshly plugged device shows what it does the instant it attaches; BadUSB-style HID injection surfaces as INT reports or SET_REPORT control writes you didn't trigger.
  • Capture for offline analysis--json emits NDJSON; pipe to jq or a file to diff payloads across runs.
  • Performance triage — on a timed exit you get a per-device rollup and a log2 latency histogram to find the slow or chatty devices.

Install

curl -fsSL https://yeet.cx | sh

Then run it straight from GitHub — yeet fetches the example and builds it for you, no clone needed:

yeet run github:yeet-src/usbsnoop

Build

To build from a local checkout instead:

make

Dumps the kernel's BTF to vmlinux.h (for struct urb, usb_device, and the device descriptor), then compiles. Requires clang, bpftool, and a kernel with BTF.

Run

yeet run .                              # all devices, runs until Ctrl-C
yeet run . -- --secs 30                 # stop after 30s (prints a summary)
yeet run . -- --vid 0x320f              # one vendor
yeet run . -- --vendor-id 0x046d --product-id 0xc52b # one device by id
yeet run . -- --bus 3 --dev 4           # one device by bus address
yeet run . -- --type control,int        # only these transfer types
yeet run . -- --no-data                 # metadata only, skip payload capture
yeet run . -- --max-data 64             # cap rendered payload at 64 bytes
yeet run . -- --errors-only             # only failed completions (stalls, timeouts)
yeet run . -- --hex                      # full multi-line hexdump per transfer
yeet run . -- --json | jq .             # NDJSON, one object per event

Flags

flag default meaning
--secs forever how long to run; omit to run until Ctrl-C (a number stops + prints a summary)
--vid, --vendor-id any filter by vendor id (hex 0x1d6b or decimal)
--pid, --product-id any filter by product id
--bus any filter by bus number
--dev any filter by device address
--type all csv of iso, int, control, bulk
--no-data off don't read transfer buffers (metadata only)
--max-data 4096 max bytes of payload rendered per event
--errors-only off show only non-OK completions (skips SUBMIT and OK)
--hex off full multi-line hexdump per transfer (compact inline preview otherwise)
--json off emit NDJSON (one object per event) instead of the TTY view
--page-offset-base off kernel page_offset_base address (hex) — enables SG payload capture (x86-64)
--vmemmap-base off kernel vmemmap_base address (hex) — paired with --page-offset-base

All filtering happens kernel-side, so filtered-out traffic never reaches userspace.

Each event line ends with the owning kernel driver in brackets ([hid_irq_in], [usb_api_blocking_completion]) — urb->complete symbolized in-kernel via bpf_snprintf("%ps"), so no /proc/kallsyms lookup is needed. Mass-storage bulk transfers decode their Bulk-Only Transport wrapper into the SCSI command (CBW READ(10) lba=… blocks=… / CSW PASS). On a timed exit (reaching --secs) a per-device summary and a log2 latency histogram print; a Ctrl-C exit skips it (there is no JS-visible signal hook).

Scatter-gather payloads

Bulk traffic (mass storage and friends) often hands the stack a struct scatterlist array (urb->sg) instead of a single linear transfer_buffer, so the payload lives scattered across pages. usbsnoop walks that array and copies each segment's bytes, but reaching them means translating a page to its kernel virtual address — the inverse of x86-64's page_to_virt, which needs the running kernel's page_offset_base and vmemmap_base (both KASLR-randomized).

The JS isolate can't read /proc/kallsyms and the loader has no ksym support, so you pass the two symbol addresses in and the BPF side dereferences them:

yeet run . -- \
  --page-offset-base 0x$(sudo awk '$3=="page_offset_base"{print $1}' /proc/kallsyms) \
  --vmemmap-base     0x$(sudo awk '$3=="vmemmap_base"{print $1}'     /proc/kallsyms)

Without those flags, SG transfers still show full metadata, just no payload bytes — the prior behavior. This path is x86-64 only: on other arches leave the flags off.

Limits

  • Only the first 16384 bytes of each transfer are captured (a power of two — the verifier read-clamp depends on it). Larger buffers are truncated; the header still reports the true actual/requested length. Each ring record carries a full data[16384], so the 8 MiB ring holds ~512 events.
  • Scatter-gather payloads need the --page-offset-base / --vmemmap-base flags above and an x86-64 host; each segment is captured up to a page, and only the first 64 segments of a transfer are walked.
  • A transfer submitted before usbsnoop attached has no start stamp, so its completion shows no latency.
  • USB descriptors are little-endian and read directly — correct on the little-endian hosts BPF runs on.