ssqyy / ChatGPT-Register

ChatGPT-Register 是一个自动化工具,用于无人工干预地注册 ChatGPT 账号。

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ChatGPT-Register

ChatGPT-Register Logo 🫷🥹🫸 image

ChatGPT-Register 是一个自动化工具,免代理不封号无限量无人工干预地注册 ChatGPT 账号。

结合PandoraNext项目和Capsolver,它实现了一个高效的注册流程。

完全模拟整个注册流程,在安全无风险的基础上,单个实例注册用时仅需 2min!且多开情况下,每个实例互不影响。

特点

  • 🚀 自动化注册:自动完成整个ChatGPT账号注册流程,使用Capsolver来绕过注册中的验证码。
  • 🌐 免代理:不用代理池、注册再多也不被ban本机IP。(感谢PandoraNext项目的贡献)
  • 📧 邮箱监控:自动监控和处理OpenAI的Verification认证邮件。
  • 🐍 Python脚本:使用Pythonselenium自动操作,并使用undetected_chromedriver防止检测。
  • 🐳 Docker支持:通过Docker Compose轻松部署。
  • 📦 灵活数据存储:结果保存在SQLite数据库,支持自定义存储。

安装指南

公共步骤:

  1. 克隆仓库:
    git clone https://github.com/QvQQ/ChatGPT-Register
    cd ChatGPT-Register
  2. 复制并编辑配置文件:
    cp config_template.yaml config.yaml
    # 编辑 config.yaml 文件
  3. 根据你的平台类型安装Chrome(注意,不是Chromium)

方法一:通过本机直接运行(推荐)

  1. 安装依赖:
    pip install -r requirements.txt
  2. 运行脚本:
    python main.py

方法二:使用Docker Compose

  1. 在项目根目录下运行:

    docker compose up

    PS. 由于使用了 Selenium 来模拟请求,对主机配置有较高要求。如果报错,可以尝试延长程序中寻找元素的等待时间。

  2. (可选)要查看容器内部的情况,请访问容器内置的 noVNC 服务 http://localhost:7900/?autoconnect=1&resize=scale&password=secret

结果存储

注册的结果将被保存在SQLite数据库 account.db 中。您可以使用Navicat等软件查看数据库,或修改存储函数将结果存储至txt文件中。欢迎提出Pull Request共同改进项目。

  • Update 2024.1.5 现在可以连接远程服务器的数据库了!

配置文件说明

config_template.yaml 文件中包含以下配置项:

# 是否使用 headless 模式(Docker 中应该开启,本地可以关闭测试)
headless_browser: false

# 注册账号的邮箱后缀,包含`@`
account_postfix: ""

# Capsolver 的 client_key
client_key: ""

# PandoraNext 的镜像站网址
# 若没有可以使用 https://chat.oaifree.com
pandora_next_website: "https://chat.oaifree.com"

# PandoraNext 镜像站的 site_password,如果没有可留空
site_password: ""

# 接收 OpenAI 认证邮件的邮箱 IMAP 服务器设置(须支持SSL)
IMAP_server: "outlook.office365.com"
IMAP_port: 993

# 接收 OpenAI 认证邮件的邮箱的账号与密码
email_username: ""
email_password: ""

# 接收 OpenAI 认证邮件的邮箱的收件箱名称,一般是 Inbox (对于 Outlook 而言)
email_folder: "Inbox"

# ChatGPT 使用的 FunCaptcha 的类型
# 不定期会改变,可以到 Capsovler 网站查看对应类型
puzzle_type: "train_coordinates"


# For refresher_tokens_cli.py

# PandoraNext 镜像站的 baseURL
# 包括proxy_api_prefix,e.g. https://foo.bar/this_is_proxy_api_prefix/
pandora_next_base_url: ""

# 要更新的 pool_token,留空则为新生成一个 pool_token
pandora_next_pool_token: ""
  • client_key: 需要使用Capsolver的服务来解决验证码。新注册用户可以获得1刀额度[点击注册](平均每个账号花费1分多RMB)
  • puzzle_type: 如果在尝试解决验证码时出错,可以用./solved中的验证码图片与Capsolver Documentation中提供的验证码类型进行对比,并填写相应的Questions字段即可。

请根据您的需要编辑这些配置项。

refresh_tokens_cli 使用说明

点击这里展开详细信息

Usage:

$ refresh_tokens_cli [OPTIONS] COMMAND [ARGS]...

Options:

  • --install-completion: Install completion for the current shell.
  • --show-completion: Show completion for the current shell, to copy it or customize the installation.
  • --help: Show this message and exit.

Commands:

  • assemble: Assemble pool token
  • obtain: Obtain new session tokens if not exists.
  • refresh: Refresh tokens.

refresh_tokens_cli assemble

Assemble pool token

Usage:

$ refresh_tokens_cli assemble [OPTIONS]

Options:

  • --count INTEGER: Number of accounts to process [default: 100]
  • --help: Show this message and exit.

refresh_tokens_cli obtain

Obtain new session tokens if not exists.

Usage:

$ refresh_tokens_cli obtain [OPTIONS]

Options:

  • --count INTEGER: Number of accounts to process [default: 10]
  • --help: Show this message and exit.

refresh_tokens_cli refresh

Refresh tokens.

Usage:

$ refresh_tokens_cli refresh [OPTIONS]

Options:

  • --empty-tokens / --no-empty-tokens: Refresh tokens only if share or access token is empty [default: no-empty-tokens]
  • --count INTEGER: Number of accounts to process [default: -1]
  • --help: Show this message and exit.

ChatGPT-Register 使用示例

  • 注册过程的日志截图:

    注册过程日志
  • 数据库中的账号截图:

    数据库账号截图

加入我们

欢迎加入微信群,获取更多信息和支持:

微信群二维码

贡献

期待您的Pull Request和建议,一起完善这个项目。

许可

本项目采用 MIT 许可证。

About

ChatGPT-Register 是一个自动化工具,用于无人工干预地注册 ChatGPT 账号。

License:MIT License


Languages

Language:Python 96.4%Language:Dockerfile 3.6%