From 50366e319a3bc1635dc50335591712c6ecd8c734 Mon Sep 17 00:00:00 2001 From: BasaiCorp Date: Sun, 16 Mar 2025 09:05:17 +0530 Subject: [PATCH 1/5] Added totally_reset_cursor.py to fully reset Cursor AI --- totally_reset_cursor.py | 68 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 totally_reset_cursor.py diff --git a/totally_reset_cursor.py b/totally_reset_cursor.py new file mode 100644 index 0000000..c130fdc --- /dev/null +++ b/totally_reset_cursor.py @@ -0,0 +1,68 @@ +import os +import shutil +import platform +import time + +def remove_dir(path): + """Removes a directory if it exists and logs the action.""" + if os.path.exists(path): + shutil.rmtree(path, ignore_errors=True) + print(f"[✔] Deleted: {path}") + else: + print(f"[✘] Not Found: {path}") + +def reset_cursor(): + """Completely resets Cursor AI by removing all settings, caches, and extensions.""" + system = platform.system() + home = os.path.expanduser("~") + + print("\n🚀 Resetting Cursor AI Editor... Please wait.\n") + + if system == "Windows": + cursor_paths = [ + os.path.join(home, "AppData", "Roaming", "Cursor"), + os.path.join(home, "AppData", "Local", "Cursor"), + os.path.join(home, ".vscode"), # Cursor sometimes stores extensions here + os.path.join(home, "AppData", "Local", "Temp", "Cursor"), # Temporary data + ] + + elif system == "Darwin": # macOS + cursor_paths = [ + os.path.join(home, "Library", "Application Support", "Cursor"), + os.path.join(home, "Library", "Caches", "Cursor"), + os.path.join(home, "Library", "Preferences", "Cursor"), + os.path.join(home, ".vscode"), # Cursor sometimes stores extensions here + ] + + elif system == "Linux": + cursor_paths = [ + os.path.join(home, ".config", "Cursor"), + os.path.join(home, ".cache", "Cursor"), + os.path.join(home, ".local", "share", "Cursor"), + os.path.join(home, ".vscode"), # Cursor sometimes stores extensions here + ] + + else: + print("❌ Unsupported OS. Exiting.") + return + + for path in cursor_paths: + remove_dir(path) + + # Remove potential files that store trial/activation data + cursor_trial_paths = [ + os.path.join(home, ".cursor_trial_data"), + os.path.join(home, "AppData", "Local", "Cursor", "trial_info.json"), # Windows + os.path.join(home, "Library", "Application Support", "Cursor", "trial_info.json"), # macOS + os.path.join(home, ".config", "Cursor", "trial_info.json"), # Linux + ] + + print("\n🔄 Removing trial data and license information...\n") + for path in cursor_trial_paths: + remove_dir(path) + + print("\n✅ Cursor AI has been fully reset! Restart your system for changes to take effect.\n") + +if __name__ == "__main__": + reset_cursor() + From 9146677bc4ad97bf6e1b4d228ea7e9d7904ffad4 Mon Sep 17 00:00:00 2001 From: BasaiCorp Date: Sun, 16 Mar 2025 09:18:54 +0530 Subject: [PATCH 2/5] update v2 of totally_reset_cursor.py --- totally_reset_cursor.py | 79 +++++++++++++++++++++++++++++++++++++---- 1 file changed, 72 insertions(+), 7 deletions(-) diff --git a/totally_reset_cursor.py b/totally_reset_cursor.py index c130fdc..8d27eb1 100644 --- a/totally_reset_cursor.py +++ b/totally_reset_cursor.py @@ -2,20 +2,70 @@ import os import shutil import platform import time +import sys + +def display_banner(): + """Displays a stylized banner for the tool.""" + print("\n" + "="*70) + print(" CURSOR AI RESET TOOL") + print(" Developed by Prathmesh (Discord: prathmesh_pro)") + print("="*70 + "\n") + +def display_features(): + """Displays the features of the Cursor AI Reset Tool.""" + print("\n📋 FEATURES:") + print(" • Complete removal of Cursor AI settings and configurations") + print(" • Clears all cached data including AI history and prompts") + print(" • Removes custom extensions and preferences") + print(" • Resets trial information and activation data") + print(" • Helps resolve common issues with Cursor AI editor") + print(" • Compatible with Windows, macOS, and Linux\n") + +def display_disclaimer(): + """Displays a disclaimer for the user.""" + print("\n⚠️ DISCLAIMER:") + print(" This tool will permanently delete all Cursor AI settings,") + print(" extensions, and cached data. This action cannot be undone.") + print(" Your code files will NOT be affected, but all editor") + print(" preferences and AI history will be reset to default.") + print(" You will need to set up Cursor AI again after running this tool.") + print(" Use at your own risk.\n") + +def get_confirmation(): + """Gets confirmation from the user to proceed.""" + while True: + choice = input("⚠️ Do you want to proceed with resetting Cursor AI? (Y/n): ").strip().lower() + if choice == "y" or choice == "": + return True + elif choice == "n": + return False + else: + print("Please enter 'Y' or 'n'") def remove_dir(path): """Removes a directory if it exists and logs the action.""" if os.path.exists(path): - shutil.rmtree(path, ignore_errors=True) - print(f"[✔] Deleted: {path}") + try: + shutil.rmtree(path, ignore_errors=True) + print(f"[✅] Deleted: {path}") + except Exception as e: + print(f"[❌] Error deleting {path}: {str(e)}") else: - print(f"[✘] Not Found: {path}") + print(f"[ℹ️] Not Found: {path}") def reset_cursor(): """Completely resets Cursor AI by removing all settings, caches, and extensions.""" system = platform.system() home = os.path.expanduser("~") + display_banner() + display_features() + display_disclaimer() + + if not get_confirmation(): + print("\n🛑 Reset cancelled. Exiting without making any changes.\n") + return + print("\n🚀 Resetting Cursor AI Editor... Please wait.\n") if system == "Windows": @@ -59,10 +109,25 @@ def reset_cursor(): print("\n🔄 Removing trial data and license information...\n") for path in cursor_trial_paths: - remove_dir(path) + if os.path.isfile(path): + try: + os.remove(path) + print(f"[✅] Deleted file: {path}") + except Exception as e: + print(f"[❌] Error deleting file {path}: {str(e)}") + else: + remove_dir(path) # In case it's a directory - print("\n✅ Cursor AI has been fully reset! Restart your system for changes to take effect.\n") + print("\n✅ Cursor AI has been fully reset! Restart your system for changes to take effect.") + print(" You will need to reinstall and reconfigure Cursor AI.") + print(" If you encounter any issues, contact Prathmesh on Discord: prathmesh_pro\n") if __name__ == "__main__": - reset_cursor() - + try: + reset_cursor() + except KeyboardInterrupt: + print("\n\n🛑 Process interrupted by user. Exiting...\n") + sys.exit(1) + except Exception as e: + print(f"\n❌ An unexpected error occurred: {str(e)}\n") + sys.exit(1) From 1dba533e937680ddca0f9e04f6b1cbd32d5c70ad Mon Sep 17 00:00:00 2001 From: BasaiCorp Date: Sun, 16 Mar 2025 09:28:53 +0530 Subject: [PATCH 3/5] COmmit v2.1 with machine id reset and all this one file will only do all for you but for account emails and registration please use https://github.com/yeongpin/cursor-free-vip --- totally_reset_cursor.py | 394 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 368 insertions(+), 26 deletions(-) diff --git a/totally_reset_cursor.py b/totally_reset_cursor.py index 8d27eb1..8792cff 100644 --- a/totally_reset_cursor.py +++ b/totally_reset_cursor.py @@ -3,6 +3,14 @@ import shutil import platform import time import sys +import glob +import json +import uuid +import random +import string +import re +from datetime import datetime +import subprocess def display_banner(): """Displays a stylized banner for the tool.""" @@ -16,18 +24,22 @@ def display_features(): print("\n📋 FEATURES:") print(" • Complete removal of Cursor AI settings and configurations") print(" • Clears all cached data including AI history and prompts") + print(" • Resets machine ID to bypass trial detection") + print(" • Creates new randomized machine identifiers") print(" • Removes custom extensions and preferences") print(" • Resets trial information and activation data") - print(" • Helps resolve common issues with Cursor AI editor") + print(" • Deep scan for hidden license and trial-related files") + print(" • Safely preserves non-Cursor files and applications") print(" • Compatible with Windows, macOS, and Linux\n") def display_disclaimer(): """Displays a disclaimer for the user.""" print("\n⚠️ DISCLAIMER:") print(" This tool will permanently delete all Cursor AI settings,") - print(" extensions, and cached data. This action cannot be undone.") - print(" Your code files will NOT be affected, but all editor") - print(" preferences and AI history will be reset to default.") + print(" configurations, and cached data. This action cannot be undone.") + print(" Your code files will NOT be affected, and the tool is designed") + print(" to only target Cursor AI editor files and trial detection mechanisms.") + print(" Other applications on your system will not be affected.") print(" You will need to set up Cursor AI again after running this tool.") print(" Use at your own risk.\n") @@ -44,6 +56,11 @@ def get_confirmation(): def remove_dir(path): """Removes a directory if it exists and logs the action.""" + # Safety check to ensure we're only deleting Cursor-related directories + if not is_cursor_related(path): + print(f"[⚠️] Skipped for safety (not Cursor-related): {path}") + return + if os.path.exists(path): try: shutil.rmtree(path, ignore_errors=True) @@ -53,6 +70,186 @@ def remove_dir(path): else: print(f"[ℹ️] Not Found: {path}") +def remove_file(path): + """Removes a file if it exists and logs the action.""" + # Safety check to ensure we're only deleting Cursor-related files + if not is_cursor_related(path): + print(f"[⚠️] Skipped for safety (not Cursor-related): {path}") + return + + if os.path.isfile(path): + try: + os.remove(path) + print(f"[✅] Deleted file: {path}") + except Exception as e: + print(f"[❌] Error deleting file {path}: {str(e)}") + else: + print(f"[ℹ️] File not found: {path}") + +def is_cursor_related(path): + """ + Safety function to verify a path is related to Cursor before deletion. + Returns True if the path appears to be related to Cursor AI. + """ + # Skip .vscode check as it's shared with VS Code + if path.endswith(".vscode"): + return False + + # Check if path contains cursor-related terms + cursor_terms = ["cursor", "cursorai", "cursor-electron"] + + # Convert path to lowercase for case-insensitive matching + lower_path = path.lower() + + # Return True if any cursor term is present in the path + for term in cursor_terms: + if term in lower_path: + return True + + # Check specific known Cursor file patterns + cursor_patterns = [ + r"\.cursor_.*$", + r"cursor-.*\.json$", + r"cursor_.*\.json$", + r"cursor-machine-id$", + r"trial_info\.json$", + r"license\.json$" + ] + + for pattern in cursor_patterns: + if re.search(pattern, lower_path): + return True + + # If it's a specific file that we know is only for Cursor + if os.path.basename(lower_path) in [ + "cursor_trial_data", + "cursor-state.json", + "cursor-machine-id", + "ai-settings.json", + "cursor.desktop" + ]: + return True + + return False + +def find_cursor_license_files(base_path, pattern): + """Finds files matching a pattern that might contain license information.""" + try: + matches = [] + for root, dirnames, filenames in os.walk(base_path): + for filename in filenames: + # Check if filename matches any pattern before adding to matches + if any(p.lower() in filename.lower() for p in pattern): + full_path = os.path.join(root, filename) + # Extra safety check to ensure it's cursor-related + if is_cursor_related(full_path): + matches.append(full_path) + return matches + except Exception as e: + print(f"[ℹ️] Error searching for files in {base_path}: {str(e)}") + return [] + +def generate_new_machine_id(): + """Generates a new random machine ID.""" + return str(uuid.uuid4()) + +def create_fake_machine_id(path): + """Creates a new machine ID file with random ID.""" + if not is_cursor_related(path): + return + + try: + new_id = generate_new_machine_id() + directory = os.path.dirname(path) + + # Ensure directory exists + if not os.path.exists(directory): + os.makedirs(directory) + + with open(path, 'w') as f: + f.write(new_id) + print(f"[✅] Created new machine ID: {path}") + except Exception as e: + print(f"[❌] Error creating machine ID file {path}: {str(e)}") + +def reset_machine_id(system, home): + """Resets machine ID in all possible locations.""" + print("\n🔄 Resetting machine identifiers to bypass trial detection...\n") + + # Common machine ID locations based on OS + if system == "Windows": + machine_id_paths = [ + os.path.join(home, "AppData", "Roaming", "Cursor", "cursor-machine-id"), + os.path.join(home, "AppData", "Local", "Cursor", "cursor-machine-id"), + os.path.join(home, "AppData", "Roaming", "cursor-electron", "cursor-machine-id"), + os.path.join(home, "AppData", "Local", "cursor-electron", "cursor-machine-id"), + os.path.join(home, ".cursor-machine-id"), + ] + elif system == "Darwin": # macOS + machine_id_paths = [ + os.path.join(home, "Library", "Application Support", "Cursor", "cursor-machine-id"), + os.path.join(home, "Library", "Application Support", "cursor-electron", "cursor-machine-id"), + os.path.join(home, ".cursor-machine-id"), + ] + elif system == "Linux": + machine_id_paths = [ + os.path.join(home, ".config", "Cursor", "cursor-machine-id"), + os.path.join(home, ".config", "cursor-electron", "cursor-machine-id"), + os.path.join(home, ".cursor-machine-id"), + ] + + # First remove existing machine IDs + for path in machine_id_paths: + remove_file(path) + + # Then create new randomized IDs + for path in machine_id_paths: + create_fake_machine_id(path) + + # Try to reset system machine ID if possible (with appropriate permissions) + if system == "Windows": + try: + # Windows: Create a temporary VBS script to reset machine GUID + print("[ℹ️] Note: Complete machine ID reset may require running as administrator") + except Exception as e: + print(f"[ℹ️] Windows machine ID modification skipped: {str(e)}") + + elif system == "Linux": + try: + # Linux: Create a random machine-id in /etc/ (needs sudo) + print("[ℹ️] Note: Complete system machine-id reset may require sudo privileges") + except Exception as e: + print(f"[ℹ️] Linux machine-id modification skipped: {str(e)}") + +def create_fake_trial_info(path, system, home): + """Creates fake trial information to extend trial period.""" + if not is_cursor_related(path): + return + + try: + # Generate future expiry date (90 days from now) + future_date = (datetime.now().timestamp() + (90 * 24 * 60 * 60)) * 1000 # milliseconds + + # Create fake trial info + fake_trial = { + "trialStartTimestamp": datetime.now().timestamp() * 1000, + "trialEndTimestamp": future_date, + "hasUsedTrial": False, + "machineId": generate_new_machine_id() + } + + directory = os.path.dirname(path) + + # Ensure directory exists + if not os.path.exists(directory): + os.makedirs(directory) + + with open(path, 'w') as f: + json.dump(fake_trial, f) + print(f"[✅] Created extended trial info: {path}") + except Exception as e: + print(f"[❌] Error creating trial info file {path}: {str(e)}") + def reset_cursor(): """Completely resets Cursor AI by removing all settings, caches, and extensions.""" system = platform.system() @@ -68,59 +265,203 @@ def reset_cursor(): print("\n🚀 Resetting Cursor AI Editor... Please wait.\n") + # Define paths based on OS if system == "Windows": cursor_paths = [ os.path.join(home, "AppData", "Roaming", "Cursor"), os.path.join(home, "AppData", "Local", "Cursor"), - os.path.join(home, ".vscode"), # Cursor sometimes stores extensions here + os.path.join(home, "AppData", "Roaming", "cursor-electron"), + os.path.join(home, "AppData", "Local", "cursor-electron"), + os.path.join(home, "AppData", "Local", "CursorAI"), + os.path.join(home, "AppData", "Roaming", "CursorAI"), + # os.path.join(home, ".vscode"), # Removed to avoid affecting VS Code os.path.join(home, "AppData", "Local", "Temp", "Cursor"), # Temporary data + os.path.join(home, "AppData", "Local", "Temp", "cursor-updater"), + os.path.join(home, "AppData", "Local", "Programs", "cursor"), ] + + # Additional locations for license/trial files on Windows + license_search_paths = [ + os.path.join(home, "AppData", "Roaming"), + os.path.join(home, "AppData", "Local"), + os.path.join(home, "AppData", "LocalLow"), + ] + + # Registry instructions for Windows + print("\n📝 NOTE: For complete reset on Windows, you might also need to clean registry entries.") + print(" Run 'regedit' and search for keys containing 'Cursor' or 'CursorAI'") + print(" under HKEY_CURRENT_USER\\Software\\ and delete them.\n") elif system == "Darwin": # macOS cursor_paths = [ os.path.join(home, "Library", "Application Support", "Cursor"), + os.path.join(home, "Library", "Application Support", "cursor-electron"), os.path.join(home, "Library", "Caches", "Cursor"), + os.path.join(home, "Library", "Caches", "cursor-electron"), os.path.join(home, "Library", "Preferences", "Cursor"), - os.path.join(home, ".vscode"), # Cursor sometimes stores extensions here + os.path.join(home, "Library", "Preferences", "cursor-electron"), + os.path.join(home, "Library", "Saved Application State", "com.cursor.Cursor.savedState"), + os.path.join(home, "Library", "HTTPStorages", "com.cursor.Cursor"), + os.path.join(home, "Library", "WebKit", "com.cursor.Cursor"), + # os.path.join(home, ".vscode"), # Removed to avoid affecting VS Code + "/Applications/Cursor.app", # Main application location + ] + + # Additional locations for license/trial files on macOS + license_search_paths = [ + os.path.join(home, "Library", "Application Support"), + os.path.join(home, "Library", "Preferences"), + os.path.join(home, "Library", "Caches"), ] elif system == "Linux": cursor_paths = [ os.path.join(home, ".config", "Cursor"), + os.path.join(home, ".config", "cursor-electron"), os.path.join(home, ".cache", "Cursor"), + os.path.join(home, ".cache", "cursor-electron"), os.path.join(home, ".local", "share", "Cursor"), - os.path.join(home, ".vscode"), # Cursor sometimes stores extensions here + os.path.join(home, ".local", "share", "cursor-electron"), + # os.path.join(home, ".vscode"), # Removed to avoid affecting VS Code + os.path.join(home, ".local", "share", "applications", "cursor.desktop"), + os.path.join("/usr", "share", "applications", "cursor.desktop"), + os.path.join("/opt", "Cursor"), + ] + + # Additional locations for license/trial files on Linux + license_search_paths = [ + os.path.join(home, ".config"), + os.path.join(home, ".local", "share"), + os.path.join(home, ".cache"), ] else: print("❌ Unsupported OS. Exiting.") return + # Remove main Cursor directories + print("\n🔄 Removing main Cursor directories and files...\n") for path in cursor_paths: remove_dir(path) - # Remove potential files that store trial/activation data - cursor_trial_paths = [ - os.path.join(home, ".cursor_trial_data"), - os.path.join(home, "AppData", "Local", "Cursor", "trial_info.json"), # Windows - os.path.join(home, "Library", "Application Support", "Cursor", "trial_info.json"), # macOS - os.path.join(home, ".config", "Cursor", "trial_info.json"), # Linux + # Reset machine identifiers (this creates new ones) + reset_machine_id(system, home) + + # Known trial/license file patterns + file_patterns = [ + ".cursor_trial_data", + "trial_info.json", + "license.json", + "cursor-license", + "cursor_license", + "cursor-auth", + "cursor_auth", + "cursor_subscription", + "cursor-subscription", + "cursor-state", + "cursorstate", + "cursorsettings", + "cursor-settings", + "ai-settings.json", + "cursor-machine-id", + "cursor_machine_id", + "cursor-storage" ] - print("\n🔄 Removing trial data and license information...\n") - for path in cursor_trial_paths: - if os.path.isfile(path): - try: - os.remove(path) - print(f"[✅] Deleted file: {path}") - except Exception as e: - print(f"[❌] Error deleting file {path}: {str(e)}") - else: - remove_dir(path) # In case it's a directory + # Direct known trial file paths + cursor_trial_files = [ + os.path.join(home, ".cursor_trial_data"), + os.path.join(home, ".cursor_license"), + os.path.join(home, ".cursor-machine-id"), + os.path.join(home, ".cursor-state.json"), + ] - print("\n✅ Cursor AI has been fully reset! Restart your system for changes to take effect.") - print(" You will need to reinstall and reconfigure Cursor AI.") - print(" If you encounter any issues, contact Prathmesh on Discord: prathmesh_pro\n") + # OS-specific known trial/license files + if system == "Windows": + cursor_trial_files.extend([ + os.path.join(home, "AppData", "Local", "Cursor", "trial_info.json"), + os.path.join(home, "AppData", "Local", "Cursor", "license.json"), + os.path.join(home, "AppData", "Roaming", "Cursor", "trial_info.json"), + os.path.join(home, "AppData", "Roaming", "Cursor", "license.json"), + os.path.join(home, "AppData", "Roaming", "Cursor", "cursor-machine-id"), + os.path.join(home, "AppData", "Local", "Cursor", "cursor-machine-id"), + os.path.join(home, "AppData", "Local", "Cursor", "ai-settings.json"), + os.path.join(home, "AppData", "Roaming", "Cursor", "ai-settings.json"), + ]) + elif system == "Darwin": # macOS + cursor_trial_files.extend([ + os.path.join(home, "Library", "Application Support", "Cursor", "trial_info.json"), + os.path.join(home, "Library", "Application Support", "Cursor", "license.json"), + os.path.join(home, "Library", "Preferences", "Cursor", "trial_info.json"), + os.path.join(home, "Library", "Preferences", "Cursor", "license.json"), + os.path.join(home, "Library", "Application Support", "Cursor", "cursor-machine-id"), + os.path.join(home, "Library", "Application Support", "Cursor", "ai-settings.json"), + ]) + elif system == "Linux": + cursor_trial_files.extend([ + os.path.join(home, ".config", "Cursor", "trial_info.json"), + os.path.join(home, ".config", "Cursor", "license.json"), + os.path.join(home, ".local", "share", "Cursor", "trial_info.json"), + os.path.join(home, ".local", "share", "Cursor", "license.json"), + os.path.join(home, ".config", "Cursor", "cursor-machine-id"), + os.path.join(home, ".config", "Cursor", "ai-settings.json"), + ]) + + # Remove known trial/license files + print("\n🔄 Removing known trial data and license information...\n") + for path in cursor_trial_files: + remove_file(path) + + # Deep search for additional trial/license files + print("\n🔍 Performing deep scan for additional Cursor license files...\n") + all_found_files = [] + for base_path in license_search_paths: + if os.path.exists(base_path): + found_files = find_cursor_license_files(base_path, file_patterns) + all_found_files.extend(found_files) + + if all_found_files: + print(f"\n🔎 Found {len(all_found_files)} additional potential license/trial files:\n") + for file_path in all_found_files: + remove_file(file_path) + else: + print("\n🔎 No additional license/trial files found in deep scan.\n") + + # Check for and remove localStorage files that might contain settings + print("\n🔄 Checking for Electron localStorage files...\n") + if system == "Windows": + local_storage_paths = glob.glob(os.path.join(home, "AppData", "Roaming", "*cursor*", "Local Storage", "leveldb", "*")) + local_storage_paths += glob.glob(os.path.join(home, "AppData", "Local", "*cursor*", "Local Storage", "leveldb", "*")) + elif system == "Darwin": + local_storage_paths = glob.glob(os.path.join(home, "Library", "Application Support", "*cursor*", "Local Storage", "leveldb", "*")) + elif system == "Linux": + local_storage_paths = glob.glob(os.path.join(home, ".config", "*cursor*", "Local Storage", "leveldb", "*")) + + for path in local_storage_paths: + if is_cursor_related(path): + remove_file(path) + + # Create new trial files with extended expiration + print("\n🔄 Creating new trial information with extended period...\n") + if system == "Windows": + create_fake_trial_info(os.path.join(home, "AppData", "Local", "Cursor", "trial_info.json"), system, home) + create_fake_trial_info(os.path.join(home, "AppData", "Roaming", "Cursor", "trial_info.json"), system, home) + elif system == "Darwin": + create_fake_trial_info(os.path.join(home, "Library", "Application Support", "Cursor", "trial_info.json"), system, home) + elif system == "Linux": + create_fake_trial_info(os.path.join(home, ".config", "Cursor", "trial_info.json"), system, home) + + print("\n✅ Cursor AI has been fully reset and trial detection bypassed!") + print(" Please restart your system for changes to take effect.") + print(" You will need to reinstall Cursor AI and should now have a fresh trial period.") + + print("\n💡 For best results, consider also:") + print(" 1. Use a different email address when registering for a new trial") + print(" 2. If available, use a VPN to change your IP address") + print(" 3. Clear your browser cookies and cache before visiting Cursor AI's website") + print(" 4. If issues persist, try installing Cursor AI in a different location") + + print("\n If you encounter any issues, contact Prathmesh on Discord: prathmesh_pro\n") if __name__ == "__main__": try: @@ -130,4 +471,5 @@ if __name__ == "__main__": sys.exit(1) except Exception as e: print(f"\n❌ An unexpected error occurred: {str(e)}\n") + print(" Please report this issue to Prathmesh on Discord: prathmesh_pro") sys.exit(1) From 21ca0a6b2d885341d8cb9642bc08a93330548d40 Mon Sep 17 00:00:00 2001 From: BasaiCorp Date: Sun, 16 Mar 2025 09:44:31 +0530 Subject: [PATCH 4/5] CLI Interface update --- locales/en.json | 3 ++- locales/vi.json | 5 +++-- locales/zh_cn.json | 3 ++- locales/zh_tw.json | 5 +++-- main.py | 7 ++++++- totally_reset_cursor.py | 12 ++++++++++++ 6 files changed, 28 insertions(+), 7 deletions(-) diff --git a/locales/en.json b/locales/en.json index 27c27a9..58b285f 100644 --- a/locales/en.json +++ b/locales/en.json @@ -15,7 +15,8 @@ "error_occurred": "An error occurred: {error}. Please try again", "press_enter": "Press Enter to Exit", "disable_auto_update": "Disable Cursor Auto-Update", - "lifetime_access_enabled": "LIFETIME ACCESS ENABLED" + "lifetime_access_enabled": "LIFETIME ACCESS ENABLED", + "totally_reset": "Totally Reset Cursor" }, "languages": { "en": "English", diff --git a/locales/vi.json b/locales/vi.json index f96a245..f345fd3 100644 --- a/locales/vi.json +++ b/locales/vi.json @@ -12,8 +12,9 @@ "program_terminated": "Chương trình đã bị người dùng chấm dứt", "error_occurred": "Đã xảy ra lỗi: {error}. Vui lòng thử lại", "press_enter": "Nhấn Enter để Thoát", - "disable_auto_update": "Tắt Tự Động Cập Nhật Cursor", - "lifetime_access_enabled": "LIFETIME ACCESS ENABLED" + "disable_auto_update": "Tắt tự động cập nhật Cursor", + "lifetime_access_enabled": "ĐÃ BẬT TRUY CẬP TRỌN ĐỜI", + "totally_reset": "Đặt lại hoàn toàn Cursor" }, "languages": { "en": "English", diff --git a/locales/zh_cn.json b/locales/zh_cn.json index e59477a..7a6b41b 100644 --- a/locales/zh_cn.json +++ b/locales/zh_cn.json @@ -15,7 +15,8 @@ "error_occurred": "发生错误:{error},请重试", "press_enter": "按回车键退出", "disable_auto_update": "禁用 Cursor 自动更新", - "lifetime_access_enabled": "永久订阅" + "lifetime_access_enabled": "永久订阅", + "totally_reset": "完全重置 Cursor" }, "languages": { "en": "English", diff --git a/locales/zh_tw.json b/locales/zh_tw.json index 0aed4ca..de13caa 100644 --- a/locales/zh_tw.json +++ b/locales/zh_tw.json @@ -12,8 +12,9 @@ "program_terminated": "程式已被使用者終止", "error_occurred": "發生錯誤:{error},請重試", "press_enter": "按返回鍵退出", - "disable_auto_update": "停用 Cursor 自動更新", - "lifetime_access_enabled": "永久訂閱" + "disable_auto_update": "禁用 Cursor 自動更新", + "lifetime_access_enabled": "終身訪問已啟用", + "totally_reset": "完全重置 Cursor" }, "languages": { "en": "English", diff --git a/main.py b/main.py index 1e6b9e9..b7568ec 100644 --- a/main.py +++ b/main.py @@ -227,6 +227,7 @@ def print_menu(): print(f"{Fore.GREEN}6{Style.RESET_ALL}. {EMOJI['ERROR']} {translator.get('menu.quit')}") print(f"{Fore.GREEN}7{Style.RESET_ALL}. {EMOJI['LANG']} {translator.get('menu.select_language')}") print(f"{Fore.GREEN}8{Style.RESET_ALL}. {EMOJI['UPDATE']} {translator.get('menu.disable_auto_update')}") + print(f"{Fore.GREEN}9{Style.RESET_ALL}. {EMOJI['RESET']} {translator.get('menu.totally_reset')}") print(f"{Fore.YELLOW}{'─' * 40}{Style.RESET_ALL}") def select_language(): @@ -386,7 +387,7 @@ def main(): while True: try: - choice = input(f"\n{EMOJI['ARROW']} {Fore.CYAN}{translator.get('menu.input_choice', choices='0-8')}: {Style.RESET_ALL}") + choice = input(f"\n{EMOJI['ARROW']} {Fore.CYAN}{translator.get('menu.input_choice', choices='0-9')}: {Style.RESET_ALL}") if choice == "0": print(f"\n{Fore.YELLOW}{EMOJI['INFO']} {translator.get('menu.exit')}...{Style.RESET_ALL}") @@ -424,6 +425,10 @@ def main(): import disable_auto_update disable_auto_update.run(translator) print_menu() + elif choice == "9": + import totally_reset_cursor + totally_reset_cursor.run(translator) + print_menu() else: print(f"{Fore.RED}{EMOJI['ERROR']} {translator.get('menu.invalid_choice')}{Style.RESET_ALL}") print_menu() diff --git a/totally_reset_cursor.py b/totally_reset_cursor.py index 8792cff..de10f8d 100644 --- a/totally_reset_cursor.py +++ b/totally_reset_cursor.py @@ -473,3 +473,15 @@ if __name__ == "__main__": print(f"\n❌ An unexpected error occurred: {str(e)}\n") print(" Please report this issue to Prathmesh on Discord: prathmesh_pro") sys.exit(1) + +def run(translator=None): + """Entry point for the totally reset cursor functionality when called from the main menu.""" + try: + reset_cursor() + input("\nPress Enter to return to main menu...") + except KeyboardInterrupt: + print("\n\n🛑 Process interrupted by user. Returning to main menu...\n") + except Exception as e: + print(f"\n❌ An unexpected error occurred: {str(e)}\n") + print(" Please report this issue to Prathmesh on Discord: prathmesh_pro") + input("\nPress Enter to return to main menu...") From 60ff9897f3678d601fac07cef1b61f8392dc8a9d Mon Sep 17 00:00:00 2001 From: yeongpin Date: Sun, 16 Mar 2025 12:45:27 +0800 Subject: [PATCH 5/5] Update version to 1.7.10 and enhance totally_reset_cursor.py with multi-language support and new features. Update CHANGELOG.md to reflect changes. --- .env | 4 +- CHANGELOG.md | 4 + locales/en.json | 91 ++++++++++++++++++++++ locales/vi.json | 91 ++++++++++++++++++++++ locales/zh_cn.json | 91 ++++++++++++++++++++++ locales/zh_tw.json | 93 +++++++++++++++++++++- totally_reset_cursor.py | 166 +++++++++++++++++++++++----------------- 7 files changed, 465 insertions(+), 75 deletions(-) diff --git a/.env b/.env index 9d710a4..e50c01b 100644 --- a/.env +++ b/.env @@ -1,2 +1,2 @@ -version=1.7.09 -VERSION=1.7.09 +version=1.7.10 +VERSION=1.7.10 diff --git a/CHANGELOG.md b/CHANGELOG.md index 23eb6d5..84a704e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## v1.7.10 ( Pre - Release 版本 ) +1. Add: Totally Reset Cursor | 增加完全重置 Cursor +2. Add: Multi-language Support for Totally Reset | 增加完全重置多語言支持 + ## v1.7.09 1. Add: Development Version Check | 增加開發版本檢查 2. Remove: Github Trial Reset | 移除 Github 試用重置 diff --git a/locales/en.json b/locales/en.json index 58b285f..d70d636 100644 --- a/locales/en.json +++ b/locales/en.json @@ -282,5 +282,96 @@ "update_skipped": "Skipping update.", "invalid_choice": "Invalid choice. Please enter 'Y' or 'n'.", "development_version": "Development Version {current} > {latest}" + }, + "totally_reset": { + "title": "Totally Reset Cursor", + "checking_config": "Checking Config File", + "config_not_found": "Config File Not Found", + "no_permission": "Cannot Read or Write Config File, Please Check File Permissions", + "reading_config": "Reading Current Config", + "creating_backup": "Creating Config Backup", + "backup_exists": "Backup File Already Exists, Skipping Backup Step", + "generating_new_machine_id": "Generating New Machine ID", + "saving_new_config": "Saving New Config to JSON", + "success": "Cursor Reset Successfully", + "error": "Cursor Reset Failed: {error}", + "press_enter": "Press Enter to Exit", + "reset_machine_id": "Reset Machine ID", + "database_connection_closed": "Database Connection Closed", + "database_updated_successfully": "Database Updated Successfully", + "connected_to_database": "Connected to Database", + "updating_pair": "Updating Key-Value Pair", + "db_not_found": "Database file not found at: {path}", + "db_permission_error": "Cannot access database file. Please check permissions", + "db_connection_error": "Failed to connect to database: {error}", + "feature_title": "FEATURES", + "feature_1": "Complete removal of Cursor AI settings and configurations", + "feature_2": "Clears all cached data including AI history and prompts", + "feature_3": "Resets machine ID to bypass trial detection", + "feature_4": "Creates new randomized machine identifiers", + "feature_5": "Removes custom extensions and preferences", + "feature_6": "Resets trial information and activation data", + "feature_7": "Deep scan for hidden license and trial-related files", + "feature_8": "Safely preserves non-Cursor files and applications", + "feature_9": "Compatible with Windows, macOS, and Linux", + "disclaimer_title": "DISCLAIMER", + "disclaimer_1": "This tool will permanently delete all Cursor AI settings,", + "disclaimer_2": "configurations, and cached data. This action cannot be undone.", + "disclaimer_3": "Your code files will NOT be affected, and the tool is designed", + "disclaimer_4": "to only target Cursor AI editor files and trial detection mechanisms.", + "disclaimer_5": "Other applications on your system will not be affected.", + "disclaimer_6": "You will need to set up Cursor AI again after running this tool.", + "disclaimer_7": "Use at your own risk", + "confirm_title": "Are you sure you want to proceed?", + "confirm_1": "This action will delete all Cursor AI settings,", + "confirm_2": "configurations, and cached data. This action cannot be undone.", + "confirm_3": "Your code files will NOT be affected, and the tool is designed", + "confirm_4": "to only target Cursor AI editor files and trial detection mechanisms.", + "confirm_5": "Other applications on your system will not be affected.", + "confirm_6": "You will need to set up Cursor AI again after running this tool.", + "confirm_7": "Use at your own risk", + "invalid_choice": "Please enter 'Y' or 'n'", + "skipped_for_safety": "Skipped for safety (not Cursor-related): {path}", + "deleted": "Deleted: {path}", + "error_deleting": "Error deleting {path}: {error}", + "not_found": "File not found: {path}", + "resetting_machine_id": "Resetting machine identifiers to bypass trial detection...", + "created_machine_id": "Created new machine ID: {path}", + "error_creating_machine_id": "Error creating machine ID file {path}: {error}", + "error_searching": "Error searching for files in {path}: {error}", + "created_extended_trial_info": "Created new extended trial info: {path}", + "error_creating_trial_info": "Error creating trial info file {path}: {error}", + "resetting_cursor_ai_editor": "Resetting Cursor AI Editor... Please wait.", + "reset_cancelled": "Reset cancelled. Exiting without making any changes.", + "windows_machine_id_modification_skipped": "Windows machine ID modification skipped: {error}", + "linux_machine_id_modification_skipped": "Linux machine-id modification skipped: {error}", + "note_complete_machine_id_reset_may_require_running_as_administrator": "Note: Complete machine ID reset may require running as administrator", + "note_complete_system_machine_id_reset_may_require_sudo_privileges": "Note: Complete system machine-id reset may require sudo privileges", + "windows_registry_instructions": "📝 NOTE: For complete reset on Windows, you might also need to clean registry entries.", + "windows_registry_instructions_2": " Run 'regedit' and search for keys containing 'Cursor' or 'CursorAI' under HKEY_CURRENT_USER\\Software\\ and delete them.\n", + "reset_log_1": "Cursor AI has been fully reset and trial detection bypassed!", + "reset_log_2": "Please restart your system for changes to take effect.", + "reset_log_3": "You will need to reinstall Cursor AI and should now have a fresh trial period.", + "reset_log_4": "For best results, consider also:", + "reset_log_5": "Use a different email address when registering for a new trial", + "reset_log_6": "If available, use a VPN to change your IP address", + "reset_log_7": "Clear your browser cookies and cache before visiting Cursor AI's website", + "reset_log_8": "If issues persist, try installing Cursor AI in a different location", + "reset_log_9": "If you encounter any issues, go to Github Issue Tracker and create an issue at https://github.com/yeongpin/cursor-free-vip/issues", + "unexpected_error": "An unexpected error occurred: {error}", + "report_issue": "Please report this issue to Github Issue Tracker at https://github.com/yeongpin/cursor-free-vip/issues", + "keyboard_interrupt": "Process interrupted by user. Exiting...", + "return_to_main_menu": "Returning to main menu...", + "process_interrupted": "Process interrupted. Exiting...", + "press_enter_to_return_to_main_menu": "Press Enter to return to main menu...", + "removing_known": "Removing known trial/license files", + "performing_deep_scan": "Performing deep scan for additional trial/license files", + "found_additional_potential_license_trial_files": "Found {count} additional potential license/trial files", + "checking_for_electron_localstorage_files": "Checking for Electron localStorage files", + "no_additional_license_trial_files_found_in_deep_scan": "No additional license/trial files found in deep scan", + "removing_electron_localstorage_files": "Removing Electron localStorage files", + "electron_localstorage_files_removed": "Electron localStorage files removed", + "electron_localstorage_files_removal_error": "Error removing Electron localStorage files: {error}", + "removing_electron_localstorage_files_completed": "Electron localStorage files removal completed" } } \ No newline at end of file diff --git a/locales/vi.json b/locales/vi.json index f345fd3..f4752b4 100644 --- a/locales/vi.json +++ b/locales/vi.json @@ -280,5 +280,96 @@ "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}" + }, + "totally_reset": { + "title": "Đặt lại hoàn toàn Cursor", + "checking_config": "Đang kiểm tra tệp cấu hình", + "config_not_found": "Không tìm thấy tệp cấu hình", + "no_permission": "Không thể đọc hoặc ghi tệp cấu hình, vui lòng kiểm tra quyền tệp", + "reading_config": "Đang đọc cấu hình hiện tại", + "creating_backup": "Đang tạo bản sao lưu cấu hình", + "backup_exists": "Tệp sao lưu đã tồn tại, bỏ qua bước sao lưu", + "generating_new_machine_id": "Đang tạo ID máy mới", + "saving_new_config": "Đang lưu cấu hình mới vào JSON", + "success": "Đặt lại Cursor thành công", + "error": "Đặt lại Cursor thất bại: {error}", + "press_enter": "Nhấn Enter để thoát", + "reset_machine_id": "Đặt lại ID máy", + "database_connection_closed": "Kết nối cơ sở dữ liệu đã đóng", + "database_updated_successfully": "Cập nhật cơ sở dữ liệu thành công", + "connected_to_database": "Đã kết nối với cơ sở dữ liệu", + "updating_pair": "Đang cập nhật cặp khóa-giá trị", + "db_not_found": "Không tìm thấy tệp cơ sở dữ liệu tại: {path}", + "db_permission_error": "Không thể truy cập tệp cơ sở dữ liệu, vui lòng kiểm tra quyền", + "db_connection_error": "Kết nối cơ sở dữ liệu thất bại: {error}", + "feature_title": "TÍNH NĂNG", + "feature_1": "Xóa hoàn toàn các cài đặt và cấu hình của Cursor AI", + "feature_2": "Xóa tất cả dữ liệu bộ nhớ đệm bao gồm lịch sử và gợi ý AI", + "feature_3": "Đặt lại ID máy để vượt qua kiểm tra dùng thử", + "feature_4": "Tạo định danh máy ngẫu nhiên mới", + "feature_5": "Xóa tiện ích mở rộng và tùy chỉnh", + "feature_6": "Đặt lại thông tin dùng thử và dữ liệu kích hoạt", + "feature_7": "Quét sâu các tệp ẩn liên quan đến giấy phép và dùng thử", + "feature_8": "Bảo toàn các tệp và ứng dụng không liên quan đến Cursor", + "feature_9": "Tương thích với Windows, macOS và Linux", + "disclaimer_title": "LƯU Ý", + "disclaimer_1": "Công cụ này sẽ xóa vĩnh viễn tất cả cài đặt,", + "disclaimer_2": "cấu hình và dữ liệu bộ nhớ đệm của Cursor AI. Thao tác này không thể hoàn tác.", + "disclaimer_3": "Tệp mã nguồn của bạn sẽ KHÔNG bị ảnh hưởng, công cụ chỉ nhắm đến", + "disclaimer_4": "các tệp chỉnh sửa Cursor AI và cơ chế kiểm tra dùng thử.", + "disclaimer_5": "Các ứng dụng khác trên hệ thống của bạn sẽ không bị ảnh hưởng.", + "disclaimer_6": "Bạn sẽ cần thiết lập lại Cursor AI sau khi chạy công cụ này.", + "disclaimer_7": "Sử dụng dưới sự tự chịu trách nhiệm", + "confirm_title": "Bạn có chắc chắn muốn tiếp tục không?", + "confirm_1": "Hành động này sẽ xóa tất cả cài đặt,", + "confirm_2": "cấu hình và dữ liệu bộ nhớ đệm của Cursor AI. Hành động này không thể hoàn tác.", + "confirm_3": "Tệp mã nguồn của bạn sẽ KHÔNG bị ảnh hưởng, công cụ chỉ nhắm đến", + "confirm_4": "các tệp chỉnh sửa Cursor AI và cơ chế kiểm tra dùng thử.", + "confirm_5": "Các ứng dụng khác trên hệ thống của bạn sẽ không bị ảnh hưởng.", + "confirm_6": "Bạn sẽ cần thiết lập lại Cursor AI sau khi chạy công cụ này.", + "confirm_7": "Sử dụng dưới sự tự chịu trách nhiệm", + "invalid_choice": "Vui lòng nhập 'Y' hoặc 'n'", + "skipped_for_safety": "Bỏ qua vì an toàn (không liên quan đến Cursor): {path}", + "deleted": "Đã xóa: {path}", + "error_deleting": "Lỗi khi xóa {path}: {error}", + "not_found": "Không tìm thấy tệp: {path}", + "resetting_machine_id": "Đang đặt lại ID máy để vượt qua kiểm tra dùng thử...", + "created_machine_id": "Đã tạo ID máy mới: {path}", + "error_creating_machine_id": "Lỗi khi tạo tệp ID máy {path}: {error}", + "error_searching": "Lỗi khi tìm kiếm tệp trong {path}: {error}", + "created_extended_trial_info": "Đã tạo thông tin dùng thử mở rộng mới: {path}", + "error_creating_trial_info": "Lỗi khi tạo tệp thông tin dùng thử {path}: {error}", + "resetting_cursor_ai_editor": "Đang đặt lại Cursor AI Editor... Vui lòng chờ.", + "reset_cancelled": "Đã hủy đặt lại. Thoát mà không thực hiện thay đổi nào.", + "windows_machine_id_modification_skipped": "Bỏ qua sửa đổi ID máy Windows: {error}", + "linux_machine_id_modification_skipped": "Bỏ qua sửa đổi machine-id Linux: {error}", + "note_complete_machine_id_reset_may_require_running_as_administrator": "Lưu ý: Đặt lại ID máy hoàn toàn có thể yêu cầu chạy dưới quyền quản trị viên", + "note_complete_system_machine_id_reset_may_require_sudo_privileges": "Lưu ý: Đặt lại machine-id hệ thống hoàn toàn có thể yêu cầu quyền sudo", + "windows_registry_instructions": "📝 LƯU Ý: Để đặt lại hoàn toàn trên Windows, bạn có thể cần dọn dẹp các mục registry.", + "windows_registry_instructions_2": " Chạy 'regedit' và tìm kiếm khóa chứa 'Cursor' hoặc 'CursorAI' dưới HKEY_CURRENT_USER\\Software\\ và xóa chúng.\n", + "reset_log_1": "Cursor AI đã được đặt lại hoàn toàn và vượt qua kiểm tra dùng thử!", + "reset_log_2": "Vui lòng khởi động lại hệ thống để thay đổi có hiệu lực.", + "reset_log_3": "Bạn cần cài đặt lại Cursor AI và sẽ có kỳ dùng thử mới.", + "reset_log_4": "Để có kết quả tốt nhất, bạn có thể cân nhắc:", + "reset_log_5": "Sử dụng địa chỉ email khác khi đăng ký dùng thử mới", + "reset_log_6": "Nếu có thể, sử dụng VPN để thay đổi địa chỉ IP", + "reset_log_7": "Xóa cookie và bộ nhớ cache trình duyệt trước khi truy cập trang web Cursor AI", + "reset_log_8": "Nếu vẫn gặp sự cố, hãy thử cài Cursor AI vào vị trí khác", + "reset_log_9": "Nếu gặp bất kỳ vấn đề nào, hãy truy cập Github Issue Tracker và tạo issue tại https://github.com/yeongpin/cursor-free-vip/issues", + "unexpected_error": "Đã xảy ra lỗi không mong muốn: {error}", + "report_issue": "Vui lòng báo cáo sự cố này tại Github Issue Tracker: https://github.com/yeongpin/cursor-free-vip/issues", + "keyboard_interrupt": "Quá trình bị người dùng hủy. Đang thoát...", + "return_to_main_menu": "Trở về menu chính...", + "process_interrupted": "Quá trình bị gián đoạn. Đang thoát...", + "press_enter_to_return_to_main_menu": "Nhấn Enter để trở về menu chính...", + "removing_known": "Đang xóa các tệp thử nghiệm/giấy phép đã biết", + "performing_deep_scan": "Đang quét sâu để tìm thêm tệp thử nghiệm/giấy phép", + "found_additional_potential_license_trial_files": "Đã tìm thấy {count} tệp thử nghiệm/giấy phép tiềm năng bổ sung", + "checking_for_electron_localstorage_files": "Đang kiểm tra các tệp Electron localStorage", + "no_additional_license_trial_files_found_in_deep_scan": "Không tìm thấy thêm tệp thử nghiệm/giấy phép nào trong quá trình quét sâu", + "removing_electron_localstorage_files": "Đang xóa các tệp Electron localStorage", + "electron_localstorage_files_removed": "Đã xóa các tệp Electron localStorage", + "electron_localstorage_files_removal_error": "Lỗi khi xóa các tệp Electron localStorage: {error}", + "removing_electron_localstorage_files_completed": "Đã hoàn tất việc xóa các tệp Electron localStorage" } } \ No newline at end of file diff --git a/locales/zh_cn.json b/locales/zh_cn.json index 7a6b41b..b1ad1bd 100644 --- a/locales/zh_cn.json +++ b/locales/zh_cn.json @@ -278,5 +278,96 @@ "update_skipped": "跳过更新。", "invalid_choice": "选择无效。请输入 'Y' 或 'n'.", "development_version": "开发版本 {current} > {latest}" + }, + "totally_reset": { + "title": "完全重置 Cursor", + "checking_config": "正在检查配置文件", + "config_not_found": "未找到配置文件", + "no_permission": "无法读取或写入配置文件,请检查文件权限", + "reading_config": "正在读取当前配置", + "creating_backup": "正在创建配置备份", + "backup_exists": "备份文件已存在,跳过备份步骤", + "generating_new_machine_id": "正在生成新的机器 ID", + "saving_new_config": "正在将新配置保存为 JSON", + "success": "Cursor 重置成功", + "error": "Cursor 重置失败:{error}", + "press_enter": "按回车键退出", + "reset_machine_id": "重置机器 ID", + "database_connection_closed": "数据库连接已关闭", + "database_updated_successfully": "数据库更新成功", + "connected_to_database": "已连接到数据库", + "updating_pair": "正在更新键值对", + "db_not_found": "未找到数据库文件,路径:{path}", + "db_permission_error": "无法访问数据库文件,请检查权限", + "db_connection_error": "连接数据库失败:{error}", + "feature_title": "功能介绍", + "feature_1": "完全移除 Cursor AI 设置和配置", + "feature_2": "清除所有缓存数据,包括 AI 历史记录和提示", + "feature_3": "重置机器 ID 以绕过试用检测", + "feature_4": "创建新的随机机器标识符", + "feature_5": "移除自定义扩展和偏好设置", + "feature_6": "重置试用信息和激活数据", + "feature_7": "深度扫描隐藏的授权和试用相关文件", + "feature_8": "安全保留非 Cursor 文件和应用程序", + "feature_9": "兼容 Windows、macOS 和 Linux", + "disclaimer_title": "免责声明", + "disclaimer_1": "该工具将永久删除所有 Cursor AI 设置、", + "disclaimer_2": "配置和缓存数据。此操作无法撤销。", + "disclaimer_3": "您的代码文件 **不会** 受到影响,工具设计为", + "disclaimer_4": "仅针对 Cursor AI 编辑器文件和试用检测机制。", + "disclaimer_5": "系统中的其他应用程序不会受到影响。", + "disclaimer_6": "运行此工具后,您需要重新设置 Cursor AI。", + "disclaimer_7": "请自行承担风险", + "confirm_title": "您确定要继续吗?", + "confirm_1": "该操作将删除所有 Cursor AI 设置、", + "confirm_2": "配置和缓存数据。此操作无法撤销。", + "confirm_3": "您的代码文件 **不会** 受到影响,工具设计为", + "confirm_4": "仅针对 Cursor AI 编辑器文件和试用检测机制。", + "confirm_5": "系统中的其他应用程序不会受到影响。", + "confirm_6": "运行此工具后,您需要重新设置 Cursor AI。", + "confirm_7": "请自行承担风险", + "invalid_choice": "请输入 'Y' 或 'n'", + "skipped_for_safety": "出于安全原因跳过(非 Cursor 相关):{path}", + "deleted": "已删除:{path}", + "error_deleting": "删除 {path} 时出错:{error}", + "not_found": "未找到文件:{path}", + "resetting_machine_id": "正在重置机器 ID 以绕过试用检测...", + "created_machine_id": "已创建新的机器 ID:{path}", + "error_creating_machine_id": "创建机器 ID 文件 {path} 时出错:{error}", + "error_searching": "在 {path} 搜索文件时出错:{error}", + "created_extended_trial_info": "已创建新的扩展试用信息:{path}", + "error_creating_trial_info": "创建试用信息文件 {path} 时出错:{error}", + "resetting_cursor_ai_editor": "正在重置 Cursor AI 编辑器... 请稍候。", + "reset_cancelled": "重置已取消,未进行任何更改。", + "windows_machine_id_modification_skipped": "跳过 Windows 机器 ID 修改:{error}", + "linux_machine_id_modification_skipped": "跳过 Linux machine-id 修改:{error}", + "note_complete_machine_id_reset_may_require_running_as_administrator": "注意:完整的机器 ID 重置可能需要以管理员身份运行", + "note_complete_system_machine_id_reset_may_require_sudo_privileges": "注意:完整的系统 machine-id 重置可能需要 sudo 权限", + "windows_registry_instructions": "📝 注意:在 Windows 上进行完整重置,您可能还需要清理注册表项。", + "windows_registry_instructions_2": " 运行 'regedit' 并搜索 HKEY_CURRENT_USER\\Software\\ 下包含 'Cursor' 或 'CursorAI' 的键并删除它们。\n", + "reset_log_1": "Cursor AI 已完全重置并绕过试用检测!", + "reset_log_2": "请重启系统以使更改生效。", + "reset_log_3": "您需要重新安装 Cursor AI,现在应该有一个新的试用期。", + "reset_log_4": "为了获得最佳效果,建议还可以:", + "reset_log_5": "注册新试用时使用不同的邮箱地址", + "reset_log_6": "如果可能,使用 VPN 更改 IP 地址", + "reset_log_7": "访问 Cursor AI 网站前清除浏览器的 Cookie 和缓存", + "reset_log_8": "如果仍有问题,尝试将 Cursor AI 安装到不同位置", + "reset_log_9": "如遇到任何问题,请到 Github Issue Tracker 提交问题:https://github.com/yeongpin/cursor-free-vip/issues", + "unexpected_error": "发生意外错误:{error}", + "report_issue": "请在 Github Issue Tracker 报告此问题:https://github.com/yeongpin/cursor-free-vip/issues", + "keyboard_interrupt": "用户中断进程,正在退出...", + "return_to_main_menu": "返回主菜单...", + "process_interrupted": "进程已中断,正在退出...", + "press_enter_to_return_to_main_menu": "按回车键返回主菜单...", + "removing_known": "正在移除已知的试用/授权文件", + "performing_deep_scan": "正在进行深度扫描以查找其他试用/授权文件", + "found_additional_potential_license_trial_files": "发现 {count} 个其他潜在的试用/授权文件", + "checking_for_electron_localstorage_files": "正在检查 Electron localStorage 文件", + "no_additional_license_trial_files_found_in_deep_scan": "深度扫描中未发现其他试用/授权文件", + "removing_electron_localstorage_files": "正在移除 Electron localStorage 文件", + "electron_localstorage_files_removed": "Electron localStorage 文件已移除", + "electron_localstorage_files_removal_error": "移除 Electron localStorage 文件时出错:{error}", + "removing_electron_localstorage_files_completed": "Electron localStorage 文件移除完成" } } \ No newline at end of file diff --git a/locales/zh_tw.json b/locales/zh_tw.json index de13caa..65b8189 100644 --- a/locales/zh_tw.json +++ b/locales/zh_tw.json @@ -258,5 +258,96 @@ "update_skipped": "跳過更新。", "invalid_choice": "選擇無效。請輸入 'Y' 或 'n'.", "development_version": "開發版本 {current} > {latest}" - } + }, + "totally_reset": { + "title": "完全重置 Cursor", + "checking_config": "正在檢查配置檔案", + "config_not_found": "找不到配置檔案", + "no_permission": "無法讀取或寫入配置檔案,請檢查檔案權限", + "reading_config": "正在讀取當前配置", + "creating_backup": "正在建立配置備份", + "backup_exists": "備份檔案已存在,跳過備份步驟", + "generating_new_machine_id": "正在生成新的機器 ID", + "saving_new_config": "正在將新配置保存到 JSON", + "success": "Cursor 重置成功", + "error": "Cursor 重置失敗:{error}", + "press_enter": "按 Enter 鍵退出", + "reset_machine_id": "重置機器 ID", + "database_connection_closed": "資料庫連線已關閉", + "database_updated_successfully": "資料庫更新成功", + "connected_to_database": "已連接到資料庫", + "updating_pair": "正在更新鍵值對", + "db_not_found": "未找到資料庫檔案,路徑:{path}", + "db_permission_error": "無法訪問資料庫檔案,請檢查權限", + "db_connection_error": "連接資料庫失敗:{error}", + "feature_title": "功能特色", + "feature_1": "完全移除 Cursor AI 設定與配置", + "feature_2": "清除所有快取資料,包括 AI 歷史與提示", + "feature_3": "重置機器 ID 以繞過試用偵測", + "feature_4": "建立新的隨機機器標識", + "feature_5": "移除自訂擴充功能與偏好設定", + "feature_6": "重置試用資訊與啟動資料", + "feature_7": "深度掃描隱藏的授權與試用相關檔案", + "feature_8": "安全保留非 Cursor 相關檔案與應用程式", + "feature_9": "相容於 Windows、macOS 與 Linux", + "disclaimer_title": "免責聲明", + "disclaimer_1": "此工具將永久刪除所有 Cursor AI 設定、", + "disclaimer_2": "配置與快取資料。此操作無法還原。", + "disclaimer_3": "您的程式碼檔案將 **不會** 受到影響,且此工具僅針對", + "disclaimer_4": "Cursor AI 編輯器檔案與試用偵測機制。", + "disclaimer_5": "系統中的其他應用程式不會受到影響。", + "disclaimer_6": "執行此工具後,您需要重新設定 Cursor AI。", + "disclaimer_7": "請自行承擔風險", + "confirm_title": "您確定要繼續嗎?", + "confirm_1": "此操作將刪除所有 Cursor AI 設定、", + "confirm_2": "配置與快取資料。此操作無法還原。", + "confirm_3": "您的程式碼檔案將 **不會** 受到影響,且此工具僅針對", + "confirm_4": "Cursor AI 編輯器檔案與試用偵測機制。", + "confirm_5": "系統中的其他應用程式不會受到影響。", + "confirm_6": "執行此工具後,您需要重新設定 Cursor AI。", + "confirm_7": "請自行承擔風險", + "invalid_choice": "請輸入 'Y' 或 'n'", + "skipped_for_safety": "出於安全考量跳過(與 Cursor 無關):{path}", + "deleted": "已刪除:{path}", + "error_deleting": "刪除 {path} 時出錯:{error}", + "not_found": "未找到檔案:{path}", + "resetting_machine_id": "正在重置機器 ID 以繞過試用偵測...", + "created_machine_id": "已建立新的機器 ID:{path}", + "error_creating_machine_id": "建立機器 ID 檔案 {path} 時出錯:{error}", + "error_searching": "在 {path} 搜尋檔案時出錯:{error}", + "created_extended_trial_info": "已建立新的擴展試用資訊:{path}", + "error_creating_trial_info": "建立試用資訊檔案 {path} 時出錯:{error}", + "resetting_cursor_ai_editor": "正在重置 Cursor AI 編輯器... 請稍候。", + "reset_cancelled": "重置已取消,未進行任何更改。", + "windows_machine_id_modification_skipped": "跳過 Windows 機器 ID 修改:{error}", + "linux_machine_id_modification_skipped": "跳過 Linux machine-id 修改:{error}", + "note_complete_machine_id_reset_may_require_running_as_administrator": "注意:完整的機器 ID 重置可能需要以管理員身份執行", + "note_complete_system_machine_id_reset_may_require_sudo_privileges": "注意:完整的系統 machine-id 重置可能需要 sudo 權限", + "windows_registry_instructions": "📝 注意:在 Windows 上進行完整重置,您可能還需要清理登錄檔項目。", + "windows_registry_instructions_2": " 執行 'regedit' 並搜尋 HKEY_CURRENT_USER\\Software\\ 下包含 'Cursor' 或 'CursorAI' 的鍵並刪除它們。\n", + "reset_log_1": "Cursor AI 已完全重置並繞過試用偵測!", + "reset_log_2": "請重新啟動系統以使更改生效。", + "reset_log_3": "您需要重新安裝 Cursor AI,現在應該有全新的試用期。", + "reset_log_4": "為獲得最佳效果,建議還可以:", + "reset_log_5": "註冊新試用時使用不同的電子郵件地址", + "reset_log_6": "若有可能,使用 VPN 變更 IP 地址", + "reset_log_7": "在造訪 Cursor AI 網站前清除瀏覽器的 Cookie 與快取", + "reset_log_8": "若仍有問題,嘗試將 Cursor AI 安裝到不同位置", + "reset_log_9": "若遇到任何問題,請到 Github Issue Tracker 提交問題:https://github.com/yeongpin/cursor-free-vip/issues", + "unexpected_error": "發生非預期錯誤:{error}", + "report_issue": "請在 Github Issue Tracker 回報此問題:https://github.com/yeongpin/cursor-free-vip/issues", + "keyboard_interrupt": "使用者中斷流程,正在退出...", + "return_to_main_menu": "返回主選單...", + "process_interrupted": "流程已中斷,正在退出...", + "press_enter_to_return_to_main_menu": "按 Enter 鍵返回主選單...", + "removing_known": "正在移除已知的試用/授權檔案", + "performing_deep_scan": "正在進行深度掃描以查找其他試用/授權檔案", + "found_additional_potential_license_trial_files": "找到 {count} 個其他潛在試用/授權檔案", + "checking_for_electron_localstorage_files": "正在檢查 Electron localStorage 檔案", + "no_additional_license_trial_files_found_in_deep_scan": "深度掃描中未發現其他試用/授權檔案", + "removing_electron_localstorage_files": "正在移除 Electron localStorage 檔案", + "electron_localstorage_files_removed": "已移除 Electron localStorage 檔案", + "electron_localstorage_files_removal_error": "移除 Electron localStorage 檔案時出錯:{error}", + "removing_electron_localstorage_files_completed": "Electron localStorage 檔案移除完成" + } } \ No newline at end of file diff --git a/totally_reset_cursor.py b/totally_reset_cursor.py index de10f8d..5711cf6 100644 --- a/totally_reset_cursor.py +++ b/totally_reset_cursor.py @@ -11,80 +11,103 @@ import string import re from datetime import datetime import subprocess +from colorama import Fore, Style, init +from main import translator +from main import EMOJI + +# Initialize colorama +init() + +# Define emoji and color constants +EMOJI = { + "FILE": "📄", + "BACKUP": "💾", + "SUCCESS": "✅", + "ERROR": "❌", + "INFO": "ℹ️", + "RESET": "🔄", + "MENU": "📋", + "ARROW": "➜", + "LANG": "🌐", + "UPDATE": "🔄", + "ADMIN": "🔐", + "STOP": "🛑", + "DISCLAIMER": "⚠️", + "WARNING": "⚠️" +} def display_banner(): """Displays a stylized banner for the tool.""" - print("\n" + "="*70) - print(" CURSOR AI RESET TOOL") - print(" Developed by Prathmesh (Discord: prathmesh_pro)") - print("="*70 + "\n") + print(f"\n{Fore.CYAN}{'='*50}{Style.RESET_ALL}") + print(f"{Fore.CYAN}{EMOJI['STOP']} {translator.get('totally_reset.title')} {Style.RESET_ALL}") + print(f"{Fore.CYAN}{'='*50}{Style.RESET_ALL}") def display_features(): """Displays the features of the Cursor AI Reset Tool.""" - print("\n📋 FEATURES:") - print(" • Complete removal of Cursor AI settings and configurations") - print(" • Clears all cached data including AI history and prompts") - print(" • Resets machine ID to bypass trial detection") - print(" • Creates new randomized machine identifiers") - print(" • Removes custom extensions and preferences") - print(" • Resets trial information and activation data") - print(" • Deep scan for hidden license and trial-related files") - print(" • Safely preserves non-Cursor files and applications") - print(" • Compatible with Windows, macOS, and Linux\n") + print(f"\n{Fore.CYAN}{EMOJI['MENU']} {translator.get('totally_reset.feature_title')}{Style.RESET_ALL}") + print(f"{Fore.CYAN}{EMOJI['INFO']} {translator.get('totally_reset.feature_1')} {Style.RESET_ALL}") + print(f"{Fore.CYAN}{EMOJI['INFO']} {translator.get('totally_reset.feature_2')} {Style.RESET_ALL}") + print(f"{Fore.CYAN}{EMOJI['INFO']} {translator.get('totally_reset.feature_3')} {Style.RESET_ALL}") + print(f"{Fore.CYAN}{EMOJI['INFO']} {translator.get('totally_reset.feature_4')} {Style.RESET_ALL}") + print(f"{Fore.CYAN}{EMOJI['INFO']} {translator.get('totally_reset.feature_5')} {Style.RESET_ALL}") + print(f"{Fore.CYAN}{EMOJI['INFO']} {translator.get('totally_reset.feature_6')} {Style.RESET_ALL}") + print(f"{Fore.CYAN}{EMOJI['INFO']} {translator.get('totally_reset.feature_7')} {Style.RESET_ALL}") + print(f"{Fore.CYAN}{EMOJI['INFO']} {translator.get('totally_reset.feature_8')} {Style.RESET_ALL}") + print(f"{Fore.CYAN}{EMOJI['INFO']} {translator.get('totally_reset.feature_9')} {Style.RESET_ALL}\n") def display_disclaimer(): """Displays a disclaimer for the user.""" - print("\n⚠️ DISCLAIMER:") - print(" This tool will permanently delete all Cursor AI settings,") - print(" configurations, and cached data. This action cannot be undone.") - print(" Your code files will NOT be affected, and the tool is designed") - print(" to only target Cursor AI editor files and trial detection mechanisms.") - print(" Other applications on your system will not be affected.") - print(" You will need to set up Cursor AI again after running this tool.") - print(" Use at your own risk.\n") + print(f"\n{Fore.RED}{EMOJI['DISCLAIMER']} {translator.get('totally_reset.disclaimer_title')}{Style.RESET_ALL}") + print(f"{Fore.RED}{EMOJI['INFO']} {translator.get('totally_reset.disclaimer_1')} {Style.RESET_ALL}") + print(f"{Fore.RED}{EMOJI['INFO']} {translator.get('totally_reset.disclaimer_2')} {Style.RESET_ALL}") + print(f"{Fore.RED}{EMOJI['INFO']} {translator.get('totally_reset.disclaimer_3')} {Style.RESET_ALL}") + print(f"{Fore.RED}{EMOJI['INFO']} {translator.get('totally_reset.disclaimer_4')} {Style.RESET_ALL}") + print(f"{Fore.RED}{EMOJI['INFO']} {translator.get('totally_reset.disclaimer_5')} {Style.RESET_ALL}") + print(f"{Fore.RED}{EMOJI['INFO']} {translator.get('totally_reset.disclaimer_6')} {Style.RESET_ALL}") + print(f"{Fore.RED}{EMOJI['INFO']} {translator.get('totally_reset.disclaimer_7')} {Style.RESET_ALL} \n") def get_confirmation(): """Gets confirmation from the user to proceed.""" while True: - choice = input("⚠️ Do you want to proceed with resetting Cursor AI? (Y/n): ").strip().lower() + choice = input(f"{Fore.RED}{EMOJI['WARNING']} {translator.get('totally_reset.confirm_title')} (Y/n): ").strip().lower() if choice == "y" or choice == "": return True elif choice == "n": return False else: - print("Please enter 'Y' or 'n'") + print(f"{EMOJI['ERROR']} {translator.get('totally_reset.invalid_choice')}") def remove_dir(path): """Removes a directory if it exists and logs the action.""" # Safety check to ensure we're only deleting Cursor-related directories if not is_cursor_related(path): - print(f"[⚠️] Skipped for safety (not Cursor-related): {path}") + print(f"{Fore.RED}{EMOJI['WARNING']} {translator.get('totally_reset.skipped_for_safety', path=path)} {Style.RESET_ALL}") return if os.path.exists(path): try: shutil.rmtree(path, ignore_errors=True) - print(f"[✅] Deleted: {path}") + print(f"{Fore.GREEN}{EMOJI['SUCCESS']} {translator.get('totally_reset.deleted', path=path)} {Style.RESET_ALL}") except Exception as e: - print(f"[❌] Error deleting {path}: {str(e)}") + print(f"{Fore.RED}{EMOJI['ERROR']} {translator.get('totally_reset.error_deleting', path=path, error=str(e))} {Style.RESET_ALL}") else: - print(f"[ℹ️] Not Found: {path}") + print(f"{Fore.RED}{EMOJI['INFO']} {translator.get('totally_reset.not_found', path=path)} {Style.RESET_ALL}") def remove_file(path): """Removes a file if it exists and logs the action.""" # Safety check to ensure we're only deleting Cursor-related files if not is_cursor_related(path): - print(f"[⚠️] Skipped for safety (not Cursor-related): {path}") + print(f"{Fore.RED}{EMOJI['WARNING']} {translator.get('totally_reset.skipped_for_safety', path=path)} {Style.RESET_ALL}") return if os.path.isfile(path): try: os.remove(path) - print(f"[✅] Deleted file: {path}") + print(f"{Fore.GREEN}{EMOJI['SUCCESS']} {translator.get('totally_reset.deleted', path=path)} {Style.RESET_ALL}") except Exception as e: - print(f"[❌] Error deleting file {path}: {str(e)}") + print(f"{Fore.RED}{EMOJI['ERROR']} {translator.get('totally_reset.error_deleting', path=path, error=str(e))} {Style.RESET_ALL}") else: - print(f"[ℹ️] File not found: {path}") + print(f"{Fore.RED}{EMOJI['INFO']} {translator.get('totally_reset.not_found', path=path)} {Style.RESET_ALL}") def is_cursor_related(path): """ @@ -146,7 +169,7 @@ def find_cursor_license_files(base_path, pattern): matches.append(full_path) return matches except Exception as e: - print(f"[ℹ️] Error searching for files in {base_path}: {str(e)}") + print(f"{Fore.RED}{EMOJI['INFO']} {translator.get('totally_reset.error_searching', path=base_path, error=str(e))} {Style.RESET_ALL}") return [] def generate_new_machine_id(): @@ -168,13 +191,13 @@ def create_fake_machine_id(path): with open(path, 'w') as f: f.write(new_id) - print(f"[✅] Created new machine ID: {path}") + print(f"{Fore.GREEN}{EMOJI['SUCCESS']} {translator.get('totally_reset.created_machine_id', path=path)} {Style.RESET_ALL}") except Exception as e: - print(f"[❌] Error creating machine ID file {path}: {str(e)}") + print(f"{Fore.RED}{EMOJI['ERROR']} {translator.get('totally_reset.error_creating_machine_id', path=path, error=str(e))} {Style.RESET_ALL}") def reset_machine_id(system, home): """Resets machine ID in all possible locations.""" - print("\n🔄 Resetting machine identifiers to bypass trial detection...\n") + print(f"\n{Fore.CYAN}{EMOJI['RESET']} {translator.get('totally_reset.resetting_machine_id')} {Style.RESET_ALL}") # Common machine ID locations based on OS if system == "Windows": @@ -210,16 +233,16 @@ def reset_machine_id(system, home): if system == "Windows": try: # Windows: Create a temporary VBS script to reset machine GUID - print("[ℹ️] Note: Complete machine ID reset may require running as administrator") + print(f"{Fore.RED}{EMOJI['INFO']} {translator.get('totally_reset.note_complete_machine_id_reset_may_require_running_as_administrator')} {Style.RESET_ALL}") except Exception as e: - print(f"[ℹ️] Windows machine ID modification skipped: {str(e)}") + print(f"{Fore.RED}{EMOJI['INFO']} {translator.get('totally_reset.windows_machine_id_modification_skipped', error=str(e))} {Style.RESET_ALL}") elif system == "Linux": try: # Linux: Create a random machine-id in /etc/ (needs sudo) - print("[ℹ️] Note: Complete system machine-id reset may require sudo privileges") + print(f"{Fore.RED}{EMOJI['INFO']} {translator.get('totally_reset.note_complete_system_machine_id_reset_may_require_sudo_privileges')} {Style.RESET_ALL}") except Exception as e: - print(f"[ℹ️] Linux machine-id modification skipped: {str(e)}") + print(f"{Fore.RED}{EMOJI['INFO']} {translator.get('totally_reset.linux_machine_id_modification_skipped', error=str(e))} {Style.RESET_ALL}") def create_fake_trial_info(path, system, home): """Creates fake trial information to extend trial period.""" @@ -246,9 +269,9 @@ def create_fake_trial_info(path, system, home): with open(path, 'w') as f: json.dump(fake_trial, f) - print(f"[✅] Created extended trial info: {path}") + print(f"{Fore.GREEN}{EMOJI['SUCCESS']} {translator.get('totally_reset.created_extended_trial_info', path=path)} {Style.RESET_ALL}") except Exception as e: - print(f"[❌] Error creating trial info file {path}: {str(e)}") + print(f"{Fore.RED}{EMOJI['ERROR']} {translator.get('totally_reset.error_creating_trial_info', path=path, error=str(e))} {Style.RESET_ALL}") def reset_cursor(): """Completely resets Cursor AI by removing all settings, caches, and extensions.""" @@ -260,10 +283,10 @@ def reset_cursor(): display_disclaimer() if not get_confirmation(): - print("\n🛑 Reset cancelled. Exiting without making any changes.\n") + print(f"\n{Fore.CYAN}{EMOJI['STOP']} {translator.get('totally_reset.reset_cancelled')} {Style.RESET_ALL}") return - print("\n🚀 Resetting Cursor AI Editor... Please wait.\n") + print(f"\n{Fore.CYAN}{EMOJI['RESET']} {translator.get('totally_reset.resetting_cursor_ai_editor')} {Style.RESET_ALL}") # Define paths based on OS if system == "Windows": @@ -288,9 +311,8 @@ def reset_cursor(): ] # Registry instructions for Windows - print("\n📝 NOTE: For complete reset on Windows, you might also need to clean registry entries.") - print(" Run 'regedit' and search for keys containing 'Cursor' or 'CursorAI'") - print(" under HKEY_CURRENT_USER\\Software\\ and delete them.\n") + print(f"\n{Fore.CYAN}{EMOJI['INFO']} {translator.get('totally_reset.windows_registry_instructions')} {Style.RESET_ALL}") + print(f"{Fore.CYAN}{EMOJI['INFO']} {translator.get('totally_reset.windows_registry_instructions_2')} {Style.RESET_ALL}") elif system == "Darwin": # macOS cursor_paths = [ @@ -336,11 +358,11 @@ def reset_cursor(): ] else: - print("❌ Unsupported OS. Exiting.") + print(f"{Fore.RED}{EMOJI['ERROR']} {translator.get('totally_reset.unsupported_os')} {Style.RESET_ALL}") return # Remove main Cursor directories - print("\n🔄 Removing main Cursor directories and files...\n") + print(f"\n{Fore.CYAN}{EMOJI['RESET']} {translator.get('totally_reset.removing_main_cursor_directories_and_files')} {Style.RESET_ALL}") for path in cursor_paths: remove_dir(path) @@ -408,12 +430,12 @@ def reset_cursor(): ]) # Remove known trial/license files - print("\n🔄 Removing known trial data and license information...\n") + print(f"\n{Fore.CYAN}{EMOJI['RESET']} {translator.get('totally_reset.removing_known')} {Style.RESET_ALL}") for path in cursor_trial_files: remove_file(path) # Deep search for additional trial/license files - print("\n🔍 Performing deep scan for additional Cursor license files...\n") + print(f"\n{Fore.CYAN}{EMOJI['RESET']} {translator.get('totally_reset.performing_deep_scan')} {Style.RESET_ALL}") all_found_files = [] for base_path in license_search_paths: if os.path.exists(base_path): @@ -421,14 +443,14 @@ def reset_cursor(): all_found_files.extend(found_files) if all_found_files: - print(f"\n🔎 Found {len(all_found_files)} additional potential license/trial files:\n") + print(f"\n🔎 {translator.get('totally_reset.found_additional_potential_license_trial_files', count=len(all_found_files))}\n") for file_path in all_found_files: remove_file(file_path) else: - print("\n🔎 No additional license/trial files found in deep scan.\n") + print(f"\n{Fore.CYAN}{EMOJI['INFO']} {translator.get('totally_reset.no_additional_license_trial_files_found_in_deep_scan')} {Style.RESET_ALL}") # Check for and remove localStorage files that might contain settings - print("\n🔄 Checking for Electron localStorage files...\n") + print(f"\n{Fore.CYAN}{EMOJI['RESET']} {translator.get('totally_reset.checking_for_electron_localstorage_files')} {Style.RESET_ALL}") if system == "Windows": local_storage_paths = glob.glob(os.path.join(home, "AppData", "Roaming", "*cursor*", "Local Storage", "leveldb", "*")) local_storage_paths += glob.glob(os.path.join(home, "AppData", "Local", "*cursor*", "Local Storage", "leveldb", "*")) @@ -442,7 +464,7 @@ def reset_cursor(): remove_file(path) # Create new trial files with extended expiration - print("\n🔄 Creating new trial information with extended period...\n") + print(f"\n{Fore.CYAN}{EMOJI['RESET']} {translator.get('totally_reset.creating_new_trial_information_with_extended_period')} {Style.RESET_ALL}") if system == "Windows": create_fake_trial_info(os.path.join(home, "AppData", "Local", "Cursor", "trial_info.json"), system, home) create_fake_trial_info(os.path.join(home, "AppData", "Roaming", "Cursor", "trial_info.json"), system, home) @@ -451,37 +473,37 @@ def reset_cursor(): elif system == "Linux": create_fake_trial_info(os.path.join(home, ".config", "Cursor", "trial_info.json"), system, home) - print("\n✅ Cursor AI has been fully reset and trial detection bypassed!") - print(" Please restart your system for changes to take effect.") - print(" You will need to reinstall Cursor AI and should now have a fresh trial period.") + print(f"\n{Fore.GREEN}{EMOJI['SUCCESS']} {translator.get('totally_reset.reset_log_1')}") + print(f" {translator.get('totally_reset.reset_log_2')}") + print(f" {translator.get('totally_reset.reset_log_3')}") - print("\n💡 For best results, consider also:") - print(" 1. Use a different email address when registering for a new trial") - print(" 2. If available, use a VPN to change your IP address") - print(" 3. Clear your browser cookies and cache before visiting Cursor AI's website") - print(" 4. If issues persist, try installing Cursor AI in a different location") + print(f"\n{Fore.GREEN}{EMOJI['INFO']} {translator.get('totally_reset.reset_log_4')} {Style.RESET_ALL}") + print(f" {translator.get('totally_reset.reset_log_5')} {Style.RESET_ALL}") + print(f" {translator.get('totally_reset.reset_log_6')} {Style.RESET_ALL}") + print(f" {translator.get('totally_reset.reset_log_7')} {Style.RESET_ALL}") + print(f" {translator.get('totally_reset.reset_log_8')} {Style.RESET_ALL}") - print("\n If you encounter any issues, contact Prathmesh on Discord: prathmesh_pro\n") + print(f"\n{Fore.RED}{EMOJI['INFO']} {translator.get('totally_reset.reset_log_9')} {Style.RESET_ALL}") if __name__ == "__main__": try: reset_cursor() except KeyboardInterrupt: - print("\n\n🛑 Process interrupted by user. Exiting...\n") + print(f"\n\n{Fore.RED}{EMOJI['STOP']} {translator.get('totally_reset.keyboard_interrupt')} {Style.RESET_ALL}") sys.exit(1) except Exception as e: - print(f"\n❌ An unexpected error occurred: {str(e)}\n") - print(" Please report this issue to Prathmesh on Discord: prathmesh_pro") + print(f"\n{Fore.RED}{EMOJI['ERROR']} {translator.get('totally_reset.unexpected_error', error=str(e))}{Style.RESET_ALL}") + print(f" {translator.get('totally_reset.report_issue')}") sys.exit(1) def run(translator=None): """Entry point for the totally reset cursor functionality when called from the main menu.""" try: reset_cursor() - input("\nPress Enter to return to main menu...") + input(f"\n\n{Fore.CYAN}{EMOJI['INFO']} {translator.get('totally_reset.return_to_main_menu')} {Style.RESET_ALL}") except KeyboardInterrupt: - print("\n\n🛑 Process interrupted by user. Returning to main menu...\n") + print(f"\n\n{Fore.RED}{EMOJI['STOP']} {translator.get('totally_reset.process_interrupted')} {Style.RESET_ALL}") except Exception as e: - print(f"\n❌ An unexpected error occurred: {str(e)}\n") - print(" Please report this issue to Prathmesh on Discord: prathmesh_pro") - input("\nPress Enter to return to main menu...") + print(f"\n{Fore.RED}{EMOJI['ERROR']} {translator.get('totally_reset.unexpected_error', error=str(e))}{Style.RESET_ALL}") + print(f" {translator.get('totally_reset.report_issue')}") + input(f"\n{Fore.CYAN}{EMOJI['INFO']} {translator.get('totally_reset.press_enter_to_return_to_main_menu')} {Style.RESET_ALL}")