Compare commits

...

6 Commits

Author SHA1 Message Date
yeongpin
fea2b88a8e Update CHANGELOG.md to reflect recent changes, including a new entry for bypassing Cursor version checks and documentation for header configuration. Adjusted existing entries for clarity. 2025-04-07 12:43:35 +08:00
yeongpin
63fe39f2c1 fix: Update backup timestamp format in force update configuration
- Changed the variable name from 'time' to 'current_time' for clarity.
- Updated the backup file naming to use the current timestamp correctly, ensuring accurate backup creation.
2025-04-07 10:53:06 +08:00
yeongpin
386ffa4568 chore: Bump version to 1.8.08 in .env file 2025-04-07 10:51:09 +08:00
yeongpin
9c66725caf feat: Introduce force update configuration feature with multilingual support
- Added a new function to force update the configuration file with the latest defaults, including backup and removal of the original file.
- Implemented multilingual support for force update messages in English, Simplified Chinese, and Traditional Chinese locale files.
- Updated CHANGELOG.md to reflect the new feature and fixes, bumping the version to 1.8.08 in the build workflow.
2025-04-07 10:51:01 +08:00
yeongpin
16b6ba95e2 fix: Update RESET emoji in totally_reset_cursor.py for improved clarity
- Changed the RESET emoji from an invalid character to a clear refresh symbol (🔄) for better user understanding.
2025-04-06 17:31:57 +08:00
yeongpin
3424f49a57 fix: Correct indentation and formatting issues in totally_reset_cursor.py
- Fixed indentation in the get_cursor_paths function for better readability.
- Adjusted the else statement in the MachineIDResetter class to maintain consistent formatting.
- Ensured proper newline at the end of the file for compliance with coding standards.
2025-04-06 17:31:10 +08:00
9 changed files with 82 additions and 17 deletions

4
.env
View File

@@ -1,2 +1,2 @@
version=1.8.07
VERSION=1.8.07
version=1.8.08
VERSION=1.8.08

View File

@@ -6,7 +6,7 @@ on:
version:
description: 'Version number (e.g. 1.0.9)'
required: true
default: '1.8.07'
default: '1.8.08'
permissions:
contents: write

View File

@@ -1,5 +1,15 @@
# Change Log
## v1.8.08
1. Add: Force Update Config | 添加強制更新配置
2. Add: Multilanguage support for force update | 添加強制更新功能的多語言支持
3. Fix: Google Auth & Github Auth JWT Problem | 修復 Google Auth & Github Auth JWT 問題
4. Fix: Totally reset import & import * raw options problem | 修復 totally reset import & import * raw 選項問題
5. Fix: reset.file_not_found problem | 修復 reset.file_not_found 問題
6. Outdated: Bypass Cursor Version Check | 過期:繞過 Cursor 版本檢查
7. Document: i.header.set("x-cursor-config-version", "UUID4-xxxxxx-xxxxxx-xxxxxx-xxxxxx"); | 文檔i.header.set("x-cursor-config-version", "UUID4-xxxxxx-xxxxxx-xxxxxx-xxxxxx");
8. Fix: Some Issues | 修復一些問題
## v1.8.07
1. Add: Bypass Cursor Version Check | 添加繞過 Cursor 版本檢查
2. Add: Multilanguage support for bypass | 添加繞過的多語言支持

View File

@@ -3,6 +3,8 @@ import sys
import configparser
from colorama import Fore, Style
from utils import get_user_documents_path, get_default_chrome_path, get_linux_cursor_path
import shutil
import datetime
EMOJI = {
"INFO": "",
@@ -257,6 +259,43 @@ def print_config(config, translator=None):
print()
def force_update_config(translator=None):
"""
Force update configuration file with latest defaults
Args:
translator: Translator instance
Returns:
ConfigParser instance or None if failed
"""
try:
config_dir = os.path.join(get_user_documents_path(), ".cursor-free-vip")
config_file = os.path.join(config_dir, "config.ini")
current_time = datetime.datetime.now()
if os.path.exists(config_file):
try:
# create backup
backup_file = f"{config_file}.bak.{current_time.strftime('%Y%m%d_%H%M%S')}"
shutil.copy2(config_file, backup_file)
if translator:
print(f"{Fore.CYAN}{EMOJI['INFO']} {translator.get('config.backup_created', path=backup_file) if translator else f'Backup created: {backup_file}'}{Style.RESET_ALL}")
# delete original file
os.remove(config_file)
if translator:
print(f"{Fore.CYAN}{EMOJI['INFO']} {translator.get('config.config_removed') if translator else 'Config file removed for forced update'}{Style.RESET_ALL}")
except Exception as e:
if translator:
print(f"{Fore.RED}{EMOJI['ERROR']} {translator.get('config.backup_failed', error=str(e)) if translator else f'Failed to backup config: {str(e)}'}{Style.RESET_ALL}")
# use existing setup_config function to create new config
return setup_config(translator)
except Exception as e:
if translator:
print(f"{Fore.RED}{EMOJI['ERROR']} {translator.get('config.force_update_failed', error=str(e)) if translator else f'Force update config failed: {str(e)}'}{Style.RESET_ALL}")
return None
def get_config(translator=None):
"""Get existing config or create new one"""
return setup_config(translator)

View File

@@ -117,7 +117,8 @@
"modify_file_failed": "Modify File Failed: {error}",
"windows_machine_id_updated": "Windows Machine ID Updated Successfully",
"update_windows_machine_id_failed": "Update Windows Machine ID Failed: {error}",
"update_windows_machine_guid_failed": "Update Windows Machine GUID Failed: {error}"
"update_windows_machine_guid_failed": "Update Windows Machine GUID Failed: {error}",
"file_not_found": "File Not Found: {path}"
},
"register": {
"title": "Cursor Registration Tool",
@@ -555,7 +556,11 @@
"config_setup_error": "Error setting up config: {error}",
"storage_file_is_valid_and_contains_data": "Storage file is valid and contains data",
"error_reading_storage_file": "Error reading storage file: {error}",
"also_checked": "Also checked {path}"
"also_checked": "Also checked {path}",
"backup_created": "Backup created: {path}",
"config_removed": "Config file removed for forced update",
"backup_failed": "Failed to backup config: {error}",
"force_update_failed": "Force update config failed: {error}"
},
"oauth": {
"authentication_button_not_found": "Authentication button not found",

View File

@@ -117,7 +117,8 @@
"modify_file_failed": "修改文件失败: {error}",
"windows_machine_id_updated": "Windows机器ID更新成功",
"update_windows_machine_id_failed": "更新Windows机器ID失败: {error}",
"update_windows_machine_guid_failed": "更新Windows机器GUID失败: {error}"
"update_windows_machine_guid_failed": "更新Windows机器GUID失败: {error}",
"file_not_found": "文件未找到: {path}"
},
"register": {
"title": "Cursor 注册工具",
@@ -533,7 +534,11 @@
"config_setup_error": "配置设置错误",
"storage_file_is_valid_and_contains_data": "存储文件有效且包含数据",
"error_reading_storage_file": "读取存储文件时出错",
"also_checked": "也检查了 {path}"
"also_checked": "也检查了 {path}",
"backup_created": "备份创建: {path}",
"config_removed": "配置文件已删除用于强制更新",
"backup_failed": "备份失败: {error}",
"force_update_failed": "强制更新配置失败: {error}"
},
"oauth": {
"authentication_button_not_found": "未找到认证按钮",

View File

@@ -117,7 +117,8 @@
"modify_file_failed": "修改文件失敗: {error}",
"windows_machine_id_updated": "Windows機器ID更新成功",
"update_windows_machine_id_failed": "更新Windows機器ID失敗: {error}",
"update_windows_machine_guid_failed": "更新Windows機器GUID失敗: {error}"
"update_windows_machine_guid_failed": "更新Windows機器GUID失敗: {error}",
"file_not_found": "文件未找到: {path}"
},
"register": {
@@ -515,7 +516,11 @@
"config_setup_error": "配置設置錯誤",
"storage_file_is_valid_and_contains_data": "儲存文件有效且包含數據",
"error_reading_storage_file": "讀取儲存文件時出錯",
"also_checked": "也檢查了 {path}"
"also_checked": "也檢查了 {path}",
"backup_created": "備份已創建: {path}",
"config_removed": "配置文件已刪除用於強制更新",
"backup_failed": "備份失敗: {error}",
"force_update_failed": "強制更新配置失敗: {error}"
},
"oauth": {
"authentication_button_not_found": "未找到認證按鈕",

View File

@@ -9,7 +9,7 @@ import locale
import platform
import requests
import subprocess
from config import get_config
from config import get_config, force_update_config
import shutil
import re
@@ -275,8 +275,8 @@ def print_menu():
0: f"{Fore.GREEN}0{Style.RESET_ALL}. {EMOJI['ERROR']} {translator.get('menu.exit')}",
1: f"{Fore.GREEN}1{Style.RESET_ALL}. {EMOJI['RESET']} {translator.get('menu.reset')}",
2: f"{Fore.GREEN}2{Style.RESET_ALL}. {EMOJI['SUCCESS']} {translator.get('menu.register')} ({Fore.RED}{translator.get('menu.outdate')}{Style.RESET_ALL})",
3: f"{Fore.GREEN}3{Style.RESET_ALL}. {EMOJI['SUN']} {translator.get('menu.register_google')} {EMOJI['ROCKET']} ({Fore.YELLOW}{translator.get('menu.lifetime_access_enabled')} ({Fore.RED}{translator.get('menu.outdate')}{Style.RESET_ALL}))",
4: f"{Fore.GREEN}4{Style.RESET_ALL}. {EMOJI['STAR']} {translator.get('menu.register_github')} {EMOJI['ROCKET']} ({Fore.YELLOW}{translator.get('menu.lifetime_access_enabled')} ({Fore.RED}{translator.get('menu.outdate')}{Style.RESET_ALL}))",
3: f"{Fore.GREEN}3{Style.RESET_ALL}. {EMOJI['SUN']} {translator.get('menu.register_google')} {EMOJI['ROCKET']} ({Fore.YELLOW}{translator.get('menu.lifetime_access_enabled')}{Style.RESET_ALL})",
4: f"{Fore.GREEN}4{Style.RESET_ALL}. {EMOJI['STAR']} {translator.get('menu.register_github')} {EMOJI['ROCKET']} ({Fore.YELLOW}{translator.get('menu.lifetime_access_enabled')}{Style.RESET_ALL})",
5: f"{Fore.GREEN}5{Style.RESET_ALL}. {EMOJI['SUCCESS']} {translator.get('menu.register_manual')}",
6: f"{Fore.GREEN}6{Style.RESET_ALL}. {EMOJI['RESET']} {translator.get('menu.temp_github_register')}",
7: f"{Fore.GREEN}7{Style.RESET_ALL}. {EMOJI['ERROR']} {translator.get('menu.quit')}",
@@ -552,7 +552,8 @@ def main():
if not config:
print(f"{Fore.RED}{EMOJI['ERROR']} {translator.get('menu.config_init_failed')}{Style.RESET_ALL}")
return
force_update_config(translator)
if config.getboolean('Utils', 'enabled_update_check'):
check_latest_version() # Add version check before showing menu
print_menu()

View File

@@ -26,7 +26,7 @@ EMOJI = {
"SUCCESS": "",
"ERROR": "",
"INFO": "",
"RESET": "<EFBFBD><EFBFBD>",
"RESET": "🔄",
"WARNING": "⚠️",
}
@@ -111,7 +111,7 @@ def get_cursor_paths(translator=None) -> Tuple[str, str]:
# For Linux, try to find the first existing path if the configured one doesn't exist
if system == "Linux" and not os.path.exists(base_path):
for path in default_paths["Linux"]:
if os.path.exists(path):
if os.path.exists(path):
base_path = path
# Update config with the found path
config.set(section, 'cursor_path', path)
@@ -529,7 +529,7 @@ class MachineIDResetter:
self.db_path = config.get('LinuxPaths', 'storage_path')
self.sqlite_path = config.get('LinuxPaths', 'sqlite_path')
else:
else:
raise NotImplementedError(f"Not Supported OS: {sys.platform}")
# Save any changes to config file
@@ -811,4 +811,4 @@ def run(translator=None):
if __name__ == "__main__":
from main import translator as main_translator
run(main_translator)
run(main_translator)