Skip to content

About

No description, website, or topics provided.

Resources

Stars

29 stars

Watchers

0 watching

Forks

 
 

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

codex_auto_register

基于 GPTMail 的 ChatGPT / Codex 自动注册与 OAuth Token 生成工具集。

致谢

本项目基于原项目 https://github.com/adminlove520/chatgpt_register 改造而来。

当前仓库的主要差异:

  • 将注册邮箱服务从原先方案替换为 GPTMail API (https://mail.chatgpt.org.uk)
  • 保留并扩展 Codex 协议 OAuth 流程
  • 输出 CLIProxyAPI v6 可识别的 Codex auth files

包含内容

  • chatgpt_register.py:根目录下的 GPTMail 注册脚本
  • codex/protocol_keygen.py:纯 HTTP 的 Codex OAuth 注册与 token 生成脚本

环境依赖

根目录脚本:

pip install curl_cffi

Codex 脚本:

pip install requests urllib3

配置方式

仓库只提交示例配置,不提交真实配置。

python chatgpt_register.py

主要配置项:

配置项 说明
total_accounts 注册账号数量
gptmail_api_base GPTMail API 地址
gptmail_api_key GPTMail API Key
proxy HTTP/HTTPS 代理
output_file 注册结果输出文件
enable_oauth 是否执行 OAuth
oauth_required 是否要求 OAuth 成功
upload_api_url 可选,上传到 CPA 的接口
upload_api_token 可选,CPA 管理接口 Token

Codex 协议脚本

运行:

python codex\protocol_keygen.py

对应示例配置见 codex/config.json。

该脚本会:

  • 使用 GPTMail 创建临时邮箱
  • 完成 ChatGPT 注册流程
  • 执行 Codex OAuth 登录并换取 token
  • 生成 CLIProxyAPI v6 兼容文件名的 token JSON

输出说明

运行过程中通常会生成以下本地文件,这些都已加入 .gitignore,不会进入新仓库:

  • config.json
  • codex/config.json
  • registered_accounts.txt
  • codex/accounts.txt
  • codex/ak.txt
  • codex/rk.txt
  • codex/registered_accounts.csv
  • codex/codex_tokens/
  • codex/codex_accounts_tokens/

About

No description, website, or topics provided.

Resources

Stars

29 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages