自建邮箱版本

This commit is contained in:
huangzhenpc
2025-04-07 13:14:29 +08:00
parent 9d00c0b58e
commit 901c8c95e1
8 changed files with 699 additions and 19 deletions

View File

@@ -68,13 +68,14 @@ class FormBuilder:
def build_register_form(boundary: str, email: str, token: str) -> tuple[str, str]:
"""构建注册表单数据,返回(form_data, password)"""
password = FormBuilder._generate_password()
first_name, last_name = FormBuilder._generate_name()
fields = {
"1_state": "{\"returnTo\":\"/settings\"}",
"1_redirect_uri": "https://cursor.com/api/auth/callback",
"1_bot_detection_token": token,
"1_first_name": "wa",
"1_last_name": "niu",
"1_first_name": first_name,
"1_last_name": last_name,
"1_email": email,
"1_password": password,
"1_intent": "sign-up",
@@ -249,7 +250,8 @@ class RegisterWorker:
boundary = "----WebKitFormBoundary2rKlvTagBEhneWi3"
headers = {
"accept": "text/x-component",
"next-action": "770926d8148e29539286d20e1c1548d2aff6c0b9",
# "next-action": "770926d8148e29539286d20e1c1548d2aff6c0b9",
"next-action": "a67eb6646e43eddcbd0d038cbee664aac59f5a53",
"content-type": f"multipart/form-data; boundary={boundary}",
"origin": "https://authenticator.cursor.sh",
"sec-fetch-dest": "empty",