mirror of
https://git.axenov.dev/mirrors/cursor-free-vip.git
synced 2025-12-26 21:50:39 +03:00
Compare commits
16 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5d3439a7d8 | ||
|
|
684323e328 | ||
|
|
8115a0b397 | ||
|
|
cca8ba1ae7 | ||
|
|
a392c8cc27 | ||
|
|
63209d6ed6 | ||
|
|
cbdd4fae4a | ||
|
|
414b5a7837 | ||
|
|
cba470344f | ||
|
|
12a3a522be | ||
|
|
6346059916 | ||
|
|
ab8489cdb9 | ||
|
|
bcb3565b9e | ||
|
|
c30e7dc3df | ||
|
|
aad19d89e4 | ||
|
|
4eac8a9e0e |
30
CHANGELOG.md
30
CHANGELOG.md
@@ -1,6 +1,34 @@
|
||||
# Change Log
|
||||
|
||||
## v1.7.11 ( Pre - Release 版本 )
|
||||
## v1.7.13
|
||||
1. Added _delete_current_account method to handle account deletion via API | 新增 _delete_current_account 方法,透過 API 處理帳號刪除
|
||||
|
||||
2. Updated account reset logic to use the appropriate auth method based on auth_type | 更新帳號重置邏輯,根據 auth_type 選擇適當的驗證方式
|
||||
|
||||
3. Maintained existing Google OAuth reset functionality | 維持現有的 Google OAuth 重置功能
|
||||
|
||||
4. Added proper error handling for account deletion failures | 新增帳號刪除失敗時的錯誤處理
|
||||
|
||||
5. Ensures GitHub authentication maintains its flow when resetting accounts | 確保 GitHub 認證在帳號重置時保持正常流程
|
||||
|
||||
6. The _delete_current_account method makes a POST request to https://www.cursor.com/api/dashboard/delete-account |
|
||||
_delete_current_account 方法會發送 POST 請求至 https://www.cursor.com/api/dashboard/delete-account
|
||||
|
||||
7. After successful deletion, redirects back to the authentication page | 刪除成功後,會導回驗證頁面
|
||||
|
||||
8. Uses Promise-based JavaScript for reliable API communication | 使用 Promise-based JavaScript,確保 API 通訊穩定
|
||||
|
||||
9. Includes proper error handling and logging | 包含適當的錯誤處理與日誌記錄
|
||||
|
||||
10. Add Brazilian Portuguese language | 新增巴西葡萄牙語
|
||||
|
||||
|
||||
## v1.7.12
|
||||
1. Add: Changelog Show in Menu | 增加更新日志在菜單中
|
||||
2. Remake Create Mail Logic | 重做創建郵箱邏輯
|
||||
3. Fix: Some Issues | 修復一些問題
|
||||
|
||||
## v1.7.11 ( Skip & Merge to v1.7.12 )
|
||||
1. Add: Multi-language Support | 增加多語言支持
|
||||
2. Add: German Language | 增加德語
|
||||
3. Add: Dutch Language | 增加荷蘭語
|
||||
|
||||
@@ -21,7 +21,7 @@ Cursor's configuration.
|
||||
這是一個自動化工具,自動註冊,支持 Windows 和 macOS 系統,完成 Auth 驗證,重置 Cursor 的配置。
|
||||
|
||||
<p align="center">
|
||||
<img src="./images/new_2025-02-27_10-42-44.png" alt="new" width="400" style="border-radius: 6px;"/><br>
|
||||
<img src="./images/new_2025-03-19_00-19-09.png" alt="new" width="400" style="border-radius: 6px;"/><br>
|
||||
</p>
|
||||
|
||||
##### If you don't have Google Chrome, you can download it from [here](https://www.google.com/intl/en_pk/chrome/)
|
||||
|
||||
@@ -6,4 +6,13 @@ teihu.com
|
||||
raleigh-construction.com
|
||||
pastryofistanbul.com
|
||||
linshiyouxiang.net
|
||||
Mohmal.com
|
||||
Mohmal.com
|
||||
pusmail.com
|
||||
questtechsystems.com
|
||||
ikomail.com
|
||||
ofanda.com
|
||||
pusmail.com
|
||||
ikomail.com
|
||||
mailpull.com
|
||||
drewzen.com
|
||||
begemail.com
|
||||
|
||||
BIN
images/new_2025-03-19_00-19-09.png
Normal file
BIN
images/new_2025-03-19_00-19-09.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 88 KiB |
@@ -25,7 +25,8 @@
|
||||
"vi": "Tiếng Việt",
|
||||
"nl": "Nederlands",
|
||||
"de": "Deutsch",
|
||||
"fr": "Français"
|
||||
"fr": "Français",
|
||||
"pt": "Brazilian Portuguese"
|
||||
},
|
||||
"quit_cursor": {
|
||||
"start": "Beginne Cursor zu Beenden",
|
||||
@@ -227,7 +228,7 @@
|
||||
},
|
||||
"email": {
|
||||
"starting_browser": "Browser Starten",
|
||||
"visiting_site": "Besuche mail.tm",
|
||||
"visiting_site": "Besuche mail domains",
|
||||
"create_success": "E-Mail Erfolgreich Erstellt",
|
||||
"create_failed": "E-Mail Erstellen Fehlgeschlagen",
|
||||
"create_error": "E-Mail-Erstellungsfehler: {error}",
|
||||
@@ -249,7 +250,8 @@
|
||||
"failed_to_get_available_domains": "Verfügbare Domains Erhalten Fehlgeschlagen",
|
||||
"domains_excluded": "Ausgeschlossene Domains: {domains}",
|
||||
"failed_to_create_account": "Konto Erstellen Fehlgeschlagen",
|
||||
"account_creation_error": "Konto-Erstellungsfehler: {error}"
|
||||
"account_creation_error": "Konto-Erstellungsfehler: {error}",
|
||||
"domain_blocked": "Domain Blocked: {domain}"
|
||||
},
|
||||
"update": {
|
||||
"title": "Cursor Auto-Update Deaktivieren",
|
||||
@@ -274,7 +276,8 @@
|
||||
"update_confirm": "Möchten Sie die neueste Version aktualisieren? (Y/n)",
|
||||
"update_skipped": "Update überspringen.",
|
||||
"invalid_choice": "Ungültige Auswahl. Bitte geben Sie 'Y' oder 'n' ein.",
|
||||
"development_version": "Entwickler-Version {current} > {latest}"
|
||||
"development_version": "Entwickler-Version {current} > {latest}",
|
||||
"changelog_title": "Changelog"
|
||||
},
|
||||
"totally_reset": {
|
||||
"title": "Cursor Vollständig Zurücksetzen",
|
||||
|
||||
@@ -228,7 +228,7 @@
|
||||
},
|
||||
"email": {
|
||||
"starting_browser": "Starting Browser",
|
||||
"visiting_site": "Visiting mail.tm",
|
||||
"visiting_site": "Visiting mail domains",
|
||||
"create_success": "Email Created Successfully",
|
||||
"create_failed": "Failed to Create Email",
|
||||
"create_error": "Email Creation Error: {error}",
|
||||
@@ -259,7 +259,8 @@
|
||||
"blocked_domains_loaded_timeout_error": "Blocked Domains Loaded Timeout Error: {error}",
|
||||
"available_domains_loaded": "Available Domains Loaded: {count}",
|
||||
"domains_filtered": "Domains Filtered: {count}",
|
||||
"trying_to_create_email": "Trying to create email: {email}"
|
||||
"trying_to_create_email": "Trying to create email: {email}",
|
||||
"domain_blocked": "Domain Blocked: {domain}"
|
||||
},
|
||||
"update": {
|
||||
"title": "Disable Cursor Auto Update",
|
||||
@@ -284,7 +285,8 @@
|
||||
"update_confirm": "Do you want to update to the latest version? (Y/n)",
|
||||
"update_skipped": "Skipping update.",
|
||||
"invalid_choice": "Invalid choice. Please enter 'Y' or 'n'.",
|
||||
"development_version": "Development Version {current} > {latest}"
|
||||
"development_version": "Development Version {current} > {latest}",
|
||||
"changelog_title": "Changelog"
|
||||
},
|
||||
"totally_reset": {
|
||||
"title": "Totally Reset Cursor",
|
||||
|
||||
@@ -25,7 +25,8 @@
|
||||
"vi": "Tiếng Việt",
|
||||
"nl": "Nederlands",
|
||||
"de": "Deutsch",
|
||||
"fr": "Français"
|
||||
"fr": "Français",
|
||||
"pt": "Brazilian Portuguese"
|
||||
},
|
||||
"quit_cursor": {
|
||||
"start": "Début de la Fermeture de Cursor",
|
||||
@@ -227,7 +228,7 @@
|
||||
},
|
||||
"email": {
|
||||
"starting_browser": "Démarrage du Navigateur",
|
||||
"visiting_site": "Visite de mail.tm",
|
||||
"visiting_site": "Visite de mail domains",
|
||||
"create_success": "E-mail Créé avec Succès",
|
||||
"create_failed": "Échec de la Création de l'E-mail",
|
||||
"create_error": "Erreur de Création de l'E-mail : {error}",
|
||||
@@ -249,7 +250,8 @@
|
||||
"failed_to_get_available_domains": "Échec de l'Obtention des Domaines Disponibles",
|
||||
"domains_excluded": "Domaines Exclus : {domains}",
|
||||
"failed_to_create_account": "Échec de la Création du Compte",
|
||||
"account_creation_error": "Erreur de Création du Compte : {error}"
|
||||
"account_creation_error": "Erreur de Création du Compte : {error}",
|
||||
"domain_blocked": "Domaine Bloqué : {domain}"
|
||||
},
|
||||
"update": {
|
||||
"title": "Désactivation de la Mise à Jour Automatique de Cursor",
|
||||
@@ -274,7 +276,8 @@
|
||||
"update_confirm": "Voulez-vous mettre à jour vers la version la plus récente? (O/n)",
|
||||
"update_skipped": "Mise à jour ignorée.",
|
||||
"invalid_choice": "Choix invalide. Veuillez entrer 'O' ou 'n'.",
|
||||
"development_version": "Version de Développement {current} > {latest}"
|
||||
"development_version": "Version de Développement {current} > {latest}",
|
||||
"changelog_title": "Journal des modifications"
|
||||
},
|
||||
"totally_reset": {
|
||||
"title": "Réinitialiser Complètement Cursor",
|
||||
|
||||
@@ -25,7 +25,8 @@
|
||||
"vi": "Tiếng Việt",
|
||||
"nl": "Nederlands",
|
||||
"de": "Deutsch",
|
||||
"fr": "Français"
|
||||
"fr": "Français",
|
||||
"pt": "Brazilian Portuguese"
|
||||
},
|
||||
"quit_cursor": {
|
||||
"start": "Start met afsluiten van Cursor",
|
||||
@@ -227,7 +228,7 @@
|
||||
},
|
||||
"email": {
|
||||
"starting_browser": "Browser starten",
|
||||
"visiting_site": "Bezoek mail.tm",
|
||||
"visiting_site": "Bezoek mail domains",
|
||||
"create_success": "E-mail succesvol aangemaakt",
|
||||
"create_failed": "E-mail aanmaken mislukt",
|
||||
"create_error": "E-mail aanmaakfout: {error}",
|
||||
@@ -249,7 +250,8 @@
|
||||
"failed_to_get_available_domains": "Verkrijgen van beschikbare domeinen mislukt",
|
||||
"domains_excluded": "Uitgesloten domeinen: {domains}",
|
||||
"failed_to_create_account": "Account aanmaken mislukt",
|
||||
"account_creation_error": "Account aanmaakfout: {error}"
|
||||
"account_creation_error": "Account aanmaakfout: {error}",
|
||||
"domain_blocked": "Domein geblokkeerd: {domain}"
|
||||
},
|
||||
"update": {
|
||||
"title": "Cursor automatische update uitschakelen",
|
||||
@@ -274,7 +276,8 @@
|
||||
"update_confirm": "Wil je de nieuwste versie gebruiken? (Y/n)",
|
||||
"update_skipped": "Update overgeslagen.",
|
||||
"invalid_choice": "Ongeldige keuze. Voer 'Y' of 'n' in.",
|
||||
"development_version": "Ontwikkelversie {current} > {latest}"
|
||||
"development_version": "Ontwikkelversie {current} > {latest}",
|
||||
"changelog_title": "Changelog"
|
||||
},
|
||||
"totally_reset": {
|
||||
"title": "Cursor volledig herstellen",
|
||||
|
||||
382
locales/pt.json
Normal file
382
locales/pt.json
Normal file
@@ -0,0 +1,382 @@
|
||||
{
|
||||
"menu": {
|
||||
"title": "Opções Disponíveis",
|
||||
"exit": "Sair do Programa",
|
||||
"reset": "Redefinir ID da Máquina",
|
||||
"register": "Registrar Nova Conta no Cursor",
|
||||
"register_google": "Registrar com Conta do Google",
|
||||
"register_github": "Registrar com Conta do GitHub",
|
||||
"register_manual": "Registrar Cursor com E-mail Personalizado",
|
||||
"quit": "Fechar Cursor",
|
||||
"select_language": "Alterar Idioma",
|
||||
"input_choice": "Por favor, insira sua escolha ({choices})",
|
||||
"invalid_choice": "Seleção inválida. Insira um número de {choices}",
|
||||
"program_terminated": "Programa encerrado pelo usuário",
|
||||
"error_occurred": "Ocorreu um erro: {error}. Por favor, tente novamente",
|
||||
"press_enter": "Pressione Enter para Sair",
|
||||
"disable_auto_update": "Desativar Atualização Automática do Cursor",
|
||||
"lifetime_access_enabled": "ACESSO VITALÍCIO HABILITADO",
|
||||
"totally_reset": "Redefinir Cursor Completamente"
|
||||
},
|
||||
"languages": {
|
||||
"en": "Inglês",
|
||||
"zh_cn": "Chinês Simplificado",
|
||||
"zh_tw": "Chinês Tradicional",
|
||||
"vi": "Vietnamita",
|
||||
"nl": "Holandês",
|
||||
"de": "Alemão",
|
||||
"fr": "Francês",
|
||||
"pt": "Português do Brasil"
|
||||
},
|
||||
"quit_cursor": {
|
||||
"start": "Iniciando fechamento do Cursor",
|
||||
"no_process": "Nenhum processo do Cursor em execução",
|
||||
"terminating": "Encerrando processo {pid}",
|
||||
"waiting": "Aguardando o processo ser finalizado",
|
||||
"success": "Todos os processos do Cursor foram encerrados",
|
||||
"timeout": "Tempo limite do processo: {pids}",
|
||||
"error": "Ocorreu um erro: {error}"
|
||||
},
|
||||
"reset": {
|
||||
"title": "Ferramenta de Redefinição de ID da Máquina",
|
||||
"checking": "Verificando arquivo de configuração",
|
||||
"not_found": "Arquivo de configuração não encontrado",
|
||||
"no_permission": "Não é possível ler ou escrever no arquivo de configuração. Verifique as permissões do arquivo",
|
||||
"reading": "Lendo configuração atual",
|
||||
"creating_backup": "Criando backup da configuração",
|
||||
"backup_exists": "Arquivo de backup já existe, pulando etapa de backup",
|
||||
"generating": "Gerando novo ID da máquina",
|
||||
"saving_json": "Salvando nova configuração no JSON",
|
||||
"success": "ID da Máquina redefinido com sucesso",
|
||||
"new_id": "Novo ID da Máquina",
|
||||
"permission_error": "Erro de permissão: {error}",
|
||||
"run_as_admin": "Tente executar este programa como Administrador",
|
||||
"process_error": "Erro no processo de redefinição: {error}",
|
||||
"updating_sqlite": "Atualizando banco de dados SQLite",
|
||||
"updating_pair": "Atualizando chave-valor",
|
||||
"sqlite_success": "Banco de dados SQLite atualizado com sucesso",
|
||||
"sqlite_error": "Falha na atualização do banco de dados SQLite: {error}",
|
||||
"press_enter": "Pressione Enter para sair",
|
||||
"unsupported_os": "Sistema operacional não suportado: {os}",
|
||||
"linux_path_not_found": "Caminho do Linux não encontrado",
|
||||
"updating_system_ids": "Atualizando IDs do sistema",
|
||||
"system_ids_updated": "IDs do sistema atualizados com sucesso",
|
||||
"system_ids_update_failed": "Falha na atualização dos IDs do sistema: {error}",
|
||||
"windows_guid_updated": "GUID do Windows atualizado com sucesso",
|
||||
"windows_permission_denied": "Permissão negada no Windows",
|
||||
"windows_guid_update_failed": "Falha na atualização do GUID do Windows",
|
||||
"macos_uuid_updated": "UUID do macOS atualizado com sucesso",
|
||||
"plutil_command_failed": "Falha no comando plutil",
|
||||
"start_patching": "Iniciando correção de getMachineId",
|
||||
"macos_uuid_update_failed": "Falha na atualização do UUID do macOS",
|
||||
"current_version": "Versão atual do Cursor: {version}",
|
||||
"patch_completed": "Correção de getMachineId concluída",
|
||||
"patch_failed": "Falha na correção de getMachineId: {error}",
|
||||
"version_check_passed": "Verificação de versão do Cursor aprovada",
|
||||
"file_modified": "Arquivo modificado",
|
||||
"version_less_than_0_45": "Versão do Cursor < 0.45.0, pulando correção de getMachineId",
|
||||
"detecting_version": "Detectando versão do Cursor",
|
||||
"patching_getmachineid": "Corrigindo getMachineId",
|
||||
"version_greater_than_0_45": "Versão do Cursor >= 0.45.0, corrigindo getMachineId",
|
||||
"permission_denied": "Permissão negada: {error}",
|
||||
"backup_created": "Backup criado",
|
||||
"update_success": "Atualização concluída com sucesso",
|
||||
"update_failed": "Falha na atualização: {error}",
|
||||
"windows_machine_guid_updated": "GUID da máquina do Windows atualizado com sucesso",
|
||||
"reading_package_json": "Lendo package.json {path}",
|
||||
"invalid_json_object": "Objeto JSON inválido",
|
||||
"no_version_field": "Campo de versão não encontrado no package.json",
|
||||
"version_field_empty": "Campo de versão está vazio",
|
||||
"invalid_version_format": "Formato de versão inválido: {version}",
|
||||
"found_version": "Versão encontrada: {version}",
|
||||
"version_parse_error": "Erro ao analisar versão: {error}",
|
||||
"package_not_found": "Package.json não encontrado: {path}",
|
||||
"check_version_failed": "Falha ao verificar versão: {error}",
|
||||
"stack_trace": "Rastreamento de pilha",
|
||||
"version_too_low": "Versão do Cursor muito baixa: {version} < 0.45.0"
|
||||
},
|
||||
"register": {
|
||||
"title": "Ferramenta de Registro do Cursor",
|
||||
"start": "Iniciando o processo de registro...",
|
||||
"handling_turnstile": "Processando verificação de segurança...",
|
||||
"retry_verification": "Tentando novamente a verificação...",
|
||||
"detect_turnstile": "Verificando validação de segurança...",
|
||||
"verification_success": "Verificação de segurança bem-sucedida",
|
||||
"starting_browser": "Abrindo navegador...",
|
||||
"form_success": "Formulário enviado com sucesso",
|
||||
"browser_started": "Navegador aberto com sucesso",
|
||||
"waiting_for_second_verification": "Aguardando verificação por e-mail...",
|
||||
"waiting_for_verification_code": "Aguardando código de verificação...",
|
||||
"password_success": "Senha definida com sucesso",
|
||||
"password_error": "Não foi possível definir a senha: {error}. Por favor, tente novamente",
|
||||
"waiting_for_page_load": "Carregando página...",
|
||||
"first_verification_passed": "Verificação inicial bem-sucedida",
|
||||
"mailbox": "Caixa de entrada de e-mail acessada com sucesso",
|
||||
"register_start": "Iniciar Registro",
|
||||
"form_submitted": "Formulário Enviado, Iniciando Verificação...",
|
||||
"filling_form": "Preenchendo Formulário",
|
||||
"visiting_url": "Visitando URL",
|
||||
"basic_info": "Informações básicas enviadas",
|
||||
"handle_turnstile": "Processar Turnstile",
|
||||
"no_turnstile": "Turnstile Não Detectado",
|
||||
"turnstile_passed": "Turnstile Passado",
|
||||
"verification_start": "Iniciando Obtenção do Código de Verificação",
|
||||
"verification_timeout": "Tempo Esgotado para Obter Código de Verificação",
|
||||
"verification_not_found": "Nenhum Código de Verificação Encontrado",
|
||||
"try_get_code": "Tentativa | {attempt} Obter Código de Verificação | Tempo Restante: {time}s",
|
||||
"get_account": "Obtendo Informações da Conta",
|
||||
"get_token": "Obtendo Token da Sessão do Cursor",
|
||||
"token_success": "Token Obtido com Sucesso",
|
||||
"token_attempt": "Tentativa | {attempt} de obter o Token | Tentando novamente em {time}s",
|
||||
"token_max_attempts": "Número máximo de tentativas atingido ({max}) | Falha ao obter o Token",
|
||||
"token_failed": "Falha ao Obter Token: {error}",
|
||||
"account_error": "Falha ao Obter Informações da Conta: {error}",
|
||||
"press_enter": "Pressione Enter para sair",
|
||||
"browser_start": "Iniciando Navegador",
|
||||
"open_mailbox": "Abrindo Página da Caixa de Entrada",
|
||||
"email_error": "Falha ao obter endereço de e-mail",
|
||||
"setup_error": "Erro de configuração do e-mail: {error}",
|
||||
"start_getting_verification_code": "Iniciando obtenção do código de verificação, tentará em 60s",
|
||||
"get_verification_code_timeout": "Tempo Esgotado para Obter Código de Verificação",
|
||||
"get_verification_code_success": "Código de Verificação Obtido com Sucesso",
|
||||
"try_get_verification_code": "Tentativa | {attempt} Obter Código de Verificação | Tempo Restante: {remaining_time}s",
|
||||
"verification_code_filled": "Código de Verificação Preenchido",
|
||||
"login_success_and_jump_to_settings_page": "Login bem-sucedido, indo para a página de configurações",
|
||||
"detect_login_page": "Página de login detectada, iniciando login...",
|
||||
"cursor_registration_completed": "Registro do Cursor Concluído!",
|
||||
"set_password": "Definir Senha",
|
||||
"basic_info_submitted": "Informações Básicas Enviadas",
|
||||
"cursor_auth_info_updated": "Informações de Autenticação do Cursor Atualizadas",
|
||||
"cursor_auth_info_update_failed": "Falha ao Atualizar Informações de Autenticação do Cursor",
|
||||
"reset_machine_id": "Reiniciar ID da Máquina",
|
||||
"account_info_saved": "Informações da Conta Salvas",
|
||||
"save_account_info_failed": "Falha ao Salvar Informações da Conta",
|
||||
"get_email_address": "Obtendo Endereço de E-mail",
|
||||
"update_cursor_auth_info": "Atualizar Informações de Autenticação do Cursor",
|
||||
"register_process_error": "Erro no Processo de Registro: {error}",
|
||||
"setting_password": "Configurando Senha",
|
||||
"manual_code_input": "Inserção Manual do Código",
|
||||
"manual_email_input": "Inserção Manual de E-mail",
|
||||
"password": "Senha",
|
||||
"first_name": "Nome",
|
||||
"last_name": "Sobrenome",
|
||||
"exit_signal": "Sinal para Sair",
|
||||
"email_address": "Endereço de E-mail",
|
||||
"config_created": "Configuração Criada",
|
||||
"verification_failed": "Falha na Verificação",
|
||||
"verification_error": "Erro de Verificação: {error}",
|
||||
"config_option_added": "Opção de Configuração Adicionada: {option}",
|
||||
"config_updated": "Configuração Atualizada",
|
||||
"password_submitted": "Senha Enviada",
|
||||
"total_usage": "Uso Total: {usage}",
|
||||
"setting_on_password": "Configurando Senha",
|
||||
"getting_code": "Obtendo Código de Verificação, Tentará em 60s"
|
||||
},
|
||||
"auth": {
|
||||
"title": "Gerenciador de Autenticação do Cursor",
|
||||
"checking_auth": "Verificando arquivo de autenticação",
|
||||
"auth_not_found": "Arquivo de autenticação não encontrado",
|
||||
"auth_file_error": "Erro no arquivo de autenticação: {error}",
|
||||
"reading_auth": "Lendo arquivo de autenticação",
|
||||
"updating_auth": "Atualizando informações de autenticação",
|
||||
"auth_updated": "Informações de autenticação atualizadas com sucesso",
|
||||
"auth_update_failed": "Falha ao atualizar informações de autenticação: {error}",
|
||||
"auth_file_created": "Arquivo de autenticação criado",
|
||||
"auth_file_create_failed": "Falha ao criar arquivo de autenticação: {error}",
|
||||
"press_enter": "Pressione Enter para sair",
|
||||
"reset_machine_id": "Redefinir ID da máquina",
|
||||
"database_connection_closed": "Conexão com o banco de dados fechada",
|
||||
"database_updated_successfully": "Banco de dados atualizado com sucesso",
|
||||
"connected_to_database": "Conectado ao banco de dados",
|
||||
"updating_pair": "Atualizando par chave-valor",
|
||||
"db_not_found": "Arquivo do banco de dados não encontrado em: {path}",
|
||||
"db_permission_error": "Não é possível acessar o arquivo do banco de dados. Verifique as permissões",
|
||||
"db_connection_error": "Falha ao conectar ao banco de dados: {error}"
|
||||
},
|
||||
"control": {
|
||||
"generate_email": "Gerando novo e-mail",
|
||||
"blocked_domain": "Domínio bloqueado",
|
||||
"select_domain": "Selecionando domínio aleatório",
|
||||
"copy_email": "Copiando endereço de e-mail",
|
||||
"enter_mailbox": "Entrando na caixa de entrada",
|
||||
"refresh_mailbox": "Atualizando caixa de entrada",
|
||||
"check_verification": "Verificando código de verificação",
|
||||
"verification_found": "Código de verificação encontrado",
|
||||
"verification_not_found": "Nenhum código de verificação encontrado",
|
||||
"browser_error": "Erro no controle do navegador: {error}",
|
||||
"navigation_error": "Erro de navegação: {error}",
|
||||
"email_copy_error": "Erro ao copiar e-mail: {error}",
|
||||
"mailbox_error": "Erro na caixa de entrada: {error}",
|
||||
"token_saved_to_file": "Token salvo em cursor_tokens.txt",
|
||||
"navigate_to": "Navegando para {url}",
|
||||
"generate_email_success": "E-mail gerado com sucesso",
|
||||
"select_email_domain": "Selecionar domínio de e-mail",
|
||||
"select_email_domain_success": "Domínio de e-mail selecionado com sucesso",
|
||||
"get_email_name": "Obtendo nome do e-mail",
|
||||
"get_email_name_success": "Nome do e-mail obtido com sucesso",
|
||||
"get_email_address": "Obtendo endereço de e-mail",
|
||||
"get_email_address_success": "Endereço de e-mail obtido com sucesso",
|
||||
"enter_mailbox_success": "Entrada na caixa de entrada bem-sucedida",
|
||||
"found_verification_code": "Código de verificação encontrado",
|
||||
"get_cursor_session_token": "Obtendo token da sessão do Cursor",
|
||||
"get_cursor_session_token_success": "Token da sessão do Cursor obtido com sucesso",
|
||||
"get_cursor_session_token_failed": "Falha ao obter token da sessão do Cursor",
|
||||
"save_token_failed": "Falha ao salvar o token",
|
||||
"database_updated_successfully": "Banco de dados atualizado com sucesso",
|
||||
"database_connection_closed": "Conexão com o banco de dados fechada",
|
||||
"no_valid_verification_code": "Nenhum código de verificação válido"
|
||||
},
|
||||
"email": {
|
||||
"starting_browser": "Iniciando navegador",
|
||||
"visiting_site": "Visitando domínios de e-mail",
|
||||
"create_success": "E-mail criado com sucesso",
|
||||
"create_failed": "Falha ao criar e-mail",
|
||||
"create_error": "Erro ao criar e-mail: {error}",
|
||||
"refreshing": "Atualizando e-mail",
|
||||
"refresh_success": "E-mail atualizado com sucesso",
|
||||
"refresh_error": "Erro ao atualizar e-mail: {error}",
|
||||
"refresh_button_not_found": "Botão de atualização não encontrado",
|
||||
"verification_found": "Verificação encontrada",
|
||||
"verification_not_found": "Verificação não encontrada",
|
||||
"verification_error": "Erro na verificação: {error}",
|
||||
"verification_code_found": "Código de verificação encontrado",
|
||||
"verification_code_not_found": "Código de verificação não encontrado",
|
||||
"verification_code_error": "Erro no código de verificação: {error}",
|
||||
"address": "Endereço de e-mail",
|
||||
"all_domains_blocked": "Todos os domínios bloqueados, alternando serviço",
|
||||
"no_available_domains_after_filtering": "Nenhum domínio disponível após filtragem",
|
||||
"switching_service": "Alternando para o serviço {service}",
|
||||
"domains_list_error": "Falha ao obter lista de domínios: {error}",
|
||||
"failed_to_get_available_domains": "Falha ao obter domínios disponíveis",
|
||||
"domains_excluded": "Domínios excluídos: {domains}",
|
||||
"failed_to_create_account": "Falha ao criar conta",
|
||||
"account_creation_error": "Erro na criação da conta: {error}",
|
||||
"blocked_domains": "Domínios bloqueados: {domains}",
|
||||
"blocked_domains_loaded": "Domínios bloqueados carregados: {count}",
|
||||
"blocked_domains_loaded_error": "Erro ao carregar domínios bloqueados: {error}",
|
||||
"blocked_domains_loaded_success": "Domínios bloqueados carregados com sucesso",
|
||||
"blocked_domains_loaded_timeout": "Tempo esgotado ao carregar domínios bloqueados: {timeout}s",
|
||||
"blocked_domains_loaded_timeout_error": "Erro de tempo esgotado ao carregar domínios bloqueados: {error}",
|
||||
"available_domains_loaded": "Domínios disponíveis carregados: {count}",
|
||||
"domains_filtered": "Domínios filtrados: {count}",
|
||||
"trying_to_create_email": "Tentando criar e-mail: {email}",
|
||||
"domain_blocked": "Domínio bloqueado: {domain}"
|
||||
},
|
||||
"update": {
|
||||
"title": "Desativar atualização automática do Cursor",
|
||||
"disable_success": "Atualização automática desativada com sucesso",
|
||||
"disable_failed": "Falha ao desativar atualização automática: {error}",
|
||||
"press_enter": "Pressione Enter para sair",
|
||||
"start_disable": "Iniciando desativação da atualização automática",
|
||||
"killing_processes": "Finalizando processos",
|
||||
"processes_killed": "Processos finalizados",
|
||||
"removing_directory": "Removendo diretório",
|
||||
"directory_removed": "Diretório removido",
|
||||
"creating_block_file": "Criando arquivo de bloqueio",
|
||||
"block_file_created": "Arquivo de bloqueio criado"
|
||||
},
|
||||
"updater": {
|
||||
"checking": "Verificando atualizações...",
|
||||
"new_version_available": "Nova versão disponível! (Atual: {current}, Última: {latest})",
|
||||
"updating": "Atualizando para a última versão. O programa será reiniciado automaticamente.",
|
||||
"up_to_date": "Você está usando a versão mais recente.",
|
||||
"check_failed": "Falha ao verificar atualizações: {error}",
|
||||
"continue_anyway": "Continuando com a versão atual...",
|
||||
"update_confirm": "Deseja atualizar para a última versão? (Y/n)",
|
||||
"update_skipped": "Atualização ignorada.",
|
||||
"invalid_choice": "Escolha inválida. Por favor, digite 'Y' ou 'n'.",
|
||||
"development_version": "Versão de desenvolvimento {current} > {latest}",
|
||||
"changelog_title": "Registro de mudanças"
|
||||
},
|
||||
"totally_reset": {
|
||||
"title": "Redefinir Cursor Completamente",
|
||||
"checking_config": "Verificando Arquivo de Configuração",
|
||||
"config_not_found": "Arquivo de Configuração Não Encontrado",
|
||||
"no_permission": "Não é possível Ler ou Escrever o Arquivo de Configuração, Verifique as Permissões do Arquivo",
|
||||
"reading_config": "Lendo Configuração Atual",
|
||||
"creating_backup": "Criando Backup da Configuração",
|
||||
"backup_exists": "Arquivo de Backup Já Existe, Pulando Etapa de Backup",
|
||||
"generating_new_machine_id": "Gerando Novo ID da Máquina",
|
||||
"saving_new_config": "Salvando Nova Configuração no JSON",
|
||||
"success": "Cursor Redefinido com Sucesso",
|
||||
"error": "Falha ao Redefinir Cursor: {error}",
|
||||
"press_enter": "Pressione Enter para Sair",
|
||||
"reset_machine_id": "Redefinir ID da Máquina",
|
||||
"database_connection_closed": "Conexão com o Banco de Dados Fechada",
|
||||
"database_updated_successfully": "Banco de Dados Atualizado com Sucesso",
|
||||
"connected_to_database": "Conectado ao Banco de Dados",
|
||||
"updating_pair": "Atualizando Par Chave-Valor",
|
||||
"db_not_found": "Arquivo de banco de dados não encontrado em: {path}",
|
||||
"db_permission_error": "Não é possível acessar o arquivo do banco de dados. Verifique as permissões",
|
||||
"db_connection_error": "Falha ao conectar ao banco de dados: {error}",
|
||||
"feature_title": "RECURSOS",
|
||||
"feature_1": "Remoção completa das configurações e preferências do Cursor AI",
|
||||
"feature_2": "Limpa todos os dados em cache, incluindo histórico e prompts de IA",
|
||||
"feature_3": "Redefine o ID da máquina para contornar a detecção de período de teste",
|
||||
"feature_4": "Cria novos identificadores de máquina aleatórios",
|
||||
"feature_5": "Remove extensões e preferências personalizadas",
|
||||
"feature_6": "Redefine informações de período de teste e dados de ativação",
|
||||
"feature_7": "Varredura profunda por arquivos ocultos relacionados à licença e período de teste",
|
||||
"feature_8": "Preserva com segurança arquivos e aplicativos não relacionados ao Cursor",
|
||||
"feature_9": "Compatível com Windows, macOS e Linux",
|
||||
"disclaimer_title": "AVISO",
|
||||
"disclaimer_1": "Esta ferramenta excluirá permanentemente todas as configurações,",
|
||||
"disclaimer_2": "preferências e dados em cache do Cursor AI. Essa ação não pode ser desfeita.",
|
||||
"disclaimer_3": "Seus arquivos de código NÃO serão afetados, e a ferramenta é projetada",
|
||||
"disclaimer_4": "para atingir somente os arquivos do editor Cursor AI e mecanismos de detecção de teste.",
|
||||
"disclaimer_5": "Outros aplicativos em seu sistema não serão afetados.",
|
||||
"disclaimer_6": "Será necessário configurar o Cursor AI novamente após executar esta ferramenta.",
|
||||
"disclaimer_7": "Use por sua conta e risco",
|
||||
"confirm_title": "Tem certeza que deseja prosseguir?",
|
||||
"confirm_1": "Esta ação excluirá todas as configurações do Cursor AI,",
|
||||
"confirm_2": "preferências e dados em cache. Essa ação não pode ser desfeita.",
|
||||
"confirm_3": "Seus arquivos de código NÃO serão afetados, e a ferramenta é projetada",
|
||||
"confirm_4": "para atingir somente os arquivos do editor Cursor AI e mecanismos de detecção de teste.",
|
||||
"confirm_5": "Outros aplicativos em seu sistema não serão afetados.",
|
||||
"confirm_6": "Será necessário configurar o Cursor AI novamente após executar esta ferramenta.",
|
||||
"confirm_7": "Use por sua conta e risco",
|
||||
"invalid_choice": "Por favor, digite 'Y' ou 'n'",
|
||||
"skipped_for_safety": "Ignorado por segurança (não relacionado ao Cursor): {path}",
|
||||
"deleted": "Excluído: {path}",
|
||||
"error_deleting": "Erro ao excluir {path}: {error}",
|
||||
"not_found": "Arquivo não encontrado: {path}",
|
||||
"resetting_machine_id": "Redefinindo identificadores da máquina para contornar a detecção de período de teste...",
|
||||
"created_machine_id": "Novo ID da máquina criado: {path}",
|
||||
"error_creating_machine_id": "Erro ao criar arquivo de ID da máquina {path}: {error}",
|
||||
"error_searching": "Erro ao procurar arquivos em {path}: {error}",
|
||||
"created_extended_trial_info": "Novas informações de período de teste criadas: {path}",
|
||||
"error_creating_trial_info": "Erro ao criar arquivo de informações de teste {path}: {error}",
|
||||
"resetting_cursor_ai_editor": "Redefinindo Editor Cursor AI... Por favor, aguarde.",
|
||||
"reset_cancelled": "Redefinição cancelada. Saindo sem realizar alterações.",
|
||||
"windows_machine_id_modification_skipped": "Modificação de ID da máquina no Windows ignorada: {error}",
|
||||
"linux_machine_id_modification_skipped": "Modificação do machine-id do Linux ignorada: {error}",
|
||||
"note_complete_machine_id_reset_may_require_running_as_administrator": "Nota: Redefinir totalmente o ID da máquina pode exigir a execução como administrador",
|
||||
"note_complete_system_machine_id_reset_may_require_sudo_privileges": "Nota: Redefinir totalmente o machine-id do sistema pode exigir privilégios sudo",
|
||||
"windows_registry_instructions": "📝 NOTA: Para uma redefinição completa no Windows, talvez você precise também limpar entradas do registro.",
|
||||
"windows_registry_instructions_2": " Execute 'regedit', pesquise chaves contendo 'Cursor' ou 'CursorAI' em HKEY_CURRENT_USER\\Software\\ e exclua-as.\n",
|
||||
"reset_log_1": "Cursor AI foi completamente redefinido e a detecção de teste foi contornada!",
|
||||
"reset_log_2": "Por favor, reinicie o sistema para que as alterações tenham efeito.",
|
||||
"reset_log_3": "Você precisará reinstalar o Cursor AI e deverá ter um novo período de teste disponível.",
|
||||
"reset_log_4": "Para melhores resultados, considere também:",
|
||||
"reset_log_5": "Utilizar um endereço de e-mail diferente ao registrar um novo período de teste",
|
||||
"reset_log_6": "Se disponível, utilizar uma VPN para alterar seu endereço IP",
|
||||
"reset_log_7": "Limpar cookies e cache do navegador antes de acessar o site do Cursor AI",
|
||||
"reset_log_8": "Se os problemas persistirem, tente instalar o Cursor AI em outro local",
|
||||
"reset_log_9": "Se encontrar problemas, abra uma issue no Github em https://github.com/yeongpin/cursor-free-vip/issues",
|
||||
"unexpected_error": "Ocorreu um erro inesperado: {error}",
|
||||
"report_issue": "Por favor, relate este problema no Github em https://github.com/yeongpin/cursor-free-vip/issues",
|
||||
"keyboard_interrupt": "Processo interrompido pelo usuário. Saindo...",
|
||||
"return_to_main_menu": "Retornando ao menu principal...",
|
||||
"process_interrupted": "Processo interrompido. Saindo...",
|
||||
"press_enter_to_return_to_main_menu": "Pressione Enter para retornar ao menu principal...",
|
||||
"removing_known": "Removendo arquivos conhecidos de teste/licença",
|
||||
"performing_deep_scan": "Realizando varredura profunda por arquivos adicionais de teste/licença",
|
||||
"found_additional_potential_license_trial_files": "{count} arquivos adicionais de licença/teste potencialmente encontrados",
|
||||
"checking_for_electron_localstorage_files": "Verificando arquivos localStorage do Electron",
|
||||
"no_additional_license_trial_files_found_in_deep_scan": "Nenhum arquivo adicional de licença/teste encontrado na varredura profunda",
|
||||
"removing_electron_localstorage_files": "Removendo arquivos localStorage do Electron",
|
||||
"electron_localstorage_files_removed": "Arquivos localStorage do Electron removidos",
|
||||
"electron_localstorage_files_removal_error": "Erro ao remover arquivos localStorage do Electron: {error}",
|
||||
"removing_electron_localstorage_files_completed": "Remoção dos arquivos localStorage do Electron concluída"
|
||||
}
|
||||
}
|
||||
@@ -23,7 +23,8 @@
|
||||
"vi": "Tiếng Việt",
|
||||
"nl": "Dutch",
|
||||
"de": "Germa",
|
||||
"fr": "French"
|
||||
"fr": "French",
|
||||
"pt": "Brazilian Portuguese"
|
||||
},
|
||||
"quit_cursor": {
|
||||
"start": "Bắt Đầu Thoát Cursor",
|
||||
@@ -226,7 +227,7 @@
|
||||
},
|
||||
"email": {
|
||||
"starting_browser": "Đang Khởi Động Trình Duyệt",
|
||||
"visiting_site": "Đang Truy Cập mail.tm",
|
||||
"visiting_site": "Đang Truy Cập mail domains",
|
||||
"create_success": "Tạo Email Thành Công",
|
||||
"create_failed": "Tạo Email Thất Bại",
|
||||
"create_error": "Lỗi Tạo Email: {error}",
|
||||
@@ -257,7 +258,8 @@
|
||||
"blocked_domains_loaded_timeout_error": "Lỗi Hết Thời Gian Tải Tên Miền Bị Chặn: {error}",
|
||||
"available_domains_loaded": "Đã Tải Tên Miền Khả Dụng: {count}",
|
||||
"domains_filtered": "Tên Miền Đã Lọc: {count}",
|
||||
"trying_to_create_email": "Đang cố gắng tạo email: {email}"
|
||||
"trying_to_create_email": "Đang cố gắng tạo email: {email}",
|
||||
"domain_blocked": "Tên Miền Bị Chặn: {domain}"
|
||||
},
|
||||
"update": {
|
||||
"title": "Tắt Tự Động Cập Nhật Cursor",
|
||||
@@ -282,7 +284,8 @@
|
||||
"update_confirm": "Bạn Có Muốn Cập Nhật Lên Phiên Bản Mới Nhất Không? (Y/n)",
|
||||
"update_skipped": "Bỏ Qua Cập Nhật.",
|
||||
"invalid_choice": "Lựa Chọn Không Hợp Lệ. Vui Lòng Nhập 'Y' Hoặc 'n'.",
|
||||
"development_version": "Phiên Bản Phát Triển {current} > {latest}"
|
||||
"development_version": "Phiên Bản Phát Triển {current} > {latest}",
|
||||
"changelog_title": "Changelog"
|
||||
},
|
||||
"totally_reset": {
|
||||
"title": "Đặt lại hoàn toàn Cursor",
|
||||
|
||||
@@ -25,7 +25,8 @@
|
||||
"vi": "Vietnamese",
|
||||
"nl": "Dutch",
|
||||
"de": "German",
|
||||
"fr": "French"
|
||||
"fr": "French",
|
||||
"pt": "Brazilian Portuguese"
|
||||
},
|
||||
"quit_cursor": {
|
||||
"start": "开始退出 Cursor",
|
||||
@@ -224,7 +225,7 @@
|
||||
},
|
||||
"email": {
|
||||
"starting_browser": "启动浏览器",
|
||||
"visiting_site": "访问 mail.tm",
|
||||
"visiting_site": "访问 邮箱服务网站",
|
||||
"create_success": "邮箱创建成功",
|
||||
"create_failed": "邮箱创建失败",
|
||||
"create_error": "邮箱创建错误: {error}",
|
||||
@@ -255,7 +256,8 @@
|
||||
"blocked_domains_loaded_timeout_error": "加载被屏蔽的域名超时错误: {error}",
|
||||
"available_domains_loaded": "获取到 {count} 个可用域名",
|
||||
"domains_filtered": "过滤后剩餘 {count} 個可用域名",
|
||||
"trying_to_create_email": "尝试创建邮箱: {email}"
|
||||
"trying_to_create_email": "尝试创建邮箱: {email}",
|
||||
"domain_blocked": "域名被屏蔽: {domain}"
|
||||
},
|
||||
"update": {
|
||||
"title": "禁用 Cursor 自动更新",
|
||||
@@ -280,7 +282,8 @@
|
||||
"update_confirm": "是否要更新到最新版本? (Y/n)",
|
||||
"update_skipped": "跳过更新。",
|
||||
"invalid_choice": "选择无效。请输入 'Y' 或 'n'.",
|
||||
"development_version": "开发版本 {current} > {latest}"
|
||||
"development_version": "开发版本 {current} > {latest}",
|
||||
"changelog_title": "更新日志"
|
||||
},
|
||||
"totally_reset": {
|
||||
"title": "完全重置 Cursor",
|
||||
|
||||
@@ -23,7 +23,8 @@
|
||||
"vi": "Vietnamese",
|
||||
"nl": "Dutch",
|
||||
"de": "German",
|
||||
"fr": "French"
|
||||
"fr": "French",
|
||||
"pt": "Brazilian Portuguese"
|
||||
},
|
||||
"quit_cursor": {
|
||||
"start": "開始退出 Cursor",
|
||||
@@ -204,7 +205,7 @@
|
||||
},
|
||||
"email": {
|
||||
"starting_browser": "啟動瀏覽器",
|
||||
"visiting_site": "訪問 mail.tm",
|
||||
"visiting_site": "訪問 郵箱網站",
|
||||
"create_success": "郵箱創建成功",
|
||||
"create_failed": "郵箱創建失敗",
|
||||
"create_error": "郵箱創建錯誤: {error}",
|
||||
@@ -260,7 +261,8 @@
|
||||
"update_confirm": "是否要更新到最新版本? (Y/n)",
|
||||
"update_skipped": "跳過更新。",
|
||||
"invalid_choice": "選擇無效。請輸入 'Y' 或 'n'.",
|
||||
"development_version": "開發版本 {current} > {latest}"
|
||||
"development_version": "開發版本 {current} > {latest}",
|
||||
"changelog_title": "更新日志"
|
||||
},
|
||||
"totally_reset": {
|
||||
"title": "完全重置 Cursor",
|
||||
|
||||
2
logo.py
2
logo.py
@@ -30,7 +30,7 @@ CURSOR_LOGO = f"""
|
||||
|
||||
Github: https://github.com/yeongpin/cursor-free-vip
|
||||
{Fore.RED}
|
||||
Press 5 to change language | 按下 5 键切换语言
|
||||
Press 7 to change language | 按下 7 键切换语言 | Pressione 7 para alterar o idioma
|
||||
{Style.RESET_ALL}
|
||||
"""
|
||||
|
||||
|
||||
41
main.py
41
main.py
@@ -139,6 +139,8 @@ class Translator:
|
||||
return 'de'
|
||||
elif system_locale.startswith('fr'):
|
||||
return 'fr'
|
||||
elif system_locale.startswith('pt'):
|
||||
return 'pt'
|
||||
|
||||
|
||||
|
||||
@@ -156,6 +158,8 @@ class Translator:
|
||||
return 'de'
|
||||
elif 'fr' in env_lang:
|
||||
return 'fr'
|
||||
elif 'pt' in env_lang:
|
||||
return 'pt'
|
||||
|
||||
return 'en'
|
||||
except:
|
||||
@@ -317,6 +321,43 @@ def check_latest_version():
|
||||
if is_newer_version_available:
|
||||
print(f"\n{Fore.YELLOW}{EMOJI['INFO']} {translator.get('updater.new_version_available', current=version, latest=latest_version)}{Style.RESET_ALL}")
|
||||
|
||||
# get and show changelog
|
||||
try:
|
||||
changelog_url = "https://raw.githubusercontent.com/yeongpin/cursor-free-vip/main/CHANGELOG.md"
|
||||
changelog_response = requests.get(changelog_url, timeout=10)
|
||||
|
||||
if changelog_response.status_code == 200:
|
||||
changelog_content = changelog_response.text
|
||||
|
||||
# get latest version changelog
|
||||
latest_version_pattern = f"## v{latest_version}"
|
||||
changelog_sections = changelog_content.split("## v")
|
||||
|
||||
latest_changes = None
|
||||
for section in changelog_sections:
|
||||
if section.startswith(latest_version):
|
||||
latest_changes = section
|
||||
break
|
||||
|
||||
if latest_changes:
|
||||
print(f"\n{Fore.CYAN}{'─' * 40}{Style.RESET_ALL}")
|
||||
print(f"{Fore.CYAN}{translator.get('updater.changelog_title')}:{Style.RESET_ALL}")
|
||||
|
||||
# show changelog content (max 10 lines)
|
||||
changes_lines = latest_changes.strip().split('\n')
|
||||
for i, line in enumerate(changes_lines[1:11]): # skip version number line, max 10 lines
|
||||
if line.strip():
|
||||
print(f"{Fore.WHITE}{line.strip()}{Style.RESET_ALL}")
|
||||
|
||||
# if changelog more than 10 lines, show ellipsis
|
||||
if len(changes_lines) > 11:
|
||||
print(f"{Fore.WHITE}...{Style.RESET_ALL}")
|
||||
|
||||
print(f"{Fore.CYAN}{'─' * 40}{Style.RESET_ALL}")
|
||||
except Exception as changelog_error:
|
||||
# get changelog failed
|
||||
pass
|
||||
|
||||
# Ask user if they want to update
|
||||
while True:
|
||||
choice = input(f"\n{EMOJI['ARROW']} {Fore.CYAN}{translator.get('updater.update_confirm', choices='Y/n')}: {Style.RESET_ALL}").lower()
|
||||
|
||||
414
new_tempemail.py
414
new_tempemail.py
@@ -14,17 +14,8 @@ init()
|
||||
class NewTempEmail:
|
||||
def __init__(self, translator=None):
|
||||
self.translator = translator
|
||||
# Randomly choose between mail.tm and mail.gw
|
||||
self.services = [
|
||||
{"name": "mail.tm", "api_url": "https://api.mail.tm"},
|
||||
{"name": "mail.gw", "api_url": "https://api.mail.gw"}
|
||||
]
|
||||
self.selected_service = random.choice(self.services)
|
||||
self.api_url = self.selected_service["api_url"]
|
||||
self.token = None
|
||||
self.email = None
|
||||
self.password = None
|
||||
self.blocked_domains = self.get_blocked_domains()
|
||||
self.page = None
|
||||
self.setup_browser()
|
||||
|
||||
def get_blocked_domains(self):
|
||||
"""Get blocked domains list"""
|
||||
@@ -91,184 +82,132 @@ class NewTempEmail:
|
||||
|
||||
return filtered_domains
|
||||
|
||||
def _generate_credentials(self):
|
||||
"""generate random username and password"""
|
||||
username = ''.join(random.choices(string.ascii_lowercase + string.digits, k=10))
|
||||
password = ''.join(random.choices(string.ascii_letters + string.digits + string.punctuation, k=12))
|
||||
return username, password
|
||||
|
||||
def create_email(self):
|
||||
"""create temporary email"""
|
||||
max_retries = 3 # Maximum number of retries
|
||||
attempt = 0 # Current attempt count
|
||||
def get_extension_block(self):
|
||||
"""获取插件路径"""
|
||||
root_dir = os.getcwd()
|
||||
extension_path = os.path.join(root_dir, "PBlock")
|
||||
|
||||
while attempt < max_retries:
|
||||
attempt += 1
|
||||
if hasattr(sys, "_MEIPASS"):
|
||||
extension_path = os.path.join(sys._MEIPASS, "PBlock")
|
||||
|
||||
if not os.path.exists(extension_path):
|
||||
raise FileNotFoundError(f"插件不存在: {extension_path}")
|
||||
|
||||
return extension_path
|
||||
|
||||
def setup_browser(self):
|
||||
"""设置浏览器"""
|
||||
try:
|
||||
if self.translator:
|
||||
print(f"{Fore.CYAN}ℹ️ {self.translator.get('email.starting_browser')}{Style.RESET_ALL}")
|
||||
else:
|
||||
print(f"{Fore.CYAN}ℹ️ 正在启动浏览器...{Style.RESET_ALL}")
|
||||
|
||||
# 创建浏览器选项
|
||||
co = ChromiumOptions()
|
||||
co.set_argument("--headless=new")
|
||||
|
||||
co.auto_port() # 自动设置端口
|
||||
|
||||
# 加载 uBlock 插件
|
||||
try:
|
||||
if self.translator:
|
||||
print(f"{Fore.CYAN}ℹ️ {self.translator.get('email.visiting_site').replace('mail.tm', self.selected_service['name'])}{Style.RESET_ALL}")
|
||||
else:
|
||||
print(f"{Fore.CYAN}ℹ️ 正在访问 {self.selected_service['name']}...{Style.RESET_ALL}")
|
||||
|
||||
# Get available domain list
|
||||
try:
|
||||
domains_response = requests.get(f"{self.api_url}/domains", timeout=10)
|
||||
if domains_response.status_code != 200:
|
||||
print(f"{Fore.RED}❌ {self.translator.get('email.domains_list_error', error=domains_response.status_code)}{Style.RESET_ALL}")
|
||||
print(f"{Fore.RED}❌ {self.translator.get('email.domains_list_error', error=domains_response.text)}{Style.RESET_ALL}")
|
||||
raise Exception(f"{self.translator.get('email.failed_to_get_available_domains') if self.translator else 'Failed to get available domains'}")
|
||||
|
||||
domains = domains_response.json()["hydra:member"]
|
||||
print(f"{Fore.CYAN}ℹ️ {self.translator.get('email.available_domains_loaded', count=len(domains))}{Style.RESET_ALL}")
|
||||
|
||||
if not domains:
|
||||
raise Exception(f"{self.translator.get('email.no_available_domains') if self.translator else '没有可用域名'}")
|
||||
except Exception as e:
|
||||
print(f"{Fore.RED}❌ 获取域名列表时出错: {str(e)}{Style.RESET_ALL}")
|
||||
raise
|
||||
|
||||
# Exclude blocked domains
|
||||
try:
|
||||
filtered_domains = self.exclude_blocked_domains(domains)
|
||||
if self.translator:
|
||||
print(f"{Fore.CYAN}ℹ️ {self.translator.get('email.domains_filtered', count=len(filtered_domains))}{Style.RESET_ALL}")
|
||||
else:
|
||||
print(f"{Fore.CYAN}ℹ️ 过滤后剩余 {len(filtered_domains)} 个可用域名{Style.RESET_ALL}")
|
||||
|
||||
if not filtered_domains:
|
||||
if self.translator:
|
||||
print(f"{Fore.RED}❌ {self.translator.get('email.all_domains_blocked')}{Style.RESET_ALL}")
|
||||
else:
|
||||
print(f"{Fore.RED}❌ 所有域名都被屏蔽了,尝试切换服务{Style.RESET_ALL}")
|
||||
|
||||
# Switch to another service
|
||||
for service in self.services:
|
||||
if service["api_url"] != self.api_url:
|
||||
self.selected_service = service
|
||||
self.api_url = service["api_url"]
|
||||
if self.translator:
|
||||
print(f"{Fore.CYAN}ℹ️ {self.translator.get('email.switching_service', service=service['name'])}{Style.RESET_ALL}")
|
||||
else:
|
||||
print(f"{Fore.CYAN}ℹ️ 切换到 {service['name']} 服务{Style.RESET_ALL}")
|
||||
return self.create_email() # Recursively call
|
||||
|
||||
raise Exception(f"{self.translator.get('email.no_available_domains_after_filtering') if self.translator else '过滤后没有可用域名'}")
|
||||
except Exception as e:
|
||||
print(f"{Fore.RED}❌ 过滤域名时出错: {str(e)}{Style.RESET_ALL}")
|
||||
raise
|
||||
|
||||
# Generate random username and password
|
||||
try:
|
||||
username, password = self._generate_credentials()
|
||||
self.password = password
|
||||
|
||||
# Create email account
|
||||
selected_domain = filtered_domains[0]['domain']
|
||||
email = f"{username}@{selected_domain}"
|
||||
|
||||
if self.translator:
|
||||
print(f"{Fore.CYAN}ℹ️ {self.translator.get('email.trying_to_create_email', email=email)}{Style.RESET_ALL}")
|
||||
else:
|
||||
print(f"{Fore.CYAN}ℹ️ 尝试创建邮箱: {email}{Style.RESET_ALL}")
|
||||
|
||||
account_data = {
|
||||
"address": email,
|
||||
"password": password
|
||||
}
|
||||
except Exception as e:
|
||||
print(f"{Fore.RED}❌ 生成凭据时出错: {str(e)}{Style.RESET_ALL}")
|
||||
raise
|
||||
|
||||
# Create account
|
||||
try:
|
||||
create_response = requests.post(f"{self.api_url}/accounts", json=account_data, timeout=15)
|
||||
|
||||
if create_response.status_code != 201:
|
||||
if self.translator:
|
||||
print(f"{Fore.RED}❌ {self.translator.get('email.failed_to_create_account', error=create_response.status_code)}{Style.RESET_ALL}")
|
||||
else:
|
||||
print(f"{Fore.RED}❌ 创建账户失败: 状态码 {create_response.status_code}{Style.RESET_ALL}")
|
||||
if self.translator:
|
||||
print(f"{Fore.RED}❌ {self.translator.get('email.failed_to_create_account', error=create_response.text)}{Style.RESET_ALL}")
|
||||
else:
|
||||
print(f"{Fore.RED}❌ 响应内容: {create_response.text}{Style.RESET_ALL}")
|
||||
|
||||
# If it's a domain problem, try the next available domain
|
||||
if len(filtered_domains) > 1 and ("domain" in create_response.text.lower() or "address" in create_response.text.lower()):
|
||||
print(f"{Fore.YELLOW}⚠️ 尝试使用下一个可用域名...{Style.RESET_ALL}")
|
||||
# Add current domain to blocked list
|
||||
if selected_domain not in self.blocked_domains:
|
||||
self.blocked_domains.append(selected_domain)
|
||||
# Recursively call yourself
|
||||
return self.create_email()
|
||||
|
||||
raise Exception(f"{self.translator.get('email.failed_to_create_account') if self.translator else '创建账户失败'}")
|
||||
except Exception as e:
|
||||
if self.translator:
|
||||
print(f"{Fore.RED}❌ {self.translator.get('email.failed_to_create_account', error=str(e))}{Style.RESET_ALL}")
|
||||
else:
|
||||
print(f"{Fore.RED}❌ 创建账户时出错: {str(e)}{Style.RESET_ALL}")
|
||||
raise
|
||||
|
||||
# Get access token
|
||||
try:
|
||||
token_data = {
|
||||
"address": email,
|
||||
"password": password
|
||||
}
|
||||
|
||||
token_response = requests.post(f"{self.api_url}/token", json=token_data, timeout=10)
|
||||
if token_response.status_code != 200:
|
||||
if self.translator:
|
||||
print(f"{Fore.RED}❌ {self.translator.get('email.failed_to_get_access_token', error=token_response.status_code)}{Style.RESET_ALL}")
|
||||
else:
|
||||
print(f"{Fore.RED}❌ 获取令牌失败: 状态码 {token_response.status_code}{Style.RESET_ALL}")
|
||||
if self.translator:
|
||||
print(f"{Fore.RED}❌ {self.translator.get('email.failed_to_get_access_token', error=token_response.text)}{Style.RESET_ALL}")
|
||||
else:
|
||||
print(f"{Fore.RED}❌ 响应内容: {token_response.text}{Style.RESET_ALL}")
|
||||
raise Exception(f"{self.translator.get('email.failed_to_get_access_token') if self.translator else '获取访问令牌失败'}")
|
||||
|
||||
self.token = token_response.json()["token"]
|
||||
self.email = email
|
||||
except Exception as e:
|
||||
print(f"{Fore.RED}❌ 获取令牌时出错: {str(e)}{Style.RESET_ALL}")
|
||||
raise
|
||||
|
||||
if self.translator:
|
||||
print(f"{Fore.GREEN}✅ {self.translator.get('email.create_success')}: {email}{Style.RESET_ALL}")
|
||||
else:
|
||||
print(f"{Fore.GREEN}✅ 创建邮箱成功: {email}{Style.RESET_ALL}")
|
||||
return email
|
||||
|
||||
extension_path = self.get_extension_block()
|
||||
co.set_argument("--allow-extensions-in-incognito")
|
||||
co.add_extension(extension_path)
|
||||
except Exception as e:
|
||||
if attempt < max_retries:
|
||||
print(f"{Fore.YELLOW}⚠️ 尝试重新创建邮箱... (尝试 {attempt}/{max_retries}){Style.RESET_ALL}")
|
||||
if self.translator:
|
||||
print(f"{Fore.YELLOW}⚠️ {self.translator.get('email.extension_load_error')}: {str(e)}{Style.RESET_ALL}")
|
||||
else:
|
||||
if self.translator:
|
||||
print(f"{Fore.RED}❌ {self.translator.get('email.create_error')}: {str(e)}{Style.RESET_ALL}")
|
||||
else:
|
||||
print(f"{Fore.RED}❌ 创建邮箱出错: {str(e)}{Style.RESET_ALL}")
|
||||
return None
|
||||
|
||||
print(f"{Fore.YELLOW}⚠️ 加载插件失败: {str(e)}{Style.RESET_ALL}")
|
||||
|
||||
self.page = ChromiumPage(co)
|
||||
return True
|
||||
except Exception as e:
|
||||
if self.translator:
|
||||
print(f"{Fore.RED}❌ {self.translator.get('email.browser_start_error')}: {str(e)}{Style.RESET_ALL}")
|
||||
else:
|
||||
print(f"{Fore.RED}❌ 启动浏览器失败: {str(e)}{Style.RESET_ALL}")
|
||||
return False
|
||||
|
||||
def create_email(self):
|
||||
"""创建临时邮箱"""
|
||||
try:
|
||||
if self.translator:
|
||||
print(f"{Fore.CYAN}ℹ️ {self.translator.get('email.visiting_site')}{Style.RESET_ALL}")
|
||||
else:
|
||||
print(f"{Fore.CYAN}ℹ️ 正在访问 smailpro.com...{Style.RESET_ALL}")
|
||||
|
||||
# 加载被屏蔽域名列表
|
||||
self.blocked_domains = self.get_blocked_domains()
|
||||
|
||||
# 访问网站
|
||||
self.page.get("https://smailpro.com/")
|
||||
time.sleep(2)
|
||||
|
||||
# 点击创建邮箱按钮
|
||||
create_button = self.page.ele('xpath://button[@title="Create temporary email"]')
|
||||
if create_button:
|
||||
create_button.click()
|
||||
time.sleep(1)
|
||||
|
||||
# 点击弹窗中的 Create 按钮
|
||||
modal_create_button = self.page.ele('xpath://button[contains(text(), "Create")]')
|
||||
if modal_create_button:
|
||||
modal_create_button.click()
|
||||
time.sleep(2)
|
||||
|
||||
# 获取邮箱地址 - 修改选择器
|
||||
email_div = self.page.ele('xpath://div[@class="text-base sm:text-lg md:text-xl text-gray-700"]')
|
||||
if email_div:
|
||||
email = email_div.text.strip()
|
||||
if '@' in email: # 验证是否是有效的邮箱地址
|
||||
# 检查域名是否被屏蔽
|
||||
domain = email.split('@')[1]
|
||||
if self.blocked_domains and domain in self.blocked_domains:
|
||||
if self.translator:
|
||||
print(f"{Fore.YELLOW}⚠️ {self.translator.get('email.domain_blocked')}: {domain}{Style.RESET_ALL}")
|
||||
else:
|
||||
print(f"{Fore.YELLOW}⚠️ 域名已被屏蔽: {domain},尝试重新创建邮箱{Style.RESET_ALL}")
|
||||
# 重新创建邮箱
|
||||
return self.create_email()
|
||||
|
||||
if self.translator:
|
||||
print(f"{Fore.GREEN}✅ {self.translator.get('email.create_success')}: {email}{Style.RESET_ALL}")
|
||||
else:
|
||||
print(f"{Fore.GREEN}✅ 创建邮箱成功: {email}{Style.RESET_ALL}")
|
||||
return email
|
||||
if self.translator:
|
||||
print(f"{Fore.RED}❌ {self.translator.get('email.create_failed')}{Style.RESET_ALL}")
|
||||
else:
|
||||
print(f"{Fore.RED}❌ 创建邮箱失败{Style.RESET_ALL}")
|
||||
return None
|
||||
|
||||
except Exception as e:
|
||||
if self.translator:
|
||||
print(f"{Fore.RED}❌ {self.translator.get('email.create_error')}: {str(e)}{Style.RESET_ALL}")
|
||||
else:
|
||||
print(f"{Fore.RED}❌ 创建邮箱出错: {str(e)}{Style.RESET_ALL}")
|
||||
return None
|
||||
|
||||
def close(self):
|
||||
"""close browser"""
|
||||
"""关闭浏览器"""
|
||||
if self.page:
|
||||
self.page.quit()
|
||||
|
||||
def refresh_inbox(self):
|
||||
"""refresh inbox"""
|
||||
"""刷新邮箱"""
|
||||
try:
|
||||
if self.translator:
|
||||
print(f"{Fore.CYAN}🔄 {self.translator.get('email.refreshing')}{Style.RESET_ALL}")
|
||||
else:
|
||||
print(f"{Fore.CYAN}🔄 正在刷新邮箱...{Style.RESET_ALL}")
|
||||
|
||||
# Use API to get latest email
|
||||
headers = {"Authorization": f"Bearer {self.token}"}
|
||||
response = requests.get(f"{self.api_url}/messages", headers=headers)
|
||||
|
||||
if response.status_code == 200:
|
||||
# 点击刷新按钮
|
||||
refresh_button = self.page.ele('xpath://button[@id="refresh"]')
|
||||
if refresh_button:
|
||||
refresh_button.click()
|
||||
time.sleep(2) # 等待刷新完成
|
||||
if self.translator:
|
||||
print(f"{Fore.GREEN}✅ {self.translator.get('email.refresh_success')}{Style.RESET_ALL}")
|
||||
else:
|
||||
@@ -276,9 +215,9 @@ class NewTempEmail:
|
||||
return True
|
||||
|
||||
if self.translator:
|
||||
print(f"{Fore.RED}❌ {self.translator.get('email.refresh_failed')}{Style.RESET_ALL}")
|
||||
print(f"{Fore.RED}❌ {self.translator.get('email.refresh_button_not_found')}{Style.RESET_ALL}")
|
||||
else:
|
||||
print(f"{Fore.RED}❌ 刷新邮箱失败{Style.RESET_ALL}")
|
||||
print(f"{Fore.RED}❌ 未找到刷新按钮{Style.RESET_ALL}")
|
||||
return False
|
||||
|
||||
except Exception as e:
|
||||
@@ -289,26 +228,19 @@ class NewTempEmail:
|
||||
return False
|
||||
|
||||
def check_for_cursor_email(self):
|
||||
"""Check if there is a Cursor verification email"""
|
||||
"""检查是否有 Cursor 的验证邮件"""
|
||||
try:
|
||||
# Use API to get email list
|
||||
headers = {"Authorization": f"Bearer {self.token}"}
|
||||
response = requests.get(f"{self.api_url}/messages", headers=headers)
|
||||
|
||||
if response.status_code == 200:
|
||||
messages = response.json()["hydra:member"]
|
||||
for message in messages:
|
||||
if message["from"]["address"] == "no-reply@cursor.sh" and "Verify your email address" in message["subject"]:
|
||||
# Get email content
|
||||
message_id = message["id"]
|
||||
message_response = requests.get(f"{self.api_url}/messages/{message_id}", headers=headers)
|
||||
if message_response.status_code == 200:
|
||||
if self.translator:
|
||||
print(f"{Fore.GREEN}✅ {self.translator.get('email.verification_found')}{Style.RESET_ALL}")
|
||||
else:
|
||||
print(f"{Fore.GREEN}✅ 找到验证邮件{Style.RESET_ALL}")
|
||||
return True
|
||||
|
||||
# 查找验证邮件 - 使用更精确的选择器
|
||||
email_div = self.page.ele('xpath://div[contains(@class, "p-2") and contains(@class, "cursor-pointer") and contains(@class, "bg-white") and contains(@class, "shadow") and .//b[text()="no-reply@cursor.sh"] and .//span[text()="Verify your email address"]]')
|
||||
if email_div:
|
||||
if self.translator:
|
||||
print(f"{Fore.GREEN}✅ {self.translator.get('email.verification_found')}{Style.RESET_ALL}")
|
||||
else:
|
||||
print(f"{Fore.GREEN}✅ 找到验证邮件{Style.RESET_ALL}")
|
||||
# 使用 JavaScript 点击元素
|
||||
self.page.run_js('arguments[0].click()', email_div)
|
||||
time.sleep(2) # 等待邮件内容加载
|
||||
return True
|
||||
if self.translator:
|
||||
print(f"{Fore.YELLOW}⚠️ {self.translator.get('email.verification_not_found')}{Style.RESET_ALL}")
|
||||
else:
|
||||
@@ -322,75 +254,31 @@ class NewTempEmail:
|
||||
print(f"{Fore.RED}❌ 检查验证邮件出错: {str(e)}{Style.RESET_ALL}")
|
||||
return False
|
||||
|
||||
def get_verification_code(self, max_retries=3):
|
||||
"""get verification code with retry mechanism"""
|
||||
for attempt in range(1, max_retries + 1):
|
||||
try:
|
||||
# Check if token is valid
|
||||
if not self.token:
|
||||
def get_verification_code(self):
|
||||
"""获取验证码"""
|
||||
try:
|
||||
# 查找验证码元素
|
||||
code_element = self.page.ele('xpath://td//div[contains(@style, "font-size:28px") and contains(@style, "letter-spacing:2px")]')
|
||||
if code_element:
|
||||
code = code_element.text.strip()
|
||||
if code.isdigit() and len(code) == 6:
|
||||
if self.translator:
|
||||
print(f"{Fore.YELLOW}⚠️ {self.translator.get('email.no_token_retry')}{Style.RESET_ALL}")
|
||||
print(f"{Fore.GREEN}✅ {self.translator.get('email.verification_code_found')}: {code}{Style.RESET_ALL}")
|
||||
else:
|
||||
print(f"{Fore.YELLOW}⚠️ 未获取到有效令牌,尝试重新创建邮箱... (尝试 {attempt}/{max_retries}){Style.RESET_ALL}")
|
||||
|
||||
# Try to recreate email
|
||||
self.create_email()
|
||||
if not self.token:
|
||||
continue # Skip to next attempt if still no token
|
||||
|
||||
# Use API to get email list
|
||||
headers = {"Authorization": f"Bearer {self.token}"}
|
||||
response = requests.get(f"{self.api_url}/messages", headers=headers)
|
||||
|
||||
if response.status_code == 200:
|
||||
messages = response.json()["hydra:member"]
|
||||
for message in messages:
|
||||
if message["from"]["address"] == "no-reply@cursor.sh" and "Verify your email address" in message["subject"]:
|
||||
# Get email content
|
||||
message_id = message["id"]
|
||||
message_response = requests.get(f"{self.api_url}/messages/{message_id}", headers=headers)
|
||||
|
||||
if message_response.status_code == 200:
|
||||
# Extract verification code from email content
|
||||
email_content = message_response.json()["text"]
|
||||
# Find 6-digit verification code
|
||||
import re
|
||||
code_match = re.search(r'\b\d{6}\b', email_content)
|
||||
|
||||
if code_match:
|
||||
code = code_match.group(0)
|
||||
if self.translator:
|
||||
print(f"{Fore.GREEN}✅ {self.translator.get('email.verification_code_found')}: {code}{Style.RESET_ALL}")
|
||||
else:
|
||||
print(f"{Fore.GREEN}✅ 获取验证码成功: {code}{Style.RESET_ALL}")
|
||||
return code
|
||||
|
||||
if attempt < max_retries:
|
||||
wait_time = 10 * attempt # Increase wait time with each attempt
|
||||
if self.translator:
|
||||
print(f"{Fore.YELLOW}⚠️ {self.translator.get('email.verification_code_retry', attempt=attempt, max=max_retries, wait=wait_time)}{Style.RESET_ALL}")
|
||||
else:
|
||||
print(f"{Fore.YELLOW}⚠️ 未找到有效的验证码,将在 {wait_time} 秒后重试... (尝试 {attempt}/{max_retries}){Style.RESET_ALL}")
|
||||
time.sleep(wait_time)
|
||||
else:
|
||||
if self.translator:
|
||||
print(f"{Fore.RED}❌ {self.translator.get('email.verification_code_not_found')}{Style.RESET_ALL}")
|
||||
else:
|
||||
print(f"{Fore.RED}❌ 未找到有效的验证码{Style.RESET_ALL}")
|
||||
except Exception as e:
|
||||
if attempt < max_retries:
|
||||
if self.translator:
|
||||
print(f"{Fore.YELLOW}⚠️ {self.translator.get('email.verification_code_error_retry', error=str(e), attempt=attempt, max=max_retries)}{Style.RESET_ALL}")
|
||||
else:
|
||||
print(f"{Fore.YELLOW}⚠️ 获取验证码出错: {str(e)},将重试... (尝试 {attempt}/{max_retries}){Style.RESET_ALL}")
|
||||
time.sleep(get_random_wait_time(self.config, 'page_load_wait'))
|
||||
else:
|
||||
if self.translator:
|
||||
print(f"{Fore.RED}❌ {self.translator.get('email.verification_code_error')}: {str(e)}{Style.RESET_ALL}")
|
||||
else:
|
||||
print(f"{Fore.RED}❌ 获取验证码出错: {str(e)}{Style.RESET_ALL}")
|
||||
|
||||
return None
|
||||
print(f"{Fore.GREEN}✅ 获取验证码成功: {code}{Style.RESET_ALL}")
|
||||
return code
|
||||
if self.translator:
|
||||
print(f"{Fore.YELLOW}⚠️ {self.translator.get('email.verification_code_not_found')}{Style.RESET_ALL}")
|
||||
else:
|
||||
print(f"{Fore.YELLOW}⚠️ 未找到有效的验证码{Style.RESET_ALL}")
|
||||
return None
|
||||
|
||||
except Exception as e:
|
||||
if self.translator:
|
||||
print(f"{Fore.RED}❌ {self.translator.get('email.verification_code_error')}: {str(e)}{Style.RESET_ALL}")
|
||||
else:
|
||||
print(f"{Fore.RED}❌ 获取验证码出错: {str(e)}{Style.RESET_ALL}")
|
||||
return None
|
||||
|
||||
def main(translator=None):
|
||||
temp_email = NewTempEmail(translator)
|
||||
@@ -403,7 +291,7 @@ def main(translator=None):
|
||||
else:
|
||||
print(f"\n{Fore.CYAN}📧 临时邮箱地址: {email}{Style.RESET_ALL}")
|
||||
|
||||
# Test refresh function
|
||||
# 测试刷新功能
|
||||
while True:
|
||||
if translator:
|
||||
choice = input(f"\n{translator.get('email.refresh_prompt')}: ").lower()
|
||||
@@ -418,4 +306,4 @@ def main(translator=None):
|
||||
temp_email.close()
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
main()
|
||||
@@ -378,9 +378,12 @@ class OAuthHandler:
|
||||
|
||||
# Delete current account
|
||||
if self._delete_current_account():
|
||||
# Start new authentication
|
||||
# Start new authentication based on auth type
|
||||
print(f"{Fore.CYAN}{EMOJI['INFO']} Starting new authentication process...{Style.RESET_ALL}")
|
||||
return self.handle_google_auth()
|
||||
if auth_type == "google":
|
||||
return self.handle_google_auth()
|
||||
else: # github
|
||||
return self.handle_github_auth()
|
||||
else:
|
||||
print(f"{Fore.RED}{EMOJI['ERROR']} Failed to delete expired account{Style.RESET_ALL}")
|
||||
|
||||
@@ -573,7 +576,7 @@ class OAuthHandler:
|
||||
print(f"{Fore.CYAN}{EMOJI['INFO']} Usage count: {usage_text}{Style.RESET_ALL}")
|
||||
|
||||
# Check if account is expired
|
||||
if usage_text.strip() == "150 / 150": # Changed back to actual condition
|
||||
if usage_text.strip() == "150 / 150":
|
||||
print(f"{Fore.YELLOW}{EMOJI['INFO']} Account has reached maximum usage, deleting...{Style.RESET_ALL}")
|
||||
|
||||
delete_js = """
|
||||
@@ -610,8 +613,8 @@ class OAuthHandler:
|
||||
print(f"{Fore.CYAN}{EMOJI['INFO']} Redirecting to authenticator.cursor.sh...{Style.RESET_ALL}")
|
||||
|
||||
# Explicitly navigate to the authentication page
|
||||
#self.browser.get("https://authenticator.cursor.sh/sign-up")
|
||||
# time.sleep(get_random_wait_time(self.config, 'page_load_wait'))
|
||||
self.browser.get("https://authenticator.cursor.sh/sign-up")
|
||||
time.sleep(get_random_wait_time(self.config, 'page_load_wait'))
|
||||
|
||||
# Call handle_google_auth again to repeat the entire process
|
||||
print(f"{Fore.CYAN}{EMOJI['INFO']} Starting new Google authentication...{Style.RESET_ALL}")
|
||||
@@ -659,7 +662,7 @@ class OAuthHandler:
|
||||
print(f"{Fore.CYAN}{EMOJI['INFO']} Usage count: {usage_text}{Style.RESET_ALL}")
|
||||
|
||||
# Check if account is expired
|
||||
if usage_text.strip() == "150 / 150": # Changed back to actual condition
|
||||
if usage_text.strip() == "150 / 150":
|
||||
print(f"{Fore.YELLOW}{EMOJI['INFO']} Account has reached maximum usage, deleting...{Style.RESET_ALL}")
|
||||
|
||||
delete_js = """
|
||||
@@ -787,6 +790,48 @@ class OAuthHandler:
|
||||
print(f"{Fore.RED}{EMOJI['ERROR']} Failed to extract auth info: {str(e)}{Style.RESET_ALL}")
|
||||
return False, None
|
||||
|
||||
def _delete_current_account(self):
|
||||
"""Delete the current account using the API"""
|
||||
try:
|
||||
delete_js = """
|
||||
function deleteAccount() {
|
||||
return new Promise((resolve, reject) => {
|
||||
fetch('https://www.cursor.com/api/dashboard/delete-account', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
credentials: 'include'
|
||||
})
|
||||
.then(response => {
|
||||
if (response.status === 200) {
|
||||
resolve('Account deleted successfully');
|
||||
} else {
|
||||
reject('Failed to delete account: ' + response.status);
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
reject('Error: ' + error);
|
||||
});
|
||||
});
|
||||
}
|
||||
return deleteAccount();
|
||||
"""
|
||||
|
||||
result = self.browser.run_js(delete_js)
|
||||
print(f"{Fore.GREEN}{EMOJI['SUCCESS']} Delete account result: {result}{Style.RESET_ALL}")
|
||||
|
||||
# Navigate back to auth page
|
||||
print(f"{Fore.CYAN}{EMOJI['INFO']} Redirecting to authenticator.cursor.sh...{Style.RESET_ALL}")
|
||||
self.browser.get("https://authenticator.cursor.sh/sign-up")
|
||||
time.sleep(get_random_wait_time(self.config, 'page_load_wait'))
|
||||
|
||||
return True
|
||||
|
||||
except Exception as e:
|
||||
print(f"{Fore.RED}{EMOJI['ERROR']} Failed to delete account: {str(e)}{Style.RESET_ALL}")
|
||||
return False
|
||||
|
||||
def main(auth_type, translator=None):
|
||||
"""Main function to handle OAuth authentication
|
||||
|
||||
|
||||
Reference in New Issue
Block a user