Gpt-Agreement-Payment is a Python project on GitHub under DanOps-1/Gpt-Agreement-Payment, with 921 stars. It provides an end-to-end protocol replay toolkit for the ChatGPT Team subscription process, reverse-engineering the full chain from Stripe Checkout through PayPal billing agreement, ChatGPT manual approval, and Codex OAuth with PKCE. Users supply a clean proxy and payment credentials; the tool runs and outputs an OAuth refresh_token in output/results.jsonl.
The project exists to demonstrate protocol reconstruction for research purposes. It includes a from-scratch hCaptcha visual solver and empirical data on OpenAI's anti-fraud mechanisms, collected from real runs. A prominent caution in the README requires users to agree to a NOTICE file, limiting use to owned systems, legal CTF challenges, authorized bug bounty assets, or security research. It prohibits fraud, payment evasion, bulk account creation for resale, ToS violations, or unauthorized targets, with users bearing all legal responsibility.
Core features
The toolkit breaks down the subscription flow into replayable client-side steps, as shown in its architecture diagram:
flowchart LR
A[pipeline.py] --> B[CTF-reg/<br/>browser_register.py<br/>Camoufox + Turnstile]
B --> C[CTF-pay/card.py<br/>Stripe Checkout 重放]
C --> D[Stripe confirm<br/>+ ChatGPT /approve]
D --> E[Camoufox PayPal<br/>协议授权]
E --> F[Stripe poll<br/>state=succeeded]
F --> G[Camoufox 二次登录<br/>Codex OAuth + PKCE]
G --> H[refresh_token<br/>output/results.jsonl]
Three standout components include:
- hCaptcha visual solver in
CTF-pay/hcaptcha_auto_solver.py(around 4000 lines). Uses a VLM primary path, CLIP/OpenCV heuristic fallback, and Playwright for human-like actions; covers 12 known hCaptcha question types. Standalone usable, with optional ML dependencies like Torch and Transformers. - Anti-fraud empirical data in
docs/anti-fraud-research.md. Details IP fingerprinting, batch association delays, probe vs. ban layer separation. Based on 45 accounts with ~2% 24-hour survival rate, including a correction model. - Self-healing daemon loops in
pipeline.py::daemon(). Handles Webshare API IP rotation, Cloudflare DNS quota cleanup, tmpfs orphan recovery, gost relay watchdog, and DataDome slider dragging. Targets weeks of unattended operation.
Full subsystem breakdowns appear in docs/architecture.md.
Getting it running
The project targets Linux systems capable of running Camoufox and Playwright (5 GB disk, 2 GB RAM minimum). It requires Python 3.11+. First-time setup demands a real PayPal account (manual email OTP on initial run), an EU/US-exit proxy (due to PayPal/Stripe geo-restrictions), a Cloudflare zone for catch-all email subdomains, and optionally an OpenAI-compatible VLM API key or captcha service for hCaptcha fallback.
For newcomers, a web UI wizard cuts manual config to 15 minutes via a 14-step process with preflight checks and SSE logging. It generates CTF-pay/config.auto.json and CTF-reg/config.paypal-proxy.json.
# Backend dependencies
pip install -r webui/requirements.txt
# Frontend build (one-time)
cd webui/frontend && pnpm i && pnpm build && cd ../..
# Launch
python -m webui.server
Access at http://127.0.0.1:8765; first visit sets up an admin at /setup. Supports Plus/Team paths; nginx reverse proxy details in webui/README.md.
Core installation:
git clone https://github.com/DanOps-1/Gpt-Agreement-Payment
cd Gpt-Agreement-Payment
pip install requests curl_cffi playwright camoufox browserforge mitmproxy pybase64
playwright install firefox
camoufox fetch
ML dependencies for hCaptcha solver go in a separate venv (~4 GB):
python -m venv ~/.venvs/ctfml
~/.venvs/ctfml/bin/pip install torch transformers opencv-python pillow numpy
Copy and edit configs:
cp CTF-pay/config.paypal.example.json CTF-pay/config.paypal.json
cp CTF-reg/config.paypal-proxy.example.json CTF-reg/config.paypal-proxy.json
Field schemas in docs/configuration.md. Run a single pipeline:
xvfb-run -a python pipeline.py --config CTF-pay/config.paypal.json --paypal
Daemon mode for ongoing pool maintenance:
xvfb-run -a python pipeline.py --config CTF-pay/config.paypal.json --paypal --d
Single runs take ~5 minutes once stable; initial tuning spans 1-3 hours. Full deps and system packages in docs/installation.md. Code emphasizes research over readability; CTF-pay/card.py spans 8000 lines, segmented by protocol phases.
Who this is for
Security researchers dissecting payment and anti-bot flows suit this toolkit best. CTF players or bug bounty hunters targeting authorized in-scope assets can replay the protocol legally. Those studying fraud detection—via the provided datasets on IP fingerprints and survival rates—find value in the empirical side.
Home proxies often skip hCaptcha, easing entry without VLM keys. Daemon features support prolonged testing under evasion constraints. Casual users seeking quick ChatGPT access do not fit; the README tags it for CTF / bug bounty use only.
How it compares
No direct open-source alternatives match this depth in ChatGPT subscription replay. General captcha solvers like 2captcha handle hCaptcha via services but lack the integrated VLM/Playwright stack here. Browser automation tools (Playwright, Puppeteer) build similar flows but miss the anti-fraud data and self-healing specific to OpenAI/Stripe/PayPal. Commercial account farming tools exist underground but violate ToS outright, unlike this project's scoped intent.
Its research-oriented code (dense, phase-partitioned files) trades usability for protocol fidelity, heavier than lighter proxies like residential IP rotators alone.
Expect non-trivial setup and legal diligence. Source at https://github.com/DanOps-1/Gpt-Agreement-Payment.
Comments