Skip to content

Selenium39/grok-auto-register

Repository files navigation

Grok Register

English | 中文

Automated browser workflow for authorized xAI/Grok registration testing. The script uses DrissionPage to drive Chromium, obtains temporary email verification codes through ChatTempMail, completes the sign-up flow, and writes the resulting sso cookie to a local output file.

Use this project only for accounts and environments where you have permission. Respect the target service's terms of service and rate limits.

Features

  • Starts each registration round in a fresh Chromium instance.
  • Uses ChatTempMail to create a temporary email inbox and poll for verification codes.
  • Fills email, OTP, profile, and password fields automatically.
  • Supports headless mode by default, with an optional visible browser mode for debugging.
  • Appends one sso value per line to a local output file.

Requirements

  • Python 3.12 or 3.13 recommended.
  • Chromium or Chrome available on the machine.
  • ChatTempMail API key.

Install dependencies:

pip install -r requirements.txt

Configuration

Before running, open openai_register.py and replace the placeholder ChatTempMail API key with your real key:

API_KEY = "your_real_api_key_here"

Keep the placeholder value when committing to GitHub. Do not commit a real API key, cookie, or generated output such as sso.txt.

Usage

Run one registration round:

python3 main.py --count 1

Run continuously until interrupted:

python3 main.py

Use a custom output file:

python3 main.py --count 1 --output ./output-sso.txt

Show the browser window for debugging:

DPE_HEADLESS=0 python3 main.py --count 1

CLI Options

Option Default Description
--count 0 Number of rounds to run. 0 means run indefinitely.
--output sso.txt Output file path for collected sso values.
--extract-numbers disabled Also extract visible numeric text after registration completes.

Output

By default, the script appends collected values to:

sso.txt

Each line contains one sso value. Treat this file as sensitive because session cookies can grant account access.

Security Notes

  • Never commit sso.txt, .env, API keys, cookies, or other credentials.
  • Rotate any API key that has ever been committed or shared publicly.
  • Keep generated cookies private and delete them when no longer needed.
  • Review the code before running it against any real account or service.

Project Structure

main.py                  Main browser automation workflow
openai_register.py       [ChatTempMail](https://chat-tempmail.com/en) email and verification-code helper
turnstilePatch/          Chromium extension files used by the browser workflow
requirements.txt         Python dependencies

Disclaimer

This project is not affiliated with xAI, Grok, OpenAI, ChatTempMail, or Cloudflare. Use it responsibly and only where you are authorized to do so.

About

Automated browser workflow for authorized xAI/Grok registration testing.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors