Skip to content

PaperXiang/gpt-regplus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fp-reg-plus

ChatGPT Plus 1-month-free 批量注册框架。基于 outlook OAuth refresh_token 接码 + Camoufox 反检测浏览器 + 维度多样化指纹画像。目标只有一个:拿到 Stripe paymentLink 让用户去支付

access_token / session_token / refresh_token 都不持久化 —— 它们是中间产物,不属于注册成果。未来 refresh_token 通过单独的 OAuth 流程获取。


项目结构

fp-reg-plus/
├── fpreg/
│   ├── __init__.py
│   ├── __main__.py            # 统一 CLI(subcommands)
│   ├── config.py              # 配置加载(JSON + env 覆盖)
│   ├── logging_setup.py       # 日志
│   ├── mailbox.py             # 接码 util(小苹果取件 API + OTP 抽取)
│   ├── account_pool.py        # SQLite 卡密状态机(idle/in_use/consumed/dead)
│   ├── proxy_pool.py          # SQLite 代理池
│   ├── persona.py             # 算法化人名/邮箱前缀/密码
│   ├── fingerprint.py         # 指纹画像生成(OS/Screen/locale/TLS 多样化)
│   ├── cf_bypass.py           # Cloudflare clearance 抓取(Camoufox + 缓存)
│   ├── browser_register.py    # Camoufox 注册主流程
│   └── webui.py               # Flask 管理面板(看 paymentLink + 自动打开)
├── tests/                     # 离线单测(90 个全过)
├── data/                      # SQLite + results.jsonl + cf_state.json
├── config.example.json
└── requirements.txt

快速开始

1. 装依赖

pip install -r requirements.txt
playwright install firefox
camoufox fetch

2. 配置

python -m fpreg init-config config.json

打开 config.json,填 mail_api.base_url(小苹果取件 buyer 域名)。

可选:调整 camoufox.headless 控制浏览器是否可视化。

3. 导入资源

卡密(mail.txt 每行 email----password----client_id----refresh_token):

python -m fpreg import-mails mail.txt

代理(proxies.txt 每行 host:port[:user:pass[:exit_ip]]):

python -m fpreg import-proxies proxies.txt

看一眼资源池:

python -m fpreg stats

4. 跑注册(并行)

# 5 个邮箱并行注册(默认 workers = count,全并行无间隔)
python -m fpreg register --count 5

# 限制并发数(如内存紧张)
python -m fpreg register --count 10 --workers 3

# 显示浏览器窗口(debug 用)
python -m fpreg register --count 1 --show

# 失败时停浏览器等人肉接管
python -m fpreg register --count 1 --show --pause-on-error

结果 append 到 data/results.jsonl(单文件,不再 per-run)。每行只含:

  • email / success / payment_link / stage_failed / error / duration_secs / fingerprint_id

5. 启 WebUI 看结果 + 支付

python -m fpreg webui                 # 默认 http://127.0.0.1:5000
python -m fpreg webui --port 8080

WebUI 特性:

  • 自动打开新 paymentLink:每 5s 轮询,发现新成功的 paymentLink → JS window.open 自动弹支付页(localStorage 标记 seen,刷新不会重复弹)
  • Popup 拦截兜底:浏览器拦了 popup → 顶部出现红条 "X 个 paymentLink 待打开",点一下一次性开(用户手势触发不会被拦)
  • 邮箱状态可视化(idle / in_use / consumed / dead),consumed 排到底部
  • 每行 按钮(带确认弹窗)

6. 单独删一个邮箱

python -m fpreg delete xxx@outlook.com

CLI 一览

fpreg <command> [options]

  init-config <path>           生成配置模板
  import-mails <file>          导入 outlook 卡密
  import-proxies <file>        导入代理
  stats                        看卡密池 + 代理池状态
  delete <email>               按 email 删一个卡密
  register --count N           并行跑 N 次注册
  webui [--port N]             启动管理 WebUI

每个子命令都有 --help 详细说明。全局 --config / --log-level / --version


核心模块要点

mailbox.py — 接码

封装小苹果取件 API:/api/mail-new 取最新一封 → 整 JSON 跑 \d{6} 拿 OTP。注册前 /api/process-inbox + /api/process-junk 清空避免拉旧 OTP。

account_pool.py — 卡密状态机

idle → in_use → consumed (注册成功,paymentLink 拿到)
            ↘ dead (refresh_token 失效 / 401 / 403)
            ↘ idle (其他失败,可重试)

checkout() 用事务 + LIMIT 1 防并发抢号,20 线程并发测试通过。reset_stale(secs) 回收崩溃残留的 in_use。

persona.py — 同源 persona

from_existing_email(email) 从 outlook 卡密邮箱反推 first/last(CamelCase 拆分)。例 ReginaBryce1175@outlook.com → first=Regina / last=Bryce。

为什么重要:OpenAI 反欺诈检查"邮箱前缀 vs 显示姓名"一致性,差异会扣分。

fingerprint.py — 指纹多样化

维度
OS windows 70 / macos 22 / linux 8
Screen 1920×1080 / 1366×768 / 1440×900 等 11 档
Locale en-US / en-GB / en-CA / en-AU / en-IE / en-NZ / en-ZA
Timezone 由代理出口 IP 通过 GeoIP 自动决定(不硬塞)
humanize_speed 0.85-1.20 倍随机

next_distinct_from(recent, min_diff_dims=2) 与最近 N 个画像至少差 N 个维度。

browser_register.py — 注册流程

1. open_signup           → goto chatgpt.com,点 Sign up
2. choose_email_path     → 点 Continue with email
3. fill_email            → 填邮箱
4. otp                   → 等 OTP 邮件 + 填入
5. fill_profile          → 填 Full name + Age(React Aria typeable label)
                          ※ 表单 8s 内不出现 → 视为已注册,跳过
6. skip_and_continue     → 等 5s 看 Skip:
                            有 Skip → Skip → Continue → Okay let's go
                            无 Skip → 直接进 chatgpt.com
7. request_checkout_link → 在浏览器内 fetch /backend-api/payments/checkout
                          → 拿到 Stripe paymentLink

异常分类:

  • BlockingChallengeError — CF / Turnstile / 人机校验(recoverable=True,换 IP 重试)
  • RegistrationError(stage, reason) — 注册流程其他失败

webui.py — 管理面板

Flask + 单页 + 5s 轮询 /api/accounts。表格展示 email / 状态 / 注册结果 / paymentLink / 错误。POST /delete 删邮箱。


配置项(config.json

{
  "data_dir": "data",
  "log_dir": "logs",
  "mail_api": {
    "base_url": "https://your-private-domain.com",
    "timeout": 45,
    "poll_interval": 4.0,
    "poll_total": 300,
    "fallback_to_junk": true
  },
  "camoufox": {
    "headless": null,        // null=自动(Win/Mac 显示,Linux 看 DISPLAY)/ true / false
    "humanize": 0.3,         // 鼠标移动上限(秒);越小越快
    "geoip": true,           // 让 Camoufox 按代理出口 IP 自动决定时区
    "slow_mo_ms": 0,
    "pause_on_error": false,
    "window_width": 1280,
    "window_height": 800,
    "step_jitter_scale": 1.0
  },
  "proxy": null,             // "socks5://user:pass@host:port" 或 null=用代理池随机
  "log_level": "INFO"
}

测试

python -m pytest tests/

当前 90 个离线测试全过(卡密解析 / OTP 抽取 / 状态机并发 / persona 一致性 / fingerprint 多样性 / proxy 池 / 持久化 roundtrip)。


工作流总结

# 一次性
python -m fpreg init-config config.json && vim config.json
python -m fpreg import-mails mail.txt
python -m fpreg import-proxies proxies.txt

# 启 webui(一直开着)
python -m fpreg webui &

# 批量注册(webui 会自动弹 paymentLink)
python -m fpreg register --count 5

# 人肉支付 → 完事

License & 声明

仅限授权范围内使用(自有系统 / 合法 CTF / 授权 bug bounty / 安全研究)。禁止用于欺诈、规避支付、批量造号转售、违反第三方 ToS。一切法律责任由使用者自负。

About

神秘克劳德驱动能工智人注册机

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages