Skip to content

scan 命令族

📸 snir scan — 扫描并截图网站。

scan 是 snir 最核心的命令,负责扫描指定的 URL、文件或网段,并对网站截图与信息收集。

三种输入入口共享同一套扫描流水线:

单个目标在扫描流水线内的执行时序:

子命令

子命令用法说明
single [url]snir scan single https://example.com扫描单个 URL
filesnir scan file -f urls.txt从文件批量扫描
cidr [cidr]snir scan cidr 192.168.1.0/24扫描网段
(直接 URL)snir scan example.com等价于 single

直接传 URL

scan 后直接给一个 URL 参数,视为单 URL 扫描:

bash
snir scan example.com
snir scan https://example.com/path

设备预设

--device <name> 应用设备预设(视口/UA/像素比/触摸):

bash
snir scan example.com --device iphone-15

--list-devices 列出全部预设:

bash
snir scan --list-devices

设备模拟

公共标志

scan 的持久化标志对所有子命令生效,涵盖:截图、证据、Chrome、代理、Cookie、设备、JS、输出、数据库、黑名单、端口。完整表见 CLI 标志全表

持久化标志 = 在 scan 或子命令上都可挂

--save-html 这类标志既可写 snir scan --save-html file -f urls.txt,也可写 snir scan file --save-html -f urls.txt——cobra 的持久化标志贯穿整棵子命令树。

示例

常用配方速查

配方命令
单页快照snir scan example.com
批量归档snir scan file -f urls.txt --threads 10 --write-jsonl --db
全量证据snir scan example.com --full-page --save-html --save-headers --save-cookies --save-console --save-network
移动端视角snir scan example.com --device iphone-15
网段普查snir scan cidr 192.168.1.0/24
走代理snir scan example.com --proxy http://127.0.0.1:8080
高清桌面snir scan example.com --resolution-x 1920 --resolution-y 1080

下一步

基于 MIT 许可发布