← 返回
未分类

Token Config Checker

批量检测 token / auth JSON 配置文件有效性,并可对 access token 做在线轻量探测,自动输出脱敏报告。适用于排查 Codex/OpenAI/OpenAI 兼容客户端导出的登录配置、会话凭据文件、token 缓存文件。支持把配置分为 valid / no_quota / invalid...
批量检测 token/auth JSON 配置文件有效性,支持对 access token 在线轻量探测并自动生成脱敏报告。适用于排查 Codex/OpenAI/OpenAI 兼容客户端导出的登录配置、会话凭据及 token 缓存文件。可将配置分为 valid、no_quota、invalid 等状态。
joe12801 joe12801 来源
未分类 clawhub v1.1.4 1 版本 100000 Key: 无需
★ 0
Stars
📥 392
下载
💾 0
安装
1
版本
#latest

概述

token-config-checker

简体中文 | English


简体中文

用于检测包含 access_token / refresh_token / id_token 的 JSON 配置文件是否还有效。

提供内容

  • scripts/check_token_configs.py:基础版,支持离线检测和可选在线探测
  • scripts/check_token_configs_plus.py:增强版,支持脱敏输出、失败原因分类、三分类保存、写入报告文件

快速用法

检测单个文件

python3 scripts/check_token_configs.py /path/to/file.json

批量检测目录

python3 scripts/check_token_configs.py /path/to/dir

在线探测 access_token

python3 scripts/check_token_configs.py /path/to/file.json --probe

增强版:按 valid / no_quota / invalid 三分类保存

python3 scripts/check_token_configs_plus.py ./tokens \
  --probe \
  --probe-url https://api.openai.com/v1/models \
  --save-valid-dir ./valid_configs \
  --save-no-quota-dir ./no_quota_configs \
  --save-invalid-dir ./invalid_configs \
  --group-by-type \
  --out report.txt

输出重点

  • valid_offline:离线结构和过期时间是否正常
  • online_valid:在线探测是否通过
  • failure_class:失败分类,例如 token_expired / online_invalid_or_revoked
  • bucket:最终分类(valid / no_quota / invalid

注意事项

  • 这类配置文件非常敏感,不要分享原始文件。
  • 对 Codex 配置,在线结果通常比离线判断更重要。
  • 默认探测地址使用 OpenAI 官方接口;如果你使用私有中转或自定义面板,请手动传入 --probe-url
  • 建议开启 --out 输出报告,便于复查。

English

Use this skill to validate JSON config files containing access_token / refresh_token / id_token.

Included scripts

  • scripts/check_token_configs.py: basic version with offline checks and optional online probing
  • scripts/check_token_configs_plus.py: enhanced version with redacted output, failure classification, three-bucket saving, and report generation

Quick usage

Check one file

python3 scripts/check_token_configs.py /path/to/file.json

Batch scan a directory

python3 scripts/check_token_configs.py /path/to/dir

Online probe access_token

python3 scripts/check_token_configs.py /path/to/file.json --probe

Enhanced: save configs into valid / no_quota / invalid buckets

python3 scripts/check_token_configs_plus.py ./tokens \
  --probe \
  --probe-url https://api.openai.com/v1/models \
  --save-valid-dir ./valid_configs \
  --save-no-quota-dir ./no_quota_configs \
  --save-invalid-dir ./invalid_configs \
  --group-by-type \
  --out report.txt

Key outputs

  • valid_offline: whether the file looks structurally valid offline
  • online_valid: whether online probing succeeded
  • failure_class: failure reason classification
  • bucket: final bucket (valid / no_quota / invalid)

Notes

  • These files are highly sensitive. Do not share raw configs.
  • For Codex-style configs, online probe results are usually more important than offline checks.
  • Default probe target uses the OpenAI official endpoint; if you use a private relay or custom panel, pass your own --probe-url explicitly.
  • Prefer --out to generate a reusable report.

版本历史

共 1 个版本

  • v1.1.4 当前
    2026-05-03 11:22 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-agent

Google Voice Caller

joe12801
使用 AI 生成语音(TTS)或本地音频注入,自动化 Google Voice 通话。
★ 0 📥 589
it-ops-security

OpenClaw Backup

alex3alex
备份与恢复 OpenClaw 数据。适用于创建备份、设置自动备份计划、从备份恢复或管理备份轮转。处理 ~/.openclaw 目录归档并包含适当的排除规则。
★ 90 📥 30,734
it-ops-security

1password

steipete
设置和使用 1Password CLI (op)。适用于:安装 CLI、启用桌面应用集成、登录(单/多账户)、通过 op 读取/注入/运行密钥。
★ 53 📥 31,397