forked from mirrors/cursor-free-vip
Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fe3e27561b | ||
|
|
bf2bea71eb | ||
|
|
77a61647dd | ||
|
|
813dd4431e | ||
|
|
d7116b8cf3 | ||
|
|
f5a7acc4e3 | ||
|
|
479933844a | ||
|
|
93046d7f03 | ||
|
|
e7ca31b710 |
4
.github/workflows/build.yml
vendored
4
.github/workflows/build.yml
vendored
@@ -6,7 +6,7 @@ on:
|
|||||||
version:
|
version:
|
||||||
description: 'Version number (e.g. 1.0.9)'
|
description: 'Version number (e.g. 1.0.9)'
|
||||||
required: true
|
required: true
|
||||||
default: '1.4.01'
|
default: '1.4.07'
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
@@ -206,4 +206,4 @@ jobs:
|
|||||||
draft: false
|
draft: false
|
||||||
prerelease: false
|
prerelease: false
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|||||||
@@ -1,5 +1,12 @@
|
|||||||
# Change Log
|
# Change Log
|
||||||
|
|
||||||
|
## v1.5.01
|
||||||
|
1. Add: Check Latest Version | 增加檢查最新版本
|
||||||
|
2. Add: Update Command | 增加更新命令
|
||||||
|
|
||||||
|
## v1.4.08
|
||||||
|
1. Add: Print Some Account Info | 增加打印一些賬號信息
|
||||||
|
|
||||||
## v1.4.07
|
## v1.4.07
|
||||||
1. Add Removed break statements after each operation | 修改結束event後的break暫停應用
|
1. Add Removed break statements after each operation | 修改結束event後的break暫停應用
|
||||||
2. Added print_menu() calls to show the menu again | 添加print_menu()調用以再次顯示菜單
|
2. Added print_menu() calls to show the menu again | 添加print_menu()調用以再次顯示菜單
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# ➤ Cursor Free VIP
|
# ➤ Cursor Free VIP
|
||||||
<div align="center">
|
<div align="center">
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<img src="./images/logo.png" alt="Cursor Pro Logo" width="200"/>
|
<img src="./images/logo.png" alt="Cursor Pro Logo" width="200" style="border-radius: 6px;"/>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
@@ -19,7 +19,7 @@ This is a tool to automatically register , support Windows and macOS systems, co
|
|||||||
這是一個自動化工具,自動註冊 ,支持 Windows 和 macOS 系統,完成Auth驗證,重置Cursor的配置。
|
這是一個自動化工具,自動註冊 ,支持 Windows 和 macOS 系統,完成Auth驗證,重置Cursor的配置。
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<img src="./images/pronew_2025-02-13_15-01-32.png" alt="new" width="400"/><br>
|
<img src="./images/new_2025-02-27_10-42-44.png" alt="new" width="400" style="border-radius: 6px;"/><br>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
##### If you dont have google chrome , you can download it from [here](https://www.google.com/intl/en_pk/chrome/)
|
##### If you dont have google chrome , you can download it from [here](https://www.google.com/intl/en_pk/chrome/)
|
||||||
|
|||||||
@@ -49,6 +49,9 @@ class CursorRegistration:
|
|||||||
self.password = self._generate_password()
|
self.password = self._generate_password()
|
||||||
self.first_name = self._generate_name()
|
self.first_name = self._generate_name()
|
||||||
self.last_name = self._generate_name()
|
self.last_name = self._generate_name()
|
||||||
|
print(f"Password: {self.password}\n")
|
||||||
|
print(f"First Name: {self.first_name}\n")
|
||||||
|
print(f"Last Name: {self.last_name}\n")
|
||||||
|
|
||||||
def _generate_password(self, length=12):
|
def _generate_password(self, length=12):
|
||||||
"""Generate Random Password"""
|
"""Generate Random Password"""
|
||||||
@@ -78,6 +81,7 @@ class CursorRegistration:
|
|||||||
|
|
||||||
# 保存邮箱地址
|
# 保存邮箱地址
|
||||||
self.email_address = email_address
|
self.email_address = email_address
|
||||||
|
print(f"Email Address: {self.email_address}\n")
|
||||||
self.email_tab = self.temp_email # 传递 NewTempEmail 实例
|
self.email_tab = self.temp_email # 传递 NewTempEmail 实例
|
||||||
|
|
||||||
return True
|
return True
|
||||||
@@ -149,6 +153,7 @@ class CursorRegistration:
|
|||||||
if usage_ele:
|
if usage_ele:
|
||||||
total_usage = usage_ele.text.split("/")[-1].strip()
|
total_usage = usage_ele.text.split("/")[-1].strip()
|
||||||
|
|
||||||
|
print(f"Total Usage: {total_usage}\n")
|
||||||
print(f"{Fore.CYAN}{EMOJI['WAIT']} {self.translator.get('register.get_token')}...{Style.RESET_ALL}")
|
print(f"{Fore.CYAN}{EMOJI['WAIT']} {self.translator.get('register.get_token')}...{Style.RESET_ALL}")
|
||||||
max_attempts = 30
|
max_attempts = 30
|
||||||
retry_interval = 2
|
retry_interval = 2
|
||||||
|
|||||||
@@ -48,6 +48,9 @@ class CursorRegistration:
|
|||||||
self.password = self._generate_password()
|
self.password = self._generate_password()
|
||||||
self.first_name = self._generate_name()
|
self.first_name = self._generate_name()
|
||||||
self.last_name = self._generate_name()
|
self.last_name = self._generate_name()
|
||||||
|
print(f"Password: {self.password}\n")
|
||||||
|
print(f"First Name: {self.first_name}\n")
|
||||||
|
print(f"Last Name: {self.last_name}\n")
|
||||||
|
|
||||||
def _generate_password(self, length=12):
|
def _generate_password(self, length=12):
|
||||||
"""Generate Random Password"""
|
"""Generate Random Password"""
|
||||||
@@ -70,6 +73,7 @@ class CursorRegistration:
|
|||||||
print(f"{Fore.RED}{EMOJI['ERROR']} {self.translator.get('register.invalid_email') if self.translator else '无效的邮箱地址'}{Style.RESET_ALL}")
|
print(f"{Fore.RED}{EMOJI['ERROR']} {self.translator.get('register.invalid_email') if self.translator else '无效的邮箱地址'}{Style.RESET_ALL}")
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
print(f"Email Address: {self.email_address}\n")
|
||||||
return True
|
return True
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
@@ -155,6 +159,7 @@ class CursorRegistration:
|
|||||||
if usage_ele:
|
if usage_ele:
|
||||||
total_usage = usage_ele.text.split("/")[-1].strip()
|
total_usage = usage_ele.text.split("/")[-1].strip()
|
||||||
|
|
||||||
|
print(f"Total Usage: {total_usage}\n")
|
||||||
print(f"{Fore.CYAN}{EMOJI['WAIT']} {self.translator.get('register.get_token')}...{Style.RESET_ALL}")
|
print(f"{Fore.CYAN}{EMOJI['WAIT']} {self.translator.get('register.get_token')}...{Style.RESET_ALL}")
|
||||||
max_attempts = 30
|
max_attempts = 30
|
||||||
retry_interval = 2
|
retry_interval = 2
|
||||||
|
|||||||
BIN
images/new_2025-02-27_10-42-44.png
Normal file
BIN
images/new_2025-02-27_10-42-44.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 116 KiB |
@@ -233,5 +233,13 @@
|
|||||||
"directory_removed": "Directory Removed",
|
"directory_removed": "Directory Removed",
|
||||||
"creating_block_file": "Creating Block File",
|
"creating_block_file": "Creating Block File",
|
||||||
"block_file_created": "Block File Created"
|
"block_file_created": "Block File Created"
|
||||||
|
},
|
||||||
|
"updater": {
|
||||||
|
"checking": "Checking for updates...",
|
||||||
|
"new_version_available": "New version available! (Current: {current}, Latest: {latest})",
|
||||||
|
"updating": "Updating to the latest version. The program will restart automatically.",
|
||||||
|
"up_to_date": "You are using the latest version.",
|
||||||
|
"check_failed": "Failed to check for updates: {error}",
|
||||||
|
"continue_anyway": "Continuing with current version..."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -230,5 +230,13 @@
|
|||||||
"directory_removed": "目录已删除",
|
"directory_removed": "目录已删除",
|
||||||
"creating_block_file": "创建阻止文件",
|
"creating_block_file": "创建阻止文件",
|
||||||
"block_file_created": "阻止文件已创建"
|
"block_file_created": "阻止文件已创建"
|
||||||
|
},
|
||||||
|
"updater": {
|
||||||
|
"checking": "检查更新...",
|
||||||
|
"new_version_available": "有新版本可用! (当前版本: {current}, 最新版本: {latest})",
|
||||||
|
"updating": "正在更新到最新版本。程序将自动重启。",
|
||||||
|
"up_to_date": "您使用的是最新版本。",
|
||||||
|
"check_failed": "检查更新失败: {error}",
|
||||||
|
"continue_anyway": "继续使用当前版本..."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -211,5 +211,13 @@
|
|||||||
"directory_removed": "目錄已刪除",
|
"directory_removed": "目錄已刪除",
|
||||||
"creating_block_file": "創建阻止文件",
|
"creating_block_file": "創建阻止文件",
|
||||||
"block_file_created": "阻止文件已創建"
|
"block_file_created": "阻止文件已創建"
|
||||||
|
},
|
||||||
|
"updater": {
|
||||||
|
"checking": "檢查更新...",
|
||||||
|
"new_version_available": "有新版本可用! (當前版本: {current}, 最新版本: {latest})",
|
||||||
|
"updating": "正在更新到最新版本。程序將自動重啟。",
|
||||||
|
"up_to_date": "您使用的是最新版本。",
|
||||||
|
"check_failed": "檢查更新失敗: {error}",
|
||||||
|
"continue_anyway": "繼續使用當前版本..."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
35
main.py
35
main.py
@@ -3,10 +3,12 @@
|
|||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import json
|
import json
|
||||||
from logo import print_logo
|
from logo import print_logo, version
|
||||||
from colorama import Fore, Style, init
|
from colorama import Fore, Style, init
|
||||||
import locale
|
import locale
|
||||||
import platform
|
import platform
|
||||||
|
import requests
|
||||||
|
import subprocess
|
||||||
|
|
||||||
# 只在 Windows 系统上导入 windll
|
# 只在 Windows 系统上导入 windll
|
||||||
if platform.system() == 'Windows':
|
if platform.system() == 'Windows':
|
||||||
@@ -203,8 +205,39 @@ def select_language():
|
|||||||
print(f"{Fore.RED}{EMOJI['ERROR']} {translator.get('menu.invalid_choice')}{Style.RESET_ALL}")
|
print(f"{Fore.RED}{EMOJI['ERROR']} {translator.get('menu.invalid_choice')}{Style.RESET_ALL}")
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
def check_latest_version():
|
||||||
|
"""Check if current version matches the latest release version"""
|
||||||
|
try:
|
||||||
|
print(f"\n{Fore.CYAN}{EMOJI['UPDATE']} {translator.get('updater.checking')}{Style.RESET_ALL}")
|
||||||
|
|
||||||
|
# Get latest version from GitHub API with timeout
|
||||||
|
response = requests.get("https://api.github.com/repos/yeongpin/cursor-free-vip/releases/latest", timeout=5)
|
||||||
|
latest_version = response.json()["tag_name"].lstrip('v')
|
||||||
|
|
||||||
|
if latest_version != version:
|
||||||
|
print(f"\n{Fore.YELLOW}{EMOJI['INFO']} {translator.get('updater.new_version_available', current=version, latest=latest_version)}{Style.RESET_ALL}")
|
||||||
|
|
||||||
|
# Execute update command based on platform
|
||||||
|
if platform.system() == 'Windows':
|
||||||
|
update_command = 'irm https://raw.githubusercontent.com/yeongpin/cursor-free-vip/main/scripts/install.ps1 | iex'
|
||||||
|
subprocess.run(['powershell', '-NoProfile', '-ExecutionPolicy', 'Bypass', '-Command', update_command], check=True)
|
||||||
|
else:
|
||||||
|
update_command = 'curl -fsSL https://raw.githubusercontent.com/yeongpin/cursor-free-vip/main/scripts/install.sh -o install.sh && chmod +x install.sh && ./install.sh'
|
||||||
|
subprocess.Popen(update_command, shell=True)
|
||||||
|
|
||||||
|
print(f"\n{Fore.GREEN}{EMOJI['SUCCESS']} {translator.get('updater.updating')}{Style.RESET_ALL}")
|
||||||
|
sys.exit(0)
|
||||||
|
else:
|
||||||
|
print(f"{Fore.GREEN}{EMOJI['SUCCESS']} {translator.get('updater.up_to_date')}{Style.RESET_ALL}")
|
||||||
|
|
||||||
|
except Exception as e:
|
||||||
|
print(f"{Fore.RED}{EMOJI['ERROR']} {translator.get('updater.check_failed', error=str(e))}{Style.RESET_ALL}")
|
||||||
|
print(f"{Fore.YELLOW}{EMOJI['INFO']} {translator.get('updater.continue_anyway')}{Style.RESET_ALL}")
|
||||||
|
return # Continue with the program instead of blocking
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
print_logo()
|
print_logo()
|
||||||
|
check_latest_version() # Add version check before showing menu
|
||||||
print_menu()
|
print_menu()
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
|
|||||||
Reference in New Issue
Block a user