Star 历史趋势
数据来源: GitHub API · 生成自 Stargazers.cn
README.md

Github Token Checker

GitHub Token Validator Logo

Python Click Rich Last Commit

Github-Token-Validator is a fast, concurrent CLI tool (gitcheck.py) to validate GitHub Personal Access Tokens (PATs), audit their scopes, and export results in various formats.


Features

  • Concurrent Validation: Validate hundreds of tokens in parallel with adjustable worker count.
  • Retry & Rate-Limit Handling: Automatic retries for transient errors and waits when GitHub rate limits are encountered.
  • Flexible Output: Rich console table, JSON, or CSV; dump valid tokens to a file.
  • Customizable: Specify API endpoint (for GitHub Enterprise), required scopes, delay between requests, and more.
  • Verbose Logging: Detailed logs to stderr or a file for auditing.

📦 Installation

# Clone the repo
git clone https://github.com/zebbern/Github-Token-Validator.git
cd Github-Token-Validator

# Install dependencies
pip install -r requirements.txt

# (Optional) Install as a package
pip install .

Usage

# Check with all default taking tokens from tokens.txt by default
python gitcheck.py

# Basic check with defaults
python gitcheck.py --tokens-file tokens.txt

# Show full tokens, use 4 workers, require 'repo' scope, and output JSON
python gitcheck.py -w 4   --full-token   --min-scopes repo   --output-format json   --output-file results.json

# Export only valid tokens
python gitcheck.py --tokens-file tokens.txt   --valid-output-file valid_tokens.txt

# Custom GitHub Enterprise URL
python gitcheck.py --api-url https://github.company.com/api/v3/user   --tokens-file tokens.txt

📋 Options

FlagDescription
--tokens-filePath to file with one token per line (required)
-w, --workersNumber of concurrent workers (default: 2)
--delaySeconds delay between requests per worker (default: 1.0)
--retriesNumber of retries for HTTP errors (default: 2)
--min-scopesComma-separated required scopes to validate
--mask / --full-tokenMask tokens output (default: full-token)
--output-formatOutput format: text, json, csv (default: text)
--output-fileFile to write JSON/CSV output
--valid-output-fileFile to write valid tokens (one per line)
--log-filePath to detailed log file
-v, --verboseVerbose logging to stderr
-h, --helpShow help message

关于 About

Check & Audit Your GitHub Token in One Command See Validity, User & Permissions Supports Mass Token Check!
checker-tokengithub-tokengithub-token-managergithub-tokens-generatortokentoken-autheticationtoken-checkertoken-curated-registrytoken-findertoken-grabtoken-loggertoken-scanningtoken-servicetoken-validationtoken-validation-servicetoken-validator

语言 Languages

Python100.0%

提交活跃度 Commit Activity

代码提交热力图
过去 52 周的开发活跃度
0
Total Commits
峰值: 1次/周
Less
More

核心贡献者 Contributors