71 lines
1.6 KiB
Python
71 lines
1.6 KiB
Python
#!/usr/bin/env python3
|
|
# main.py
|
|
"""OpenAI Sentinel Bypass - 主入口"""
|
|
|
|
import sys
|
|
import argparse
|
|
from modules import OpenAIRegistrar
|
|
from config import DEBUG
|
|
|
|
|
|
def main():
|
|
parser = argparse.ArgumentParser(
|
|
description='OpenAI Registration Automation (Sentinel Bypass)'
|
|
)
|
|
|
|
parser.add_argument(
|
|
'email',
|
|
help='Email address to register'
|
|
)
|
|
|
|
parser.add_argument(
|
|
'password',
|
|
help='Password for the account'
|
|
)
|
|
|
|
parser.add_argument(
|
|
'--session-id',
|
|
help='Custom session ID (default: auto-generated UUID)',
|
|
default=None
|
|
)
|
|
|
|
parser.add_argument(
|
|
'--quiet',
|
|
action='store_true',
|
|
help='Suppress debug output'
|
|
)
|
|
|
|
args = parser.parse_args()
|
|
|
|
# 设置调试模式
|
|
if args.quiet:
|
|
import config
|
|
config.DEBUG = False
|
|
|
|
# 创建注册器
|
|
registrar = OpenAIRegistrar(session_id=args.session_id)
|
|
|
|
# 执行注册
|
|
result = registrar.register(args.email, args.password)
|
|
|
|
# 输出结果
|
|
print("\n" + "="*60)
|
|
if result['success']:
|
|
print("✓ REGISTRATION SUCCESSFUL")
|
|
print(f"Email: {args.email}")
|
|
if 'data' in result:
|
|
print(f"Response: {result['data']}")
|
|
else:
|
|
print("✗ REGISTRATION FAILED")
|
|
print(f"Error: {result.get('error', 'Unknown error')}")
|
|
if 'status_code' in result:
|
|
print(f"Status code: {result['status_code']}")
|
|
print("="*60)
|
|
|
|
# 返回退出码
|
|
sys.exit(0 if result['success'] else 1)
|
|
|
|
|
|
if __name__ == '__main__':
|
|
main()
|