app
Adom USB - Mass-storage / SCSI sniffer
Public Unreviewedby John Lauer
Capture + decode USB Mass-Storage (BOT/UAS) SCSI commands — READ/WRITE/INQUIRY — to pcap.
← Commit history
plugin source v0.1.0
8 files changed
+135−22
README.md+8−2@@ -1,3 +1,9 @@-# Mass-storage / SCSI sniffer+# adom-usb-sniffer-msc -Capture + decode USB Mass-Storage (BOT/UAS) SCSI commands — READ/WRITE/INQUIRY — to pcap.+**adom-usb sniffer plugin.** Capture + decode USB Mass-Storage (BOT/UAS) SCSI commands — READ/WRITE/INQUIRY — to pcap.++```bash+adompkg install adom-usb-sniffer-msc+```++Once installed, `adom-usb` discovers it (scans `~/.adom/usb-plugins/`) and routes the **Sniff** action for matching devices (Mass storage, Mass storage (UF2)) to it. See the adom-usb wiki page → *Writing a packet-sniffer plugin*.
adom-usb-sniffer-mscadded+18@@ -0,0 +1,18 @@+#!/usr/bin/env bash+# Mass-storage / SCSI sniffer — adom-usb sniffer plugin (API v1). Implements: manifest, sniff.+set -euo pipefail; HERE="$(cd "$(dirname "$0")" && pwd)"+cmd="${1:-}"; shift || true+case "$cmd" in+ manifest) cat "$HERE/plugin.json";;+ sniff)+ VID="" PID="" BUSID="" TARGET="" SECONDS_N=10 OUT=""+ while [ $# -gt 0 ]; do case "$1" in --vid)VID="$2";shift 2;; --pid)PID="$2";shift 2;; --busid)BUSID="$2";shift 2;; --target)TARGET="$2";shift 2;; --seconds)SECONDS_N="$2";shift 2;; --out)OUT="$2";shift 2;; *)shift;; esac; done+ OUT="${OUT:-/tmp/adom-usb-sniffer-msc-${VID}-${PID}.pcap}"; BUS_NUM="${BUSID%%-*}"+ sudo modprobe usbmon 2>/dev/null || true+ if command -v tshark >/dev/null; then+ timeout "$SECONDS_N" tshark -i "usbmon${BUS_NUM}" -w "$OUT" -f "usb.idVendor==0x${VID} && usb.idProduct==0x${PID}" 2>/dev/null || true+ PKTS=$(tshark -r "$OUT" 2>/dev/null | wc -l | tr -d ' ')+ else PKTS=0; fi+ printf '{"ok":true,"pcap":"%s","packets":%s,"decoders":["scsi-bot", "uas"],"summary":"captured %s packets for %s:%s on %s"}\n' "$OUT" "${PKTS:-0}" "${PKTS:-0}" "$VID" "$PID" "$TARGET";;+ *) echo "usage: adom-usb-sniffer-msc manifest | sniff --vid <hex> --pid <hex> --busid <b> --target <host> [--seconds N] [--out FILE]" >&2; exit 2;;+esac
install.shadded+9@@ -0,0 +1,9 @@+#!/bin/bash+set -euo pipefail+DIR="$(cd "$(dirname "$0")" && pwd)"; SLUG="adom-usb-sniffer-msc"+PDIR="${HOME}/.adom/usb-plugins/${SLUG}"; mkdir -p "$PDIR" "${HOME}/.local/bin"+install -m 0644 "$DIR/plugin.json" "$PDIR/plugin.json"+install -m 0755 "$DIR/$SLUG" "$PDIR/$SLUG"+[ -d "$DIR/firmware" ] && cp -r "$DIR/firmware" "$PDIR/" || true+ln -sf "$PDIR/$SLUG" "${HOME}/.local/bin/$SLUG"+echo "Installed plugin $SLUG -> $PDIR (adom-usb discovers it on next refresh)"
package.jsonadded+55@@ -0,0 +1,55 @@+{+ "slug": "adom-usb-sniffer-msc",+ "version": "0.1.0",+ "type": "app",+ "description": "Capture + decode USB Mass-Storage (BOT/UAS) SCSI commands \u2014 READ/WRITE/INQUIRY \u2014 to pcap.",+ "dependencies": {},+ "keywords": [+ "adom-usb-plugin",+ "sniffer",+ "usb"+ ],+ "license": "MIT",+ "scripts": {+ "install": "./install.sh",+ "uninstall": "./uninstall.sh"+ },+ "files": [+ "adom-usb-sniffer-msc",+ "plugin.json",+ "install.sh",+ "uninstall.sh",+ "package.json",+ "README.md",+ "page.json",+ "screenshots/**",+ "skills/**"+ ],+ "adom_usb_plugin": {+ "kind": "sniffer",+ "entrypoint": "adom-usb-sniffer-msc",+ "matches": {+ "class": [+ "Mass storage",+ "Mass storage (UF2)"+ ],+ "vid": [+ "*"+ ],+ "pid": [+ "*"+ ]+ },+ "capture": "usbmon",+ "decoders": [+ "scsi-bot",+ "uas"+ ],+ "api_version": "1"+ },+ "tags": [+ "adom-usb-plugin",+ "sniffer",+ "usb"+ ]+}
page.json+3−20@@ -1,9 +1,8 @@ {- "schema_version": 1, "type": "app", "slug": "adom-usb-sniffer-msc", "title": "Mass-storage / SCSI sniffer",- "brief": "Capture + decode USB Mass-Storage (BOT/UAS) SCSI commands — READ/WRITE/INQUIRY — to pcap.",+ "brief": "Capture + decode USB Mass-Storage (BOT/UAS) SCSI commands \u2014 READ/WRITE/INQUIRY \u2014 to pcap.", "version": "0.1.0", "visibility": "public", "hero": {@@ -11,10 +10,7 @@ "path": "screenshots/hero.png" }, "install": {- "binary_name": "adom-usb-sniffer-msc",- "install_dir": "",- "install_hint": "",- "version_cmd": ""+ "binary_name": "adom-usb-sniffer-msc" }, "metadata": { "version": "0.1.0",@@ -29,18 +25,5 @@ "flash usb persona", "test usb device" ]- },- "author": {- "id": "6738b00a4dc87b8adbb0a5a3",- "name": "John Lauer",- "email": "[email protected]"- },- "tags": [],- "license": "proprietary",- "sample_prompts": [],- "discovery_triggers": [],- "discovery_pitch": null,- "created_at": "2026-06-20T02:58:06.373Z",- "updated_at": "2026-06-20T02:58:06.373Z",- "skills": []+ } }
plugin.jsonadded+27@@ -0,0 +1,27 @@+{+ "slug": "adom-usb-sniffer-msc",+ "name": "Mass-storage / SCSI sniffer",+ "version": "0.1.0",+ "api_version": "1",+ "kind": "sniffer",+ "entrypoint": "adom-usb-sniffer-msc",+ "matches": {+ "class": [+ "Mass storage",+ "Mass storage (UF2)"+ ],+ "vid": [+ "*"+ ],+ "pid": [+ "*"+ ]+ },+ "capture": "usbmon",+ "decoders": [+ "scsi-bot",+ "uas"+ ],+ "description": "Capture + decode USB Mass-Storage (BOT/UAS) SCSI commands \u2014 READ/WRITE/INQUIRY \u2014 to pcap.",+ "homepage": "https://wiki.adom.inc/john/adom-usb-sniffer-msc"+}
skills/adom-usb-sniffer-msc/SKILL.mdadded+11@@ -0,0 +1,11 @@+---+name: adom-usb-sniffer-msc+description: >+ adom-usb sniffer plugin. Capture + decode USB Mass-Storage (BOT/UAS) SCSI commands — READ/WRITE/INQUIRY — to pcap. Trigger words: adom-usb-sniffer-msc, adom-usb plugin, usb sniffer, sniff usb, capture usb packets, decode usb.+---++# adom-usb-sniffer-msc++Capture + decode USB Mass-Storage (BOT/UAS) SCSI commands — READ/WRITE/INQUIRY — to pcap.++Install: `adompkg install adom-usb-sniffer-msc`. adom-usb discovers it automatically (scans `~/.adom/usb-plugins/`) and routes the Sniff action for matching devices to it. See the adom-usb wiki page for the plugin API.
uninstall.shadded+4@@ -0,0 +1,4 @@+#!/bin/bash+set -euo pipefail+rm -rf "${HOME}/.adom/usb-plugins/adom-usb-sniffer-msc" "${HOME}/.local/bin/adom-usb-sniffer-msc"+echo "Removed adom-usb-sniffer-msc"