Stegstr
Stegstr hides Nostr messages and arbitrary payloads inside PNG images using steganography. Users embed their feed (posts, DMs, JSON) into images and share them; recipients use Detect to load the hidden content. No registration, works offline.
When to use this skill
- - User wants to decode (extract) hidden data from a PNG that contains Stegstr data.
- User wants to embed a payload into a cover PNG (e.g. Nostr bundle, JSON, text).
- User mentions steganography, Nostr-in-images, Stegstr, hiding data in images, or secret messages in photos.
- User needs programmatic access for automation, scripts, or AI agents.
CLI (headless)
Build the CLI from the Stegstr repo:
CODEBLOCK0
Binary: target/release/stegstr-cli (or stegstr-cli.exe on Windows).
Decode (extract payload)
CODEBLOCK1
Writes raw payload to stdout. Valid UTF-8 JSON is printed as text; otherwise base64:<data>. Exit 0 on success.
Detect (decode + decrypt app bundle)
CODEBLOCK2
Decodes and decrypts; prints Nostr bundle JSON { "version": 1, "events": [...] }.
Embed (hide payload in image)
CODEBLOCK3
Use --payload @file to load from file. Use --encrypt so any Stegstr user can detect. Use --payload-base64 <base64> for binary payloads.
Post (create kind 1 note bundle)
CODEBLOCK4
Creates a Nostr bundle; use stegstr-cli embed to hide it in an image.
Example workflow
CODEBLOCK5
Image format
PNG only (lossless). JPEG or other lossy formats will corrupt the hidden data.
Payload format
- - Magic:
STEGSTR (7 bytes ASCII) - Length: 4 bytes, big-endian
- Payload: UTF-8 JSON or raw bytes (desktop app encrypts; CLI can embed raw or
--encrypt)
Decrypted bundle: { "version": 1, "events": [ ... Nostr events ... ] }. Schema: bundle.schema.json.
Links
- - agents.txt: https://www.stegstr.com/agents.txt
- For agents: https://www.stegstr.com/wiki/for-agents.html
- CLI docs: https://www.stegstr.com/wiki/cli.html
- Downloads: https://github.com/brunkstr/Stegstr/releases/latest
Stegstr
Stegstr 使用隐写术将 Nostr 消息和任意有效载荷隐藏在 PNG 图像中。用户将他们的信息流(帖子、私信、JSON)嵌入到图像中并分享;接收者使用 Detect 功能加载隐藏内容。无需注册,可离线使用。
何时使用此技能
- - 用户想要解码(提取)包含 Stegstr 数据的 PNG 中的隐藏数据。
- 用户想要将有效载荷嵌入到封面 PNG 中(例如 Nostr 包、JSON、文本)。
- 用户提及隐写术、图像中的 Nostr、Stegstr、在图像中隐藏数据或照片中的秘密消息。
- 用户需要用于自动化、脚本或 AI 代理的程序化访问。
CLI(无头模式)
从 Stegstr 仓库构建 CLI:
bash
git clone https://github.com/brunkstr/Stegstr.git
cd Stegstr/src-tauri
cargo build --release --bin stegstr-cli
二进制文件:target/release/stegstr-cli(Windows 上为 stegstr-cli.exe)。
解码(提取有效载荷)
bash
stegstr-cli decode image.png
将原始有效载荷写入标准输出。有效的 UTF-8 JSON 以文本形式打印;否则以 base64: 形式打印。成功时退出码为 0。
检测(解码并解密应用包)
bash
stegstr-cli detect image.png
解码并解密;打印 Nostr 包 JSON { version: 1, events: [...] }。
嵌入(将有效载荷隐藏在图像中)
bash
stegstr-cli embed cover.png -o out.png --payload text or JSON
stegstr-cli embed cover.png -o out.png --payload @bundle.json
stegstr-cli embed cover.png -o out.png --payload @bundle.json --encrypt
使用 --payload @file 从文件加载。使用 --encrypt 以便任何 Stegstr 用户都能检测。对二进制有效载荷使用 --payload-base64 。
发布(创建 kind 1 笔记包)
bash
stegstr-cli post Your message here --output bundle.json
stegstr-cli post Message --privkey-hex <64-char-hex> --output bundle.json
创建一个 Nostr 包;使用 stegstr-cli embed 将其隐藏在图像中。
示例工作流程
bash
创建帖子包
stegstr-cli post Hello from OpenClaw --output bundle.json
嵌入到封面图像中(为任何 Stegstr 用户加密)
stegstr-cli embed cover.png -o stego.png --payload @bundle.json --encrypt
接收者检测并提取
stegstr-cli detect stego.png
图像格式
仅限 PNG(无损)。JPEG 或其他有损格式会损坏隐藏数据。
有效载荷格式
- - 魔数: STEGSTR(7 字节 ASCII)
- 长度: 4 字节,大端序
- 有效载荷: UTF-8 JSON 或原始字节(桌面应用加密;CLI 可嵌入原始数据或使用 --encrypt)
解密后的包:{ version: 1, events: [ ... Nostr events ... ] }。模式:bundle.schema.json。
链接
- - agents.txt: https://www.stegstr.com/agents.txt
- 面向代理: https://www.stegstr.com/wiki/for-agents.html
- CLI 文档: https://www.stegstr.com/wiki/cli.html
- 下载: https://github.com/brunkstr/Stegstr/releases/latest