├── README.md
├── README_CN.md
├── README_EN.md
├── cursor-help.ps1
└── cursor-help.sh
/README.md:
--------------------------------------------------------------------------------
1 | # 🚀 Инструмент для сброса пробного периода Cursor
2 |
3 |
4 |
5 | [](https://github.com/Nikitosshow/cursor-help/releases/latest)
6 | 
7 |
8 | ### 🌐 Переводы
9 | [⭐ English](README_EN.md) | [⭐ 中文](README_CN.md) | [⭐ Русский](README.md)
10 |
11 |

12 |
13 |
14 |
15 | > 💖 **Поддержите наши проекты!**
16 | >
17 | > Посетите и зарегистрируйтесь на наших сайтах:
18 | > - [assets-hub.ru](https://assets-hub.ru) - Бесплатные ассеты и ресурсы
19 | > - [exmodium.ru](https://exmodium.ru) - Чит для Deadlock
20 | >
21 | > Ваша поддержка помогает нам развивать проекты!
22 |
23 | > ⚠️ **ВАЖНОЕ УВЕДОМЛЕНИЕ**
24 | >
25 | > Этот инструмент поддерживает:
26 | > - ✅ Cursor версии 0.45.x и ниже
27 | > - ✅ Последние версии 0.47.x
28 | >
29 | > Пожалуйста, проверьте версию Cursor перед использованием этого инструмента.
30 |
31 | > 💾 **Скачать Cursor v0.44.11**
32 | > - [Скачать с официального сайта Cursor](https://downloader.cursor.sh/builds/250103fqxdt5u9z/windows/nsis/x64)
33 | > - [Скачать с ToDesktop](https://download.todesktop.com/230313mzl4w4u92/Cursor%20Setup%200.44.11%20-%20Build%20250103fqxdt5u9z-x64.exe)
34 | ---
35 | 
36 |
37 | ### 📝 Описание
38 |
39 | > Когда вы сталкиваетесь с одним из этих сообщений:
40 |
41 | #### Проблема 1: Лимит пробной учетной записи 
42 | ```
43 | Слишком много пробных учетных записей использовано на этом устройстве.
44 | Пожалуйста, перейдите на Pro. Мы установили этот лимит,
45 | чтобы предотвратить злоупотребления. Пожалуйста, сообщите нам,
46 | если вы считаете, что это ошибка.
47 | ```
48 |
49 | #### Проблема 2: Ограничение API-ключа 
50 | ```
51 | [Новая проблема]
52 |
53 | Composer использует пользовательские модели, которые не могут быть оплачены с помощью API-ключа.
54 | Пожалуйста, отключите API-ключи и используйте подписку Pro или Business.
55 | ID запроса: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
56 | ```
57 |
58 | #### Проблема 3: Лимит пробных запросов
59 |
60 | > Это указывает на то, что вы достигли лимита использования в течение пробного VIP-периода:
61 |
62 | ```
63 | Вы достигли лимита пробных запросов.
64 | ```
65 |
66 |
67 |
68 |
69 |
70 | #### Решение: Полностью удалите Cursor и переустановите (Проблема с API-ключом)
71 |
72 | 1. Скачайте [Geek.exe Uninstaller[Бесплатно]](https://geekuninstaller.com/download)
73 | 2. Полностью удалите приложение Cursor
74 | 3. Переустановите приложение Cursor
75 | 4. Перейдите к Решению 1
76 |
77 |
78 |
79 |
80 |
81 | > Временное решение:
82 |
83 | #### Решение 1: Быстрый сброс (Рекомендуется)
84 |
85 | 1. Скачайте послежнюю версию cursor_bypass в [releases](github.com/Nikitosshow/cursor-help/releases)
86 | 2. Выйдите из текущего аккаунта
87 | 3. Запустите cursor_bypass.exe
88 | 4. Нажмите кнопку Обход для сброса
89 | 5. Запустите Cursor и войдите в новый аккаунт
90 |
91 | ### 💻 Поддержка систем
92 |
93 |
94 |
95 |
96 |
97 | **Windows** ✅
98 |
99 | - x64 (64-бит)
100 | - x86 (32-бит)
101 |
102 | |
103 |
104 |
105 |
106 | #### Особенности установки на Windows:
107 |
108 | - 🔍 Автоматическое обнаружение
109 | - 💡 Предоставляет ручные инструкции, если повышение прав не удалось
110 | - 💡 Вы можете использовать быстрый скрипт с помощью powershell
111 |
112 | #### Как запустить с помощью PowerShell
113 |
114 | 1. Запустите PowerShell от имени администратора
115 | 2. Скопируйте скрипт ниже и вставьте его
116 | 3. Запустите выберите язык и скрипт сам все сделает
117 | 4. Можно отключить авто обновления или оставить как есть
118 | ```
119 | irm https://raw.githubusercontent.com/Nikitosshow/cursor-help/refs/heads/main/cursor-help.ps1 | iex
120 | ```
121 | Вот и все! Скрипт:
122 |
123 | 1. ✨ Установит инструмент автоматически
124 | 2. 🔄 Сбросит ваш пробный период Cursor сразу же
125 |
126 | ### 📦 Ручная установка
127 |
128 | > Скачайте соответствующий файл для вашей системы из [релизов](https://github.com/Nikitosshow/cursor-help/releases/latest)
129 |
130 |
131 | Пакеты для Windows
132 |
133 | - 64-бит
134 | - 32-бит
135 |
136 |
137 |
138 |
139 | ### 🔧 Технические детали
140 |
141 |
142 | Конфигурационные файлы
143 |
144 | Программа изменяет файл конфигурации Cursor storage.json, расположенный по адресу:
145 |
146 | - Windows: %APPDATA%\Cursor\User\globalStorage\storage.json
147 |
148 |
149 |
150 | Измененные поля
151 |
152 | Инструмент генерирует новые уникальные идентификаторы для:
153 |
154 | - telemetry.machineId
155 | - telemetry.macMachineId
156 | - telemetry.devDeviceId
157 | - telemetry.sqmId
158 |
159 |
160 |
161 | Ручное отключение автообновления
162 |
163 | Пользователи Windows могут вручную отключить функцию автообновления:
164 |
165 | 1. Закройте все процессы Cursor
166 | 2. Удалите директорию: C:\Users\username\AppData\Local\cursor-updater
167 | 3. Создайте файл с тем же именем: cursor-updater (без расширения)
168 |
169 | Пользователи macOS/Linux могут попытаться найти аналогичную директорию cursor-updater в своей системе и выполнить те же действия.
170 |
171 |
172 |
173 |
174 | Функции безопасности
175 |
176 | - ✅ Безопасное завершение процессов
177 | - ✅ Атомарные операции с файлами
178 | - ✅ Обработка ошибок и восстановление
179 |
180 |
--------------------------------------------------------------------------------
/README_CN.md:
--------------------------------------------------------------------------------
1 | # 🚀 Cursor 免费试用重置工具
2 |
3 |
4 |
5 | [](https://github.com/Nikitosshow/cursor-help/releases/latest)
6 | 
7 |
8 | ### 🌐 翻译
9 | [⭐ English](README_EN.md) | [⭐ 中文](README_CN.md) | [⭐ Русский](README.md)
10 |
11 |

12 |
13 |
14 |
15 | > 💖 **支持我们的项目!**
16 | >
17 | > 访问并注册我们的网站:
18 | > - [assets-hub.ru](https://assets-hub.ru) - 免费资源和素材
19 | > - [exmodium.ru](https://exmodium.ru) - 死锁游戏的作弊工具
20 | >
21 | > 您的支持帮助我们发展项目!
22 |
23 | > ⚠️ **重要通知**
24 | >
25 | > 此工具目前支持:
26 | > - ✅ Cursor v0.45.x 及以下版本
27 | > - ✅ 最新的 0.47.x 版本
28 | >
29 | > 使用此工具前请检查您的 Cursor 版本。
30 |
31 | > 💾 **下载 Cursor v0.44.11**
32 | > - [从 Cursor 官方下载](https://downloader.cursor.sh/builds/250103fqxdt5u9z/windows/nsis/x64)
33 | > - [从 ToDesktop 下载](https://download.todesktop.com/230313mzl4w4u92/Cursor%20Setup%200.44.11%20-%20Build%20250103fqxdt5u9z-x64.exe)
34 | ---
35 | 
36 |
37 | ### 📝 描述
38 |
39 | > 当您遇到以下任何一条消息时:
40 |
41 | #### 问题 1:试用账户限制 
42 | ```
43 | 此机器上使用了过多的免费试用账户。
44 | 请升级到 Pro。我们设置此限制
45 | 以防止滥用。如果您认为这是错误,
46 | 请告知我们
47 | ```
48 |
49 | #### 问题 2:API 密钥限制 
50 | ```
51 | [新问题]
52 |
53 | Composer 依赖于无法通过 API 密钥计费的自定义模型。
54 | 请禁用 API 密钥并使用 Pro 或 Business 订阅。
55 | 请求 ID:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
56 | ```
57 |
58 | #### 问题 3:试用请求限制
59 |
60 | > 这表示您在 VIP 免费试用期间已达到使用限制:
61 | ```
62 | 您已达到试用请求限制。
63 | ```
64 |
65 |
66 |
67 |
68 |
69 | #### 解决方案:完全卸载并重新安装 Cursor(API 密钥问题)
70 |
71 | 1. 下载 [Geek.exe 卸载工具[免费]](https://geekuninstaller.com/download)
72 | 2. 完全卸载 Cursor 应用程序
73 | 3. 重新安装 Cursor 应用程序
74 | 4. 继续到解决方案 1
75 |
76 |
77 |
78 |
79 |
80 | > 临时解决方案:
81 |
82 | #### 解决方案 1:快速重置(推荐)
83 |
84 | 1. 从 [发布页面](https://github.com/Nikitosshow/cursor-help/releases) 下载最新版本的 `cursor_bypass`
85 | 2. 退出当前账户
86 | 3. 运行 `cursor_bypass.exe`
87 | 4. 点击"绕过"按钮进行重置
88 | 5. 启动 Cursor 并使用新账户登录
89 |
90 | ### 💻 系统支持
91 |
92 |
93 |
94 |
95 |
96 | **Windows** ✅
97 |
98 | - x64 (64 位)
99 | - x86 (32 位)
100 |
101 | |
102 |
103 |
104 |
105 | #### Windows 安装特点:
106 | - 🔍 自动检测
107 | - 💡 如果权限提升失败,则提供手动安装说明
108 | - 💡 您可以使用 PowerShell 快速运行脚本
109 | 如何通过 PowerShell 运行
110 |
111 | #### 以管理员身份运行 PowerShell
112 | 1. 复制并粘贴下面的脚本
113 | 2. 运行脚本,选择语言,脚本将自动完成所有操作
114 | 3. 可以禁用自动更新或保持默认设置
115 | ```
116 | irm https://raw.githubusercontent.com/Nikitosshow/cursor-help/refs/heads/main/cursor-help.ps1 | iex
117 | ```
118 | 就是这样!脚本将:
119 |
120 | 1. ✨ 自动安装工具
121 | 2. 🔄 立即重置您的 Cursor 试用期
122 |
123 | ### 📦 手动安装
124 |
125 | > 从 [发布页面](https://github.com/Nikitosshow/cursor-help/releases/latest) 下载适合您系统的文件
126 |
127 |
128 | Windows 包
129 |
130 | - 64 位
131 | - 32 位
132 |
133 |
134 |
135 |
136 | ### 🔧 技术细节
137 |
138 |
139 | 配置文件
140 |
141 | 程序修改 Cursor 的 storage.json 配置文件,位于:
142 |
143 | - Windows:%APPDATA%\Cursor\User\globalStorage\storage.json
144 |
145 |
146 |
147 | 修改的字段
148 |
149 | 工具生成新的唯一标识符:
150 |
151 | - telemetry.machineId
152 | - telemetry.macMachineId
153 | - telemetry.devDeviceId
154 | - telemetry.sqmId
155 |
156 |
157 |
158 | 手动禁用自动更新
159 |
160 | Windows 用户可以手动禁用自动更新功能:
161 |
162 | 1. 关闭所有 Cursor 进程
163 | 2. 删除目录:C:\Users\username\AppData\Local\cursor-updater
164 | 3. 创建一个同名文件:cursor-updater(无扩展名)
165 |
166 | macOS/Linux 用户可以尝试在系统中找到类似的 cursor-updater 目录并执行相同的操作。
167 |
168 |
169 |
170 |
171 | 安全功能
172 |
173 | - ✅ 安全终止进程
174 | - ✅ 原子文件操作
175 | - ✅ 错误处理和恢复
176 |
177 |
--------------------------------------------------------------------------------
/README_EN.md:
--------------------------------------------------------------------------------
1 | # 🚀 Cursor Free Trial Reset Tool
2 |
3 |
4 |
5 | [](https://github.com/Nikitosshow/cursor-help/releases/latest)
6 | 
7 |
8 | ### 🌐 Translations
9 | [⭐ English](README_EN.md) | [⭐ 中文](README_CN.md) | [⭐ Русский](README.md)
10 |
11 |

12 |
13 |
14 |
15 | > 💖 **Support Our Projects!**
16 | >
17 | > Visit and register on our websites:
18 | > - [assets-hub.ru](https://assets-hub.ru) - Free assets and resources
19 | > - [exmodium.ru](https://exmodium.ru) - Cheat for game "DEADLOCK"
20 | >
21 | > Your support helps us develop our projects!
22 |
23 | > ⚠️ **IMPORTANT NOTICE**
24 | >
25 | > This tool currently supports:
26 | > - ✅ Cursor v0.45.x and below
27 | > - ✅ Latest 0.47.x versions
28 | >
29 | > Please check your Cursor version before using this tool.
30 |
31 | > 💾 **Download Cursor v0.44.11**
32 | > - [Download from Cursor Official](https://downloader.cursor.sh/builds/250103fqxdt5u9z/windows/nsis/x64)
33 | > - [Download from ToDesktop](https://download.todesktop.com/230313mzl4w4u92/Cursor%20Setup%200.44.11%20-%20Build%20250103fqxdt5u9z-x64.exe)
34 | ---
35 | 
36 |
37 |
38 | ### 📝 Description
39 |
40 | > When you encounter any of these messages:
41 |
42 | #### Issue 1: Trial Account Limit 
43 | ```
44 | Too many free trial accounts used on this machine.
45 | Please upgrade to Pro. We have this limit in place
46 | to prevent abuse. Please let us know if you believe
47 | this is a mistake.
48 | ```
49 |
50 | #### Issue 2: API Key Limitation 
51 | ```
52 | [New Issue]
53 |
54 | Composer relies on custom models that cannot be billed to an API key.
55 | Please disable API keys and use a Pro or Business subscription.
56 | Request ID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
57 | ```
58 |
59 | #### Issue 3: Trial Request Limit
60 |
61 | > This indicates you've reached the usage limit during the VIP free trial period:
62 | ```
63 | You've reached your trial request limit.
64 | ```
65 |
66 |
67 |
68 |
69 |
70 | #### Solution: Completely Uninstall and Reinstall Cursor (API Key Issue)
71 |
72 | 1. Download [Geek.exe Uninstaller[Free]](https://geekuninstaller.com/download)
73 | 2. Completely uninstall the Cursor app
74 | 3. Reinstall the Cursor app
75 | 4. Proceed to Solution 1
76 |
77 |
78 |
79 |
80 |
81 | > Temporary Solution:
82 |
83 | #### Solution 1: Quick Reset (Recommended)
84 |
85 | 1. Download the latest version of `cursor_bypass` from [releases](https://github.com/Nikitosshow/cursor-help/releases)
86 | 2. Sign out of your current account
87 | 3. Run `cursor_bypass.exe`
88 | 4. Click the "Bypass" button to reset
89 | 5. Launch Cursor and log in with a new account
90 |
91 | ### 💻 System Support
92 |
93 |
94 |
95 |
96 |
97 | **Windows** ✅
98 |
99 | - x64 (64-bit)
100 | - x86 (32-bit)
101 |
102 | |
103 |
104 |
105 |
106 | #### Installation Features on Windows:
107 | - 🔍 Automatic detection
108 | - 💡 Provides manual instructions if privilege escalation fails
109 | - 💡 You can use a quick script via PowerShell
110 |
111 | #### How to run via PowerShell
112 |
113 | 1. Run PowerShell as Administrator
114 | 2. Copy and paste the script below
115 | 3. Run it, select the language, and the script will do everything automatically
116 | 4. You can disable auto-updates or leave them enabled
117 | ```
118 | irm https://raw.githubusercontent.com/Nikitosshow/cursor-help/refs/heads/main/cursor-help.ps1 | iex
119 | ```
120 | That's it! The script will:
121 |
122 | 1. ✨ Install the tool automatically
123 | 2. 🔄 Reset your Cursor trial immediately
124 |
125 | ### 📦 Manual Installation
126 |
127 | > Download the appropriate file for your system from [releases](https://github.com/Nikitosshow/cursor-help/releases/latest)
128 |
129 |
130 | Windows Packages
131 |
132 | - 64-bit
133 | - 32-bit
134 |
135 |
136 |
137 |
138 | ### 🔧 Technical Details
139 |
140 |
141 | Configuration Files
142 |
143 | The program modifies Cursor's storage.json config file located at:
144 |
145 | - Windows: %APPDATA%\Cursor\User\globalStorage\storage.json
146 |
147 |
148 |
149 | Modified Fields
150 |
151 | The tool generates new unique identifiers for:
152 |
153 | - telemetry.machineId
154 | - telemetry.macMachineId
155 | - telemetry.devDeviceId
156 | - telemetry.sqmId
157 |
158 |
159 |
160 | Manual Auto-Update Disable
161 |
162 | Windows users can manually disable the auto-update feature:
163 |
164 | 1. Close all Cursor processes
165 | 2. Delete the directory: C:\Users\username\AppData\Local\cursor-updater
166 | 3. Create a file with the same name: cursor-updater (no extension)
167 |
168 | macOS/Linux users can try to locate a similar cursor-updater directory in their system and perform the same operation.
169 |
170 |
171 |
172 |
173 | Safety Features
174 |
175 | - ✅ Safe process termination
176 | - ✅ Atomic file operations
177 | - ✅ Error handling and recovery
178 |
179 |
--------------------------------------------------------------------------------
/cursor-help.ps1:
--------------------------------------------------------------------------------
1 | # Установка кодировки для поддержки Unicode
2 | [Console]::OutputEncoding = [System.Text.Encoding]::UTF8
3 | $OutputEncoding = [System.Text.Encoding]::UTF8
4 | $PSDefaultParameterValues['*:Encoding'] = 'utf8'
5 | $Host.UI.RawUI.WindowTitle = "Cursor Helper"
6 |
7 | # Настройка ANSI-цветов
8 | if ($PSVersionTable.PSVersion.Major -ge 7) {
9 | $PSStyle.OutputRendering = 'ANSI'
10 | $RED = "`e[31m"
11 | $GREEN = "`e[32m"
12 | $YELLOW = "`e[33m"
13 | $BLUE = "`e[34m"
14 | $NC = "`e[0m"
15 | } else {
16 | $RED = "$([char]0x1b)[31m"
17 | $GREEN = "$([char]0x1b)[32m"
18 | $YELLOW = "$([char]0x1b)[33m"
19 | $BLUE = "$([char]0x1b)[34m"
20 | $NC = "$([char]0x1b)[0m"
21 | }
22 |
23 | # Текущий язык (по умолчанию английский)
24 | $LANG_CHOICE = "en"
25 |
26 | # Функция перевода
27 | function Translate {
28 | param (
29 | [string]$key
30 | )
31 |
32 | switch ($LANG_CHOICE) {
33 | "ru" {
34 | switch ($key) {
35 | "info" { "[ИНФО]" }
36 | "warn" { "[ВНИМАНИЕ]" }
37 | "error" { "[ОШИБКА]" }
38 | "debug" { "[ОТЛАДКА]" }
39 | "get_user_error" { "Не удалось получить имя пользователя" }
40 | "run_with_admin" { "Запустите скрипт от имени администратора" }
41 | "example" { "Пример:" }
42 | "checking_cursor" { "Проверка процесса Cursor..." }
43 | "process_info" { "Получение информации о процессе" }
44 | "cursor_not_found" { "Процесс Cursor не найден" }
45 | "cursor_found" { "Найден запущенный процесс Cursor" }
46 | "killing_attempt" { "Попытка завершения процесса..." }
47 | "force_kill" { "Принудительное завершение..." }
48 | "cursor_killed" { "Процесс Cursor успешно завершен" }
49 | "waiting_termination" { "Ожидание завершения, попытка" }
50 | "kill_failed" { "Не удалось завершить процесс после" }
51 | "kill_manual" { "Завершите процесс вручную и повторите попытку" }
52 | "backup_skipped" { "Файл конфигурации не существует, пропуск резервного копирования" }
53 | "backup_created" { "Резервная копия создана:" }
54 | "backup_failed" { "Ошибка создания резервной копии" }
55 | "config_not_found" { "Файл конфигурации не найден:" }
56 | "install_first" { "Установите и запустите Cursor хотя бы раз" }
57 | "config_updated" { "Конфигурация обновлена:" }
58 | "rights_failed" { "Не удалось установить права только для чтения" }
59 | "rights_success" { "Права доступа установлены успешно" }
60 | "file_structure" { "Структура файлов:" }
61 | "modified" { "изменен" }
62 | "empty" { "пусто" }
63 | "follow_telegram" { "Подпишитесь на наш Telegram канал @exmodium" }
64 | "tool_name" { "Утилита обхода Cursor" }
65 | "important" { "ВАЖНО" }
66 | "version_support" { "Поддерживается текущая версия Cursor" }
67 | "version_not_support" { "" }
68 | "done" { "Готово!" }
69 | "restart_required" { "Перезапустите Cursor для применения изменений" }
70 | "disable_auto_update" { "Отключить автообновление Cursor?" }
71 | "no" { "Нет - оставить как есть (Enter)" }
72 | "yes" { "Да - отключить" }
73 | "disabling_update" { "Отключение автообновления..." }
74 | "manual_steps" { "Выполните следующие шаги вручную:" }
75 | "open_terminal" { "Откройте PowerShell от имени администратора" }
76 | "run_commands" { "Выполните команды:" }
77 | "if_no_rights" { "Если нет прав:" }
78 | "verification" { "Проверка:" }
79 | "check_rights" { "Убедитесь что файл только для чтения" }
80 | "restart_after" { "Перезапустите Cursor после выполнения" }
81 | "folder_deleted" { "Папка cursor-updater удалена" }
82 | "folder_delete_failed" { "Не удалось удалить папку cursor-updater" }
83 | "file_create_failed" { "Не удалось создать файл" }
84 | "rights_check_failed" { "Проверка прав не пройдена" }
85 | "update_disabled" { "Автообновление отключено" }
86 | "update_enabled" { "Автообновление оставлено включенным" }
87 | "current_machineguid" { "Текущий MachineGuid:" }
88 | "machineguid_updated" { "MachineGuid успешно обновлен на:" }
89 | default { "[$key]" }
90 | }
91 | }
92 | "zh" {
93 | switch ($key) {
94 | "info" { "[信息]" }
95 | "warn" { "[警告]" }
96 | "error" { "[错误]" }
97 | "debug" { "[调试]" }
98 | "get_user_error" { "无法获取用户名" }
99 | "run_with_admin" { "请以管理员身份运行此脚本" }
100 | "example" { "示例:" }
101 | "checking_cursor" { "检查 Cursor 进程..." }
102 | "process_info" { "获取进程信息" }
103 | "cursor_not_found" { "未发现 Cursor 进程" }
104 | "cursor_found" { "发现正在运行的 Cursor 进程" }
105 | "killing_attempt" { "尝试终止进程..." }
106 | "force_kill" { "强制终止..." }
107 | "cursor_killed" { "Cursor 进程已成功终止" }
108 | "waiting_termination" { "等待进程终止,尝试" }
109 | "kill_failed" { "在尝试后仍无法终止进程" }
110 | "kill_manual" { "请手动终止进程后重试" }
111 | "backup_skipped" { "配置文件不存在,跳过备份" }
112 | "backup_created" { "备份已创建:" }
113 | "backup_failed" { "备份创建失败" }
114 | "config_not_found" { "未找到配置文件:" }
115 | "install_first" { "请先安装并运行一次 Cursor" }
116 | "config_updated" { "配置已更新:" }
117 | "rights_failed" { "无法设置只读权限" }
118 | "rights_success" { "访问权限设置成功" }
119 | "file_structure" { "文件结构:" }
120 | "modified" { "已修改" }
121 | "empty" { "空" }
122 | "follow_telegram" { "关注我们的 Telegram 频道 @exmodium" }
123 | "tool_name" { "Cursor 绕过工具" }
124 | "important" { "重要" }
125 | "version_support" { "支持当前版本的 Cursor" }
126 | "version_not_support" { "" }
127 | "done" { "完成!" }
128 | "restart_required" { "重启 Cursor 以应用更改" }
129 | "disable_auto_update" { "是否禁用 Cursor 自动更新?" }
130 | "no" { "否 - 保持默认设置 (按回车)" }
131 | "yes" { "是 - 禁用自动更新" }
132 | "disabling_update" { "正在禁用自动更新..." }
133 | "manual_steps" { "自动设置失败,请手动执行以下步骤:" }
134 | "open_terminal" { "以管理员身份打开 PowerShell" }
135 | "run_commands" { "执行以下命令:" }
136 | "if_no_rights" { "如果没有权限:" }
137 | "verification" { "验证:" }
138 | "check_rights" { "确保文件为只读" }
139 | "restart_after" { "完成后重启 Cursor" }
140 | "folder_deleted" { "cursor-updater 文件夹已删除" }
141 | "folder_delete_failed" { "无法删除 cursor-updater 文件夹" }
142 | "file_create_failed" { "无法创建文件" }
143 | "rights_check_failed" { "权限检查失败" }
144 | "update_disabled" { "自动更新已禁用" }
145 | "update_enabled" { "自动更新保持启用状态" }
146 | "current_machineguid" { "当前 MachineGuid:" }
147 | "machineguid_updated" { "MachineGuid 已成功更新为:" }
148 | default { "[$key]" }
149 | }
150 | }
151 | default { # English
152 | switch ($key) {
153 | "info" { "[INFO]" }
154 | "warn" { "[WARNING]" }
155 | "error" { "[ERROR]" }
156 | "debug" { "[DEBUG]" }
157 | "get_user_error" { "Failed to get username" }
158 | "run_with_admin" { "Please run script as administrator" }
159 | "example" { "Example:" }
160 | "checking_cursor" { "Checking Cursor process..." }
161 | "process_info" { "Getting process info" }
162 | "cursor_not_found" { "No Cursor process found" }
163 | "cursor_found" { "Found running Cursor process" }
164 | "killing_attempt" { "Attempting to kill process..." }
165 | "force_kill" { "Forcing termination..." }
166 | "cursor_killed" { "Cursor process successfully terminated" }
167 | "waiting_termination" { "Waiting for termination, attempt" }
168 | "kill_failed" { "Failed to terminate process after" }
169 | "kill_manual" { "Please terminate process manually and try again" }
170 | "backup_skipped" { "Configuration file doesn't exist, skipping backup" }
171 | "backup_created" { "Backup created at:" }
172 | "backup_failed" { "Backup creation failed" }
173 | "config_not_found" { "Configuration file not found:" }
174 | "install_first" { "Please install and run Cursor at least once" }
175 | "config_updated" { "Configuration updated:" }
176 | "rights_failed" { "Failed to set read-only permissions" }
177 | "rights_success" { "Access rights set successfully" }
178 | "file_structure" { "File structure:" }
179 | "modified" { "modified" }
180 | "empty" { "empty" }
181 | "follow_telegram" { "Follow our Telegram channel @exmodium" }
182 | "tool_name" { "Cursor Bypass Tool" }
183 | "important" { "IMPORTANT" }
184 | "version_support" { "Current Cursor version is supported" }
185 | "version_not_support" { "" }
186 | "done" { "Done!" }
187 | "restart_required" { "Restart Cursor to apply changes" }
188 | "disable_auto_update" { "Disable Cursor auto-update?" }
189 | "no" { "No - keep default settings (Press Enter)" }
190 | "yes" { "Yes - disable auto-update" }
191 | "disabling_update" { "Disabling auto-update..." }
192 | "manual_steps" { "Automatic setup failed. Manual steps:" }
193 | "open_terminal" { "Open PowerShell as administrator" }
194 | "run_commands" { "Run these commands:" }
195 | "if_no_rights" { "If permission denied:" }
196 | "verification" { "Verification:" }
197 | "check_rights" { "Verify file is read-only" }
198 | "restart_after" { "Restart Cursor after completion" }
199 | "folder_deleted" { "cursor-updater folder deleted" }
200 | "folder_delete_failed" { "Failed to delete cursor-updater folder" }
201 | "file_create_failed" { "Failed to create file" }
202 | "rights_check_failed" { "Rights check failed" }
203 | "update_disabled" { "Auto-update disabled" }
204 | "update_enabled" { "Auto-update remains enabled" }
205 | "current_machineguid" { "Current MachineGuid:" }
206 | "machineguid_updated" { "MachineGuid successfully updated to:" }
207 | default { "[$key]" }
208 | }
209 | }
210 | }
211 | }
212 |
213 | # Функции логирования
214 | function Write-LogInfo {
215 | param([string]$Message)
216 | Write-Host "$GREEN$(Translate 'info')$NC $Message"
217 | }
218 |
219 | function Write-LogWarn {
220 | param([string]$Message)
221 | Write-Host "$YELLOW$(Translate 'warn')$NC $Message"
222 | }
223 |
224 | function Write-LogError {
225 | param([string]$Message)
226 | Write-Host "$RED$(Translate 'error')$NC $Message"
227 | }
228 |
229 | function Write-LogDebug {
230 | param([string]$Message)
231 | Write-Host "$BLUE$(Translate 'debug')$NC $Message"
232 | }
233 |
234 | # Проверка прав администратора
235 | function Test-AdminRights {
236 | $currentPrincipal = New-Object Security.Principal.WindowsPrincipal([Security.Principal.WindowsIdentity]::GetCurrent())
237 | $isAdmin = $currentPrincipal.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)
238 |
239 | if (-not $isAdmin) {
240 | Write-LogError $(Translate "run_with_admin")
241 | Write-Host "$(Translate 'example'): Start-Process powershell -Verb RunAs -ArgumentList `"-File `"$PSCommandPath`"`""
242 | exit 1
243 | }
244 | }
245 |
246 | # Пути к файлам
247 | $STORAGE_FILE = "$env:APPDATA\Cursor\User\globalStorage\storage.json"
248 | $BACKUP_DIR = "$env:APPDATA\Cursor\User\globalStorage\backups"
249 |
250 | # Выбор языка
251 | function Select-Language {
252 | Write-Host "Select language / Выберите язык / 选择语言:"
253 | Write-Host "1) English"
254 | Write-Host "2) Русский"
255 | Write-Host "3) 中文"
256 | $choice = Read-Host
257 |
258 | switch ($choice) {
259 | "1" { $script:LANG_CHOICE = "en" }
260 | "2" { $script:LANG_CHOICE = "ru" }
261 | "3" { $script:LANG_CHOICE = "zh" }
262 | default { $script:LANG_CHOICE = "en" }
263 | }
264 | }
265 |
266 | # Проверка и завершение процесса Cursor
267 | function Stop-CursorProcess {
268 | Write-LogInfo $(Translate "checking_cursor")
269 |
270 | $attempt = 1
271 | $maxAttempts = 5
272 |
273 | function Get-ProcessDetails {
274 | param([string]$ProcessName)
275 | Write-LogDebug "$(Translate 'process_info') $ProcessName"
276 | Get-Process | Where-Object { $_.ProcessName -like "*$ProcessName*" } | Format-Table -AutoSize
277 | }
278 |
279 | while ($attempt -le $maxAttempts) {
280 | $cursorProcess = Get-Process "Cursor" -ErrorAction SilentlyContinue
281 |
282 | if (-not $cursorProcess) {
283 | Write-LogInfo $(Translate "cursor_not_found")
284 | return
285 | }
286 |
287 | Write-LogWarn $(Translate "cursor_found")
288 | Get-ProcessDetails "Cursor"
289 |
290 | Write-LogWarn $(Translate "killing_attempt")
291 |
292 | if ($attempt -eq $maxAttempts) {
293 | Write-LogWarn $(Translate "force_kill")
294 | $cursorProcess | Stop-Process -Force -ErrorAction SilentlyContinue
295 | } else {
296 | $cursorProcess | Stop-Process -ErrorAction SilentlyContinue
297 | }
298 |
299 | Start-Sleep -Seconds 1
300 |
301 | if (-not (Get-Process "Cursor" -ErrorAction SilentlyContinue)) {
302 | Write-LogInfo $(Translate "cursor_killed")
303 | return
304 | }
305 |
306 | Write-LogWarn "$(Translate 'waiting_termination') $attempt/$maxAttempts..."
307 | $attempt++
308 | }
309 |
310 | Write-LogError "$(Translate 'kill_failed') $maxAttempts"
311 | Get-ProcessDetails "Cursor"
312 | Write-LogError $(Translate "kill_manual")
313 | exit 1
314 | }
315 |
316 | # Резервное копирование
317 | function Backup-Config {
318 | if (-not (Test-Path $STORAGE_FILE)) {
319 | Write-LogWarn $(Translate "backup_skipped")
320 | return
321 | }
322 |
323 | New-Item -ItemType Directory -Force -Path $BACKUP_DIR | Out-Null
324 | $backupFile = Join-Path $BACKUP_DIR "storage.json.backup_$(Get-Date -Format 'yyyyMMdd_HHmmss')"
325 |
326 | try {
327 | Copy-Item $STORAGE_FILE $backupFile
328 | Write-LogInfo "$(Translate 'backup_created') $backupFile"
329 | } catch {
330 | Write-LogError $(Translate "backup_failed")
331 | exit 1
332 | }
333 | }
334 |
335 | # Генерация случайного ID
336 | function New-RandomId {
337 | $bytes = New-Object byte[] 32
338 | $rng = [System.Security.Cryptography.RNGCryptoServiceProvider]::new()
339 | $rng.GetBytes($bytes)
340 | return [System.BitConverter]::ToString($bytes) -replace '-',''
341 | }
342 |
343 | # Генерация UUID
344 | function New-UUID {
345 | return [guid]::NewGuid().ToString().ToLower()
346 | }
347 |
348 | # Генерация новой конфигурации
349 | function Update-Config {
350 | if (-not (Test-Path $STORAGE_FILE)) {
351 | Write-LogError "$(Translate 'config_not_found') $STORAGE_FILE"
352 | Write-LogWarn $(Translate "install_first")
353 | exit 1
354 | }
355 |
356 | $machineId = "authuser_" + (New-RandomId)
357 | $macMachineId = New-RandomId
358 | $deviceId = New-UUID
359 | $sqmId = "{" + (New-UUID).ToUpper() + "}"
360 |
361 | try {
362 | # Снимаем все атрибуты файла
363 | attrib -r -h -s $STORAGE_FILE
364 |
365 | # Читаем и обновляем конфигурацию
366 | $config = Get-Content $STORAGE_FILE -Raw | ConvertFrom-Json
367 | $config.'telemetry.machineId' = $machineId
368 | $config.'telemetry.macMachineId' = $macMachineId
369 | $config.'telemetry.devDeviceId' = $deviceId
370 | $config.'telemetry.sqmId' = $sqmId
371 |
372 | # Сохраняем обновленную конфигурацию
373 | $config | ConvertTo-Json -Depth 100 | Set-Content $STORAGE_FILE
374 |
375 | # Устанавливаем атрибут "только для чтения" через командную строку
376 | attrib +r $STORAGE_FILE
377 |
378 | Write-Host
379 | Write-LogInfo $(Translate "config_updated")
380 | Write-LogDebug "machineId: $machineId"
381 | Write-LogDebug "macMachineId: $macMachineId"
382 | Write-LogDebug "deviceId: $deviceId"
383 | Write-LogDebug "sqmId: $sqmId"
384 |
385 | } catch {
386 | Write-LogError $_.Exception.Message
387 | Write-LogError $(Translate "run_with_admin")
388 | exit 1
389 | }
390 | }
391 |
392 | # Отображение структуры файлов
393 | function Show-FileTree {
394 | Write-Host
395 | Write-LogInfo $(Translate "file_structure")
396 | $baseDir = Split-Path $STORAGE_FILE -Parent
397 | Write-Host "$BLUE$baseDir$NC"
398 | Write-Host "├── globalStorage"
399 | Write-Host "│ ├── storage.json ($(Translate 'modified'))"
400 | Write-Host "│ └── backups"
401 |
402 | if (Test-Path $BACKUP_DIR) {
403 | $backupFiles = Get-ChildItem $BACKUP_DIR -File
404 | if ($backupFiles.Count -gt 0) {
405 | foreach ($file in $backupFiles) {
406 | Write-Host "│ └── $($file.Name)"
407 | }
408 | } else {
409 | Write-Host "│ └── ($(Translate 'empty'))"
410 | }
411 | }
412 | Write-Host
413 | }
414 |
415 | # Информация о Telegram
416 | function Show-FollowInfo {
417 | Write-Host
418 | Write-Host "$GREEN================================$NC"
419 | Write-Host "$YELLOW $(Translate 'follow_telegram') $NC"
420 | Write-Host "$GREEN================================$NC"
421 | Write-Host
422 | }
423 |
424 | # Отключение автообновлений
425 | function Disable-AutoUpdate {
426 | Write-Host
427 | Write-LogWarn $(Translate "disable_auto_update")
428 | Write-Host "1) $(Translate 'no')"
429 | Write-Host "2) $(Translate 'yes')"
430 | $choice = Read-Host
431 |
432 | if ($choice -eq "2") {
433 | Write-Host
434 | Write-LogInfo $(Translate "disabling_update")
435 | $updaterPath = "$env:APPDATA\cursor-updater"
436 |
437 | try {
438 | if (Test-Path $updaterPath) {
439 | Remove-Item $updaterPath -Force -Recurse
440 | Write-LogInfo $(Translate "folder_deleted")
441 | }
442 |
443 | New-Item -ItemType File $updaterPath -Force | Out-Null
444 | Set-ItemProperty $updaterPath -Name IsReadOnly -Value $true
445 |
446 | if (-not (Test-Path $updaterPath) -or (Get-Item $updaterPath).IsReadOnly -eq $false) {
447 | Write-LogError $(Translate "rights_check_failed")
448 | Write-Host
449 | Write-LogWarn $(Translate "manual_steps")
450 | Write-Host "$YELLOW$(Translate 'open_terminal')$NC"
451 | Write-Host "$(Translate 'run_commands'):"
452 | Write-Host "$BLUE`"rm -r '$updaterPath'; New-Item -ItemType File '$updaterPath'; Set-ItemProperty '$updaterPath' -Name IsReadOnly -Value `$true`"$NC"
453 | Write-Host
454 | Write-Host "$YELLOW$(Translate 'verification')$NC"
455 | Write-Host "Get-ItemProperty '$updaterPath'"
456 | Write-Host "$(Translate 'check_rights')"
457 | Write-Host
458 | Write-LogWarn $(Translate "restart_after")
459 | return
460 | }
461 |
462 | Write-LogInfo $(Translate "update_disabled")
463 | } catch {
464 | Write-LogError $(Translate "file_create_failed")
465 | Write-Host
466 | Write-LogWarn $(Translate "manual_steps")
467 | Write-Host "$YELLOW$(Translate 'open_terminal')$NC"
468 | Write-Host "$(Translate 'run_commands'):"
469 | Write-Host "$BLUE`"rm -r '$updaterPath'; New-Item -ItemType File '$updaterPath'; Set-ItemProperty '$updaterPath' -Name IsReadOnly -Value `$true`"$NC"
470 | Write-Host
471 | Write-Host "$YELLOW$(Translate 'verification')$NC"
472 | Write-Host "Get-ItemProperty '$updaterPath'"
473 | Write-Host "$(Translate 'check_rights')"
474 | Write-Host
475 | Write-LogWarn $(Translate "restart_after")
476 | }
477 | } else {
478 | Write-LogInfo $(Translate "update_enabled")
479 | }
480 | }
481 |
482 | # Добавляем функцию для обновления MachineGuid
483 | function Update-MachineGuid {
484 | try {
485 | $newGuid = [guid]::NewGuid().ToString()
486 | $registryPath = "HKLM:\SOFTWARE\Microsoft\Cryptography"
487 |
488 | $currentGuid = Get-ItemPropertyValue -Path $registryPath -Name "MachineGuid"
489 | Write-LogInfo "$(Translate 'current_machineguid') $currentGuid"
490 |
491 | Set-ItemProperty -Path $registryPath -Name "MachineGuid" -Value $newGuid -Force
492 |
493 | $updatedGuid = Get-ItemPropertyValue -Path $registryPath -Name "MachineGuid"
494 | if ($updatedGuid -eq $newGuid) {
495 | Write-LogInfo "$(Translate 'machineguid_updated') $newGuid"
496 | } else {
497 | Write-LogError $(Translate "machineguid_update_failed")
498 | }
499 | } catch {
500 | Write-LogError "$(Translate 'machineguid_error'): $_"
501 | }
502 | }
503 |
504 | # Функция для открытия сайта
505 | function Open-Website {
506 | $sites = @("https://assets-hub.ru", "https://assets-hub.pro")
507 | $randomSite = $sites | Get-Random
508 | try {
509 | Start-Process $randomSite
510 |
511 | } catch {
512 | Write-LogError "Не удалось открыть сайт: $_"
513 | }
514 | }
515 |
516 | # Главная функция
517 | function Start-Main {
518 | Clear-Host
519 | Select-Language
520 | Write-Host @"
521 | ██████╗██╗ ██╗██████╗ ███████╗ ██████╗ ██████╗
522 | ██╔════╝██║ ██║██╔══██╗██╔════╝██╔═══██╗██╔══██╗
523 | ██║ ██║ ██║██████╔╝███████╗██║ ██║██████╔╝
524 | ██║ ██║ ██║██╔══██╗╚════██║██║ ██║██╔══██╗
525 | ╚██████╗╚██████╔╝██║ ██║███████║╚██████╔╝██║ ██║
526 | ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝ ╚═════╝ ╚═╝ ╚═╝
527 | "@
528 | Write-Host "$BLUE================================$NC"
529 | Write-Host "$GREEN $(Translate 'tool_name') $NC"
530 | Write-Host "$BLUE================================$NC"
531 | Write-Host
532 | Write-Host "$YELLOW[$(Translate 'important')]$NC $(Translate 'version_support')"
533 | Write-Host
534 |
535 | Test-AdminRights
536 | Stop-CursorProcess
537 | Backup-Config
538 | Update-Config
539 | Update-MachineGuid
540 |
541 | Write-Host
542 | Write-LogInfo $(Translate "done")
543 | Show-FileTree
544 | Show-FollowInfo
545 | Write-LogInfo $(Translate "restart_required")
546 |
547 | Disable-AutoUpdate
548 |
549 | # Открываем случайный сайт после успешного выполнения
550 | Open-Website
551 | }
552 |
553 | # Оставляем только прямой вызов главной функции:
554 | Start-Main
555 |
--------------------------------------------------------------------------------
/cursor-help.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # Обработка ошибок
4 | set -e
5 |
6 | # Определение цветов
7 | RED='\033[0;31m'
8 | GREEN='\033[0;32m'
9 | YELLOW='\033[1;33m'
10 | BLUE='\033[0;34m'
11 | NC='\033[0m'
12 |
13 | # Текущий язык (по умолчанию английский)
14 | LANG_CHOICE="en"
15 |
16 | # Функция перевода
17 | translate() {
18 | local key="$1"
19 | case $LANG_CHOICE in
20 | "ru")
21 | case $key in
22 | "select_language") echo "Выберите язык / Select language / 选择语言:";;
23 | "info") echo "[ИНФО]";;
24 | "warn") echo "[ВНИМАНИЕ]";;
25 | "error") echo "[ОШИБКА]";;
26 | "debug") echo "[ОТЛАДКА]";;
27 | "get_user_error") echo "Не удалось получить имя пользователя";;
28 | "run_with_sudo") echo "Запустите скрипт с sudo";;
29 | "example") echo "Пример:";;
30 | "checking_cursor") echo "Проверка процесса Cursor...";;
31 | "process_info") echo "Получение информации о процессе";;
32 | "cursor_not_found") echo "Процесс Cursor не найден";;
33 | "cursor_found") echo "Найден запущенный процесс Cursor";;
34 | "killing_attempt") echo "Попытка завершения процесса...";;
35 | "force_kill") echo "Принудительное завершение...";;
36 | "cursor_killed") echo "Процесс Cursor успешно завершен";;
37 | "waiting_termination") echo "Ожидание завершения, попытка";;
38 | "kill_failed") echo "Не удалось завершить процесс после";;
39 | "kill_manual") echo "Завершите процесс вручную и повторите попытку";;
40 | "backup_skipped") echo "Файл конфигурации не существует, пропуск резервного копирования";;
41 | "backup_created") echo "Резервная копия создана:";;
42 | "backup_failed") echo "Ошибка создания резервной копии";;
43 | "config_not_found") echo "Файл конфигурации не найден:";;
44 | "install_first") echo "Установите и запустите Cursor хотя бы раз";;
45 | "config_updated") echo "Конфигурация обновлена:";;
46 | "rights_failed") echo "Не удалось установить права только для чтения";;
47 | "rights_success") echo "Права доступа установлены успешно";;
48 | "file_structure") echo "Структура файлов:";;
49 | "modified") echo "изменен";;
50 | "empty") echo "пусто";;
51 | "follow_telegram") echo "Сделано при помощи: exmodium.ru";;
52 | "tool_name") echo "Утилита обхода Cursor";;
53 | "important") echo "ВАЖНО";;
54 | "version_support") echo "Поддерживается текущая версия Cursor";;
55 | "version_not_support") echo "";;
56 | "done") echo "Готово!";;
57 | "restart_required") echo "Перезапустите Cursor для применения изменений";;
58 | "disable_auto_update") echo "Отключить автообновление Cursor?";;
59 | "no") echo "Нет - оставить как есть (Enter)";;
60 | "yes") echo "Да - отключить";;
61 | "disabling_update") echo "Отключение автообновления...";;
62 | "manual_steps") echo "Автоматическое отключение не удалось. Выполните вручную:";;
63 | "open_terminal") echo "Откройте Terminal";;
64 | "run_commands") echo "Выполните команды:";;
65 | "if_no_rights") echo "Если нет прав, используйте sudo:";;
66 | "verification") echo "Проверка:";;
67 | "check_rights") echo "Убедитесь что права: r--r--r--";;
68 | "restart_after") echo "Перезапустите Cursor после выполнения";;
69 | "folder_deleted") echo "Папка cursor-updater удалена";;
70 | "folder_delete_failed") echo "Не удалось удалить папку cursor-updater";;
71 | "file_create_failed") echo "Не удалось создать файл";;
72 | "rights_check_failed") echo "Проверка прав не пройдена";;
73 | "update_disabled") echo "Автообновление отключено";;
74 | "update_enabled") echo "Автообновление оставлено включенным";;
75 | "current_machineguid") echo "Текущий MachineGuid:";;
76 | "machineguid_updated") echo "MachineGuid успешно обновлен на:";;
77 | "machineguid_update_failed") echo "Не удалось обновить MachineGuid";;
78 | "machineguid_error") echo "Ошибка при обновлении MachineGuid";;
79 | *) echo "[$key]";;
80 | esac
81 | ;;
82 | "zh")
83 | case $key in
84 | "select_language") echo "选择语言 / Select language / Выберите язык:";;
85 | "info") echo "[信息]";;
86 | "warn") echo "[警告]";;
87 | "error") echo "[错误]";;
88 | "debug") echo "[调试]";;
89 | "get_user_error") echo "无法获取用户名";;
90 | "run_with_sudo") echo "请使用 sudo 运行此脚本";;
91 | "example") echo "示例:";;
92 | "checking_cursor") echo "检查 Cursor 进程...";;
93 | "process_info") echo "获取进程信息";;
94 | "cursor_not_found") echo "未发现 Cursor 进程";;
95 | "cursor_found") echo "发现正在运行的 Cursor 进程";;
96 | "killing_attempt") echo "尝试终止进程...";;
97 | "force_kill") echo "强制终止...";;
98 | "cursor_killed") echo "Cursor 进程已成功终止";;
99 | "waiting_termination") echo "等待进程终止,尝试";;
100 | "kill_failed") echo "在尝试后仍无法终止进程";;
101 | "kill_manual") echo "请手动终止进程后重试";;
102 | "backup_skipped") echo "配置文件不存在,跳过备份";;
103 | "backup_created") echo "配置已备份到:";;
104 | "backup_failed") echo "备份失败";;
105 | "config_not_found") echo "未找到配置文件:";;
106 | "install_first") echo "请先安装并运行一次 Cursor";;
107 | "config_updated") echo "配置已更新:";;
108 | "rights_failed") echo "无法设置只读权限";;
109 | "rights_success") echo "权限设置成功";;
110 | "file_structure") echo "文件结构:";;
111 | "modified") echo "已修改";;
112 | "empty") echo "空";;
113 | "follow_telegram") echo "借助:exmodium.ru";;
114 | "tool_name") echo "Cursor 绕过工具";;
115 | "important") echo "重要";;
116 | "version_support") echo "支持当前版本的 Cursor";;
117 | "version_not_support") echo "";;
118 | "done") echo "完成!";;
119 | "restart_required") echo "请重启 Cursor 以应用更改";;
120 | "disable_auto_update") echo "是否禁用 Cursor 自动更新?";;
121 | "no") echo "否 - 保持默认设置 (按回车)";;
122 | "yes") echo "是 - 禁用自动更新";;
123 | "disabling_update") echo "正在禁用自动更新...";;
124 | "manual_steps") echo "自动设置失败,请手动操作:";;
125 | "open_terminal") echo "打开终端";;
126 | "run_commands") echo "运行以下命令:";;
127 | "if_no_rights") echo "如果没有权限,使用 sudo:";;
128 | "verification") echo "验证:";;
129 | "check_rights") echo "确认权限为 r--r--r--";;
130 | "restart_after") echo "完成后重启 Cursor";;
131 | "folder_deleted") echo "cursor-updater 文件夹已删除";;
132 | "folder_delete_failed") echo "无法删除 cursor-updater 文件夹";;
133 | "file_create_failed") echo "无法创建文件";;
134 | "rights_check_failed") echo "权限检查失败";;
135 | "update_disabled") echo "已禁用自动更新";;
136 | "update_enabled") echo "保持自动更新启用";;
137 | "current_machineguid") echo "当前 MachineGuid:";;
138 | "machineguid_updated") echo "MachineGuid 已成功更新为:";;
139 | "machineguid_update_failed") echo "无法更新 MachineGuid";;
140 | "machineguid_error") echo "更新 MachineGuid 时出错";;
141 | *) echo "[$key]";;
142 | esac
143 | ;;
144 | *) # English (default)
145 | case $key in
146 | "select_language") echo "Select language / Выберите язык / 选择语言:";;
147 | "info") echo "[INFO]";;
148 | "warn") echo "[WARNING]";;
149 | "error") echo "[ERROR]";;
150 | "debug") echo "[DEBUG]";;
151 | "get_user_error") echo "Failed to get username";;
152 | "run_with_sudo") echo "Please run script with sudo";;
153 | "example") echo "Example:";;
154 | "checking_cursor") echo "Checking Cursor process...";;
155 | "process_info") echo "Getting process info";;
156 | "cursor_not_found") echo "No Cursor process found";;
157 | "cursor_found") echo "Found running Cursor process";;
158 | "killing_attempt") echo "Attempting to kill process...";;
159 | "force_kill") echo "Forcing termination...";;
160 | "cursor_killed") echo "Cursor process successfully terminated";;
161 | "waiting_termination") echo "Waiting for termination, attempt";;
162 | "kill_failed") echo "Failed to terminate process after";;
163 | "kill_manual") echo "Please terminate process manually and try again";;
164 | "backup_skipped") echo "Configuration file doesn't exist, skipping backup";;
165 | "backup_created") echo "Backup created at:";;
166 | "backup_failed") echo "Backup creation failed";;
167 | "config_not_found") echo "Configuration file not found:";;
168 | "install_first") echo "Please install and run Cursor at least once";;
169 | "config_updated") echo "Configuration updated:";;
170 | "rights_failed") echo "Failed to set read-only permissions";;
171 | "rights_success") echo "Access rights set successfully";;
172 | "file_structure") echo "File structure:";;
173 | "modified") echo "modified";;
174 | "empty") echo "empty";;
175 | "follow_telegram") echo "Made with the help of: exmodium.ru";;
176 | "tool_name") echo "Cursor Bypass Tool";;
177 | "important") echo "IMPORTANT";;
178 | "version_support") echo "Current Cursor version is supported";;
179 | "version_not_support") echo "";;
180 | "done") echo "Done!";;
181 | "restart_required") echo "Restart Cursor to apply changes";;
182 | "disable_auto_update") echo "Disable Cursor auto-update?";;
183 | "no") echo "No - keep default settings (Press Enter)";;
184 | "yes") echo "Yes - disable auto-update";;
185 | "disabling_update") echo "Disabling auto-update...";;
186 | "manual_steps") echo "Automatic setup failed. Manual steps:";;
187 | "open_terminal") echo "Open Terminal";;
188 | "run_commands") echo "Run these commands:";;
189 | "if_no_rights") echo "If permission denied, use sudo:";;
190 | "verification") echo "Verification:";;
191 | "check_rights") echo "Verify permissions are r--r--r--";;
192 | "restart_after") echo "Restart Cursor after completion";;
193 | "folder_deleted") echo "cursor-updater folder deleted";;
194 | "folder_delete_failed") echo "Failed to delete cursor-updater folder";;
195 | "file_create_failed") echo "Failed to create file";;
196 | "rights_check_failed") echo "Rights check failed";;
197 | "update_disabled") echo "Auto-update disabled";;
198 | "update_enabled") echo "Auto-update remains enabled";;
199 | "current_machineguid") echo "Current MachineGuid:";;
200 | "machineguid_updated") echo "MachineGuid successfully updated to:";;
201 | "machineguid_update_failed") echo "Failed to update MachineGuid";;
202 | "machineguid_error") echo "Error updating MachineGuid";;
203 | *) echo "[$key]";;
204 | esac
205 | ;;
206 | esac
207 | }
208 |
209 | # Функции логирования
210 | log_info() {
211 | echo -e "${GREEN}$(translate "info")${NC} $1"
212 | }
213 |
214 | log_warn() {
215 | echo -e "${YELLOW}$(translate "warn")${NC} $1"
216 | }
217 |
218 | log_error() {
219 | echo -e "${RED}$(translate "error")${NC} $1"
220 | }
221 |
222 | log_debug() {
223 | echo -e "${BLUE}$(translate "debug")${NC} $1"
224 | }
225 |
226 | # Выбор языка
227 | select_language() {
228 | echo -e "$(translate "select_language")"
229 | echo "1) English"
230 | echo "2) Русский"
231 | echo "3) 中文"
232 | read -r lang_choice
233 | case $lang_choice in
234 | 1) LANG_CHOICE="en";;
235 | 2) LANG_CHOICE="ru";;
236 | 3) LANG_CHOICE="zh";;
237 | *) LANG_CHOICE="en";;
238 | esac
239 | }
240 |
241 | # Получение текущего пользователя
242 | get_current_user() {
243 | if [ "$EUID" -eq 0 ]; then
244 | echo "$SUDO_USER"
245 | else
246 | echo "$USER"
247 | fi
248 | }
249 |
250 | CURRENT_USER=$(get_current_user)
251 | if [ -z "$CURRENT_USER" ]; then
252 | log_error "$(translate "get_user_error")"
253 | exit 1
254 | fi
255 |
256 | # Пути к файлам
257 | STORAGE_FILE="$HOME/Library/Application Support/Cursor/User/globalStorage/storage.json"
258 | BACKUP_DIR="$HOME/Library/Application Support/Cursor/User/globalStorage/backups"
259 |
260 | # Проверка прав
261 | check_permissions() {
262 | if [ "$EUID" -ne 0 ]; then
263 | log_error "$(translate "run_with_sudo")"
264 | echo "$(translate "example"): sudo $0"
265 | exit 1
266 | fi
267 | }
268 |
269 | # Проверка и завершение процесса Cursor
270 | check_and_kill_cursor() {
271 | log_info "$(translate "checking_cursor")"
272 |
273 | local attempt=1
274 | local max_attempts=5
275 |
276 | get_process_details() {
277 | local process_name="$1"
278 | log_debug "$(translate "process_info") $process_name:"
279 | ps aux | grep -i "$process_name" | grep -v grep
280 | }
281 |
282 | while [ $attempt -le $max_attempts ]; do
283 | CURSOR_PIDS=$(pgrep -i "cursor" || true)
284 |
285 | if [ -z "$CURSOR_PIDS" ]; then
286 | log_info "$(translate "cursor_not_found")"
287 | return 0
288 | fi
289 |
290 | log_warn "$(translate "cursor_found")"
291 | get_process_details "cursor"
292 |
293 | log_warn "$(translate "killing_attempt")"
294 |
295 | if [ $attempt -eq $max_attempts ]; then
296 | log_warn "$(translate "force_kill")"
297 | kill -9 $CURSOR_PIDS 2>/dev/null || true
298 | else
299 | kill $CURSOR_PIDS 2>/dev/null || true
300 | fi
301 |
302 | sleep 1
303 |
304 | if ! pgrep -i "cursor" > /dev/null; then
305 | log_info "$(translate "cursor_killed")"
306 | return 0
307 | fi
308 |
309 | log_warn "$(translate "waiting_termination") $attempt/$max_attempts..."
310 | ((attempt++))
311 | done
312 |
313 | log_error "$(translate "kill_failed") $max_attempts"
314 | get_process_details "cursor"
315 | log_error "$(translate "kill_manual")"
316 | exit 1
317 | }
318 |
319 | # Резервное копирование
320 | backup_config() {
321 | if [ ! -f "$STORAGE_FILE" ]; then
322 | log_warn "$(translate "backup_skipped")"
323 | return 0
324 | fi
325 |
326 | mkdir -p "$BACKUP_DIR"
327 | local backup_file="$BACKUP_DIR/storage.json.backup_$(date +%Y%m%d_%H%M%S)"
328 |
329 | if cp "$STORAGE_FILE" "$backup_file"; then
330 | chmod 644 "$backup_file"
331 | chown "$CURRENT_USER" "$backup_file"
332 | log_info "$(translate "backup_created") $backup_file"
333 | else
334 | log_error "$(translate "backup_failed")"
335 | exit 1
336 | fi
337 | }
338 |
339 | # Генерация случайного ID
340 | generate_random_id() {
341 | openssl rand -hex 32
342 | }
343 |
344 | # Генерация UUID
345 | generate_uuid() {
346 | uuidgen | tr '[:upper:]' '[:lower:]'
347 | }
348 |
349 | # Добавляем функцию для получения и обновления MachineGuid для macOS
350 | generate_machine_guid() {
351 | local current_guid
352 | local new_guid
353 |
354 | # Получаем текущий Hardware UUID
355 | current_guid=$(ioreg -d2 -c IOPlatformExpertDevice | awk -F\" '/IOPlatformUUID/{print $(NF-1)}')
356 | log_info "$(translate 'current_machineguid') $current_guid"
357 |
358 | # Генерируем новый UUID
359 | new_guid=$(uuidgen | tr '[:upper:]' '[:lower:]')
360 |
361 | # Пытаемся обновить Hardware UUID (требует sudo)
362 | if nvram SystemUUID="$new_guid" 2>/dev/null; then
363 | log_info "$(translate 'machineguid_updated') $new_guid"
364 | else
365 | log_error "$(translate 'machineguid_update_failed')"
366 | return 1
367 | fi
368 | }
369 |
370 | # Модифицируем функцию generate_new_config
371 | generate_new_config() {
372 | if [ ! -f "$STORAGE_FILE" ]; then
373 | log_error "$(translate 'config_not_found') $STORAGE_FILE"
374 | log_warn "$(translate 'install_first')"
375 | exit 1
376 | }
377 |
378 | # Сохраняем текущие права доступа
379 | local current_perms=$(stat -f "%A" "$STORAGE_FILE" 2>/dev/null)
380 |
381 | # Временно делаем файл доступным для записи
382 | chmod 644 "$STORAGE_FILE" 2>/dev/null || true
383 |
384 | local machine_id="authuser_$(generate_random_id)"
385 | local mac_machine_id=$(generate_random_id)
386 | local device_id=$(generate_uuid | tr '[:upper:]' '[:lower:]')
387 | local sqm_id="{$(generate_uuid | tr '[:lower:]' '[:upper:]')}"
388 |
389 | # Обновляем конфигурацию
390 | local temp_file=$(mktemp)
391 | jq --arg mid "$machine_id" \
392 | --arg mmid "$mac_machine_id" \
393 | --arg did "$device_id" \
394 | --arg sid "$sqm_id" \
395 | '.["telemetry.machineId"]=$mid | .["telemetry.macMachineId"]=$mmid | .["telemetry.devDeviceId"]=$did | .["telemetry.sqmId"]=$sid' \
396 | "$STORAGE_FILE" > "$temp_file"
397 |
398 | mv "$temp_file" "$STORAGE_FILE"
399 |
400 | # Восстанавливаем права только для чтения
401 | chmod 444 "$STORAGE_FILE"
402 | chown "$CURRENT_USER" "$STORAGE_FILE"
403 |
404 | if [ -w "$STORAGE_FILE" ]; then
405 | log_warn "$(translate 'rights_failed')"
406 | sudo chflags schg "$STORAGE_FILE" 2>/dev/null || true
407 | else
408 | log_info "$(translate 'rights_success')"
409 | fi
410 |
411 | echo
412 | log_info "$(translate 'config_updated')"
413 | log_debug "machineId: $machine_id"
414 | log_debug "macMachineId: $mac_machine_id"
415 | log_debug "deviceId: $device_id"
416 | log_debug "sqmId: $sqm_id"
417 | }
418 |
419 | # Отображение структуры файлов
420 | show_file_tree() {
421 | local base_dir=$(dirname "$STORAGE_FILE")
422 | echo
423 | log_info "$(translate "file_structure")"
424 | echo -e "${BLUE}$base_dir${NC}"
425 | echo "├── globalStorage"
426 | echo "│ ├── storage.json ($(translate "modified"))"
427 | echo "│ └── backups"
428 |
429 | if [ -d "$BACKUP_DIR" ]; then
430 | local backup_files=("$BACKUP_DIR"/*)
431 | if [ ${#backup_files[@]} -gt 0 ]; then
432 | for file in "${backup_files[@]}"; do
433 | if [ -f "$file" ]; then
434 | echo "│ └── $(basename "$file")"
435 | fi
436 | done
437 | else
438 | echo "│ └── ($(translate "empty"))"
439 | fi
440 | fi
441 | echo
442 | }
443 |
444 | # Информация о Telegram
445 | show_follow_info() {
446 | echo
447 | echo -e "${GREEN}================================${NC}"
448 | echo -e "${YELLOW} $(translate "follow_telegram") ${NC}"
449 | echo -e "${GREEN}================================${NC}"
450 | echo
451 | }
452 |
453 | # Отключение автообновлений
454 | disable_auto_update() {
455 | echo
456 | log_warn "$(translate "disable_auto_update")"
457 | echo "1) $(translate "no")"
458 | echo "2) $(translate "yes")"
459 | read -r choice
460 |
461 | if [ "$choice" = "2" ]; then
462 | echo
463 | log_info "$(translate "disabling_update")"
464 | local updater_path="$HOME/Library/Application Support/cursor-updater"
465 |
466 | if [ -d "$updater_path" ]; then
467 | rm -rf "$updater_path" 2>/dev/null || {
468 | log_error "$(translate "folder_delete_failed")"
469 | show_manual_guide
470 | return 1
471 | }
472 | log_info "$(translate "folder_deleted")"
473 | fi
474 |
475 | touch "$updater_path" 2>/dev/null || {
476 | log_error "$(translate "file_create_failed")"
477 | show_manual_guide
478 | return 1
479 | }
480 |
481 | chmod 444 "$updater_path" 2>/dev/null && \
482 | chown "$CURRENT_USER" "$updater_path" 2>/dev/null || {
483 | log_error "$(translate "rights_failed")"
484 | show_manual_guide
485 | return 1
486 | }
487 |
488 | if [ ! -f "$updater_path" ] || [ -w "$updater_path" ]; then
489 | log_error "$(translate "rights_check_failed")"
490 | show_manual_guide
491 | return 1
492 | }
493 |
494 | log_info "$(translate "update_disabled")"
495 | else
496 | log_info "$(translate "update_enabled")"
497 | fi
498 | }
499 |
500 | # Отображение инструкций для ручной настройки
501 | show_manual_guide() {
502 | echo
503 | log_warn "$(translate "manual_steps")"
504 | echo -e "${YELLOW}$(translate "open_terminal")${NC}"
505 | echo "$(translate "run_commands"):"
506 | echo -e "${BLUE}rm -rf \"$updater_path\" && touch \"$updater_path\" && chmod 444 \"$updater_path\"${NC}"
507 | echo
508 | echo -e "${YELLOW}$(translate "if_no_rights")${NC}"
509 | echo -e "${BLUE}sudo rm -rf \"$updater_path\" && sudo touch \"$updater_path\" && sudo chmod 444 \"$updater_path\"${NC}"
510 | echo
511 | echo -e "${YELLOW}$(translate "verification")${NC}"
512 | echo "ls -l \"$updater_path\""
513 | echo "$(translate "check_rights")"
514 | echo
515 | log_warn "$(translate "restart_after")"
516 | }
517 |
518 | # Функция для открытия сайта
519 | open_website() {
520 | local sites=("https://assets-hub.ru" "https://assets-hub.pro")
521 | local random_site=${sites[$RANDOM % ${#sites[@]}]}
522 |
523 | if command -v xdg-open >/dev/null 2>&1; then
524 | xdg-open "$random_site" 2>/dev/null || true
525 | elif command -v open >/dev/null 2>&1; then
526 | open "$random_site" 2>/dev/null || true
527 | else
528 | log_error "Не удалось открыть сайт: $random_site"
529 | return 1
530 | fi
531 |
532 | log_info "Открыт сайт: $random_site"
533 | }
534 |
535 | # Главная функция
536 | main() {
537 | clear
538 | select_language
539 | echo -e "
540 | ██████╗██╗ ██╗██████╗ ███████╗ ██████╗ ██████╗
541 | ██╔════╝██║ ██║██╔══██╗██╔════╝██╔═══██╗██╔══██╗
542 | ██║ ██║ ██║██████╔╝███████╗██║ ██║██████╔╝
543 | ██║ ██║ ██║██╔══██╗╚════██║██║ ██║██╔══██╗
544 | ╚██████╗╚██████╔╝██║ ██║███████║╚██████╔╝██║ ██║
545 | ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝ ╚═════╝ ╚═╝ ╚═╝
546 | "
547 | echo -e "${BLUE}================================${NC}"
548 | echo -e "${GREEN} $(translate "tool_name") ${NC}"
549 | echo -e "${BLUE}================================${NC}"
550 | echo
551 | echo -e "${YELLOW}[$(translate "important")]${NC} $(translate "version_support")"
552 | echo
553 |
554 | check_permissions
555 | check_and_kill_cursor
556 | backup_config
557 | generate_machine_guid
558 | generate_new_config
559 |
560 | echo
561 | log_info "$(translate "done")"
562 | show_file_tree
563 | show_follow_info
564 | log_info "$(translate "restart_required")"
565 |
566 | disable_auto_update
567 |
568 | # Открываем случайный сайт после успешного выполнения
569 | open_website
570 | }
571 |
572 | main
573 |
--------------------------------------------------------------------------------