Compare commits

...

60 Commits

Author SHA1 Message Date
煎饼果子卷鲨鱼辣椒
9a0a1260e0 gg 2025-06-05 15:01:33 +08:00
煎饼果子卷鲨鱼辣椒
a864cf9284 gg 2025-06-05 11:56:37 +08:00
煎饼果子卷鲨鱼辣椒
f3953cd838 移除 Cursor 初始化清理函数的调用,这个方法还需要琢磨一下 2025-05-30 09:54:58 +08:00
煎饼果子卷鲨鱼辣椒
a48185e6a5 支持0.50.x 2025-05-29 17:41:46 +08:00
煎饼果子卷鲨鱼辣椒
c1b7e42e27 新增 Cursor 初始化清理函数以删除不必要的文件和文件夹,提升脚本的稳定性和用户体验。该函数在 Linux 和 macOS 环境下均进行了实现,确保用户配置的清理工作能够顺利完成。 2025-05-29 17:08:19 +08:00
煎饼果子卷鲨鱼辣椒
776ecb0434 新增 Cursor 初始化函数以清理不必要的文件和文件夹,提升脚本的稳定性和用户体验。同时修复了路径字符串中的转义字符问题,确保在 Windows 环境下的兼容性。 2025-05-29 16:57:21 +08:00
煎饼果子卷鲨鱼辣椒
86b2bae098 更新 README 文件中的微信群二维码,替换为新的二维码图片(qun13.png),以确保用户获取最新的联系方式。 2025-05-23 09:50:38 +08:00
煎饼果子卷鲨鱼辣椒
291c6198bc Merge branch 'master' of https://github.com/yuaotian/go-cursor-help 2025-05-05 18:12:58 +08:00
煎饼果子卷鲨鱼辣椒
bc787f2076 新增辅助函数以判断接口类型、生成本地管理+单播MAC地址,并自动检测并调用第三方工具(macchanger或spoof-mac)以增强MAC地址修改功能的可靠性。同时,优化了临时禁用和重新启用接口的逻辑,提供了失败时的恢复/重试选项,提升了用户体验和脚本的稳定性。 2025-05-05 18:11:08 +08:00
煎饼果子卷鲨鱼辣椒@86
9204cef000
Merge pull request #490 from yunfeidog/master
fix(mac): 修复mac无法正确修改接口MAC地址的问题
2025-05-04 16:12:59 +08:00
yunfeidog
363518ad40 fix(mac): 修复mac环境下无法成功修改MAC地址的问题 2025-05-04 14:03:33 +08:00
煎饼果子卷鲨鱼辣椒
d01dcdb7ba 新增 Cursor 安装相关功能,优化了查找和安装过程。包括添加标准安装路径、改进资源目录查找逻辑、实现从本地 AppImage 安装 Cursor 的功能,并增强了日志记录以提高用户体验。同时,更新了配置文件处理逻辑,确保在备份和修改过程中更具可靠性。此更改旨在提升脚本的稳定性和用户友好性。 2025-04-30 12:31:45 +08:00
煎饼果子卷鲨鱼辣椒
234ec180a0 qun-12 2025-04-29 10:17:18 +08:00
煎饼果子卷鲨鱼辣椒
974852944b 在临时修改系统 MAC 地址的功能中,更新了调用方式以确保即使在执行过程中出现错误也不会中断后续操作。此更改通过在调用 change_system_mac_address 函数时添加 || true,提升了脚本的稳定性和用户体验。 2025-04-27 20:45:28 +08:00
煎饼果子卷鲨鱼辣椒
e5ea1700bd 更新 README 文件以添加针对 Linux 用户的注意事项,说明脚本如何定位 Cursor 安装位置,并确保用户能够通过常见路径访问 Cursor。同时,修正了 README 文件中的中文引号格式,以提升文档的准确性和可读性。 2025-04-27 12:07:47 +08:00
煎饼果子卷鲨鱼辣椒@86
3f7ae1fbf3
Merge pull request #483 from Poikilos/python-and-gettext-translation
Add Python version of Linux script and English translation
2025-04-27 11:05:18 +08:00
煎饼果子卷鲨鱼辣椒
e481d97bd2 新增辅助函数以支持修改单个网络接口的 MAC 地址,并优化临时修改系统 MAC 地址的功能,现可处理所有活动的 Wi-Fi 和 Ethernet 接口。此更改包括详细的日志记录和错误处理,确保用户能够清晰了解每个接口的状态和修改结果,提升了功能的可靠性和用户体验。 2025-04-27 11:01:39 +08:00
煎饼果子卷鲨鱼辣椒
702bb5d05f 更新临时修改系统 MAC 地址的功能,通过路由表获取默认网络接口,提升了接口检测的准确性和可靠性。同时,调整了日志信息以更好地反映当前操作状态,确保用户能够清晰了解接口检测的结果和可能的默认设置。此更改旨在进一步优化用户体验和功能的稳定性。 2025-04-27 10:57:24 +08:00
Poikilos
a34ff83bca Add Python version of Linux script and English translation (Other OS can be added by import platform then checking if platform.system() equals "Darwin", or "Linux" or "Windows"). Please test this, since I'm not entirely familiar with the code. I know bash and Python well, so I fixed mistakes but the translations to Python and English were both made by Grok (with original cursor_linux_id_modifier.sh code and several detailed prompts). 2025-04-25 10:10:46 -04:00
煎饼果子卷鲨鱼辣椒
207689ff56 在临时修改系统 MAC 地址的功能中新增检查,以确保文件中是否已存在 randomDeviceId_ 时间戳模式。此更改通过日志记录跳过通用注入,提升了功能的可靠性和用户体验。 2025-04-23 23:11:35 +08:00
煎饼果子卷鲨鱼辣椒
a2d55a00a2 优化临时修改系统 MAC 地址的功能,增加了接口禁用和重新启用的步骤,以确保在修改过程中网络连接的稳定性。添加了详细的日志记录和错误处理,确保用户能够清晰了解 MAC 地址修改的状态和可能的失败原因。此更改旨在提升用户体验和功能的可靠性。 2025-04-22 16:13:29 +08:00
煎饼果子卷鲨鱼辣椒
d48d9fa1d0 新增临时修改系统 MAC 地址的功能,允许用户在不重启的情况下更改主网络接口的 MAC 地址。此更改包括自动检测主网络接口、生成随机 MAC 地址并执行修改,同时在日志中记录相关信息和警告。更新了主程序执行流程以默认调用此功能,确保用户在使用工具时了解相关风险和操作影响。 2025-04-22 11:46:42 +08:00
煎饼果子卷鲨鱼辣椒
33cd677188 更新 README 文件以反映最新的 Cursor 版本支持信息,从 0.47.x 更新至 0.49.x,确保文档的准确性和最新性。同时,更新了日志文件名称和内容,以更好地描述工具的功能。此更改旨在提升用户体验和文档的实用性。 2025-04-22 11:39:05 +08:00
煎饼果子卷鲨鱼辣椒
f6aba31832 更新 README 文件以添加 Cursor 通用解决方案,包括关闭账号、刷新机器码和浏览器更换的步骤。这些更改旨在提供用户在遇到问题时的解决方案,确保文档的实用性和准确性。 2025-04-18 10:13:05 +08:00
煎饼果子卷鲨鱼辣椒
f022fc1736 更新 README 文件以反映最新的 Cursor 版本支持信息,移除对 v0.45.x 及以下版本的支持声明,并更新版本历史链接。同时,更新了 WeChat 二维码的有效期和图片。此更改确保文档的准确性和最新性。 2025-04-18 10:06:05 +08:00
煎饼果子卷鲨鱼辣椒
0c59c68340 mac 2025-04-09 10:38:20 +08:00
煎饼果子卷鲨鱼辣椒
3501dd3602 Merge branch 'master' of https://github.com/yuaotian/go-cursor-help
merge
2025-04-09 10:35:35 +08:00
煎饼果子卷鲨鱼辣椒@86
9eba036c80
Merge pull request #436 from muslim098/add-cursor-free-trial-reset
Add Cursor free trial reset tool
2025-04-09 10:35:23 +08:00
煎饼果子卷鲨鱼辣椒@86
00bbf18ce7
Merge pull request #434 from cursor-home/master
fix: Improve panic recovery mechanism in main function
2025-04-09 10:34:09 +08:00
Abdallah Diaa
2cc31dd77f Add Cursor free trial reset tool
---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/yuaotian/go-cursor-help?shareId=XXXX-XXXX-XXXX-XXXX).
2025-04-09 00:47:38 +02:00
CC11001100
ec954b3130 fix: improve panic recovery in main function
- Move panic recovery defer to the beginning of main function to ensure it can catch panics from all subsequent function calls

- Remove unused setupErrorRecovery function

- Add explanatory comment for the defer placement

This change ensures proper error handling throughout the entire program execution, rather than just within the setupErrorRecovery function scope.
2025-04-08 17:28:39 +08:00
煎饼果子卷鲨鱼辣椒
2ae42e3c2a qun 10 2025-04-08 15:14:19 +08:00
煎饼果子卷鲨鱼辣椒
fc5ea3511b
Merge pull request #393 from hieusats/fix-syntax-error-in-linux-script
Fix syntax error and fix process detection in Linux script
2025-03-31 18:29:15 +08:00
hieu.sats
4daa24e80a Fix process detection in Linux script to avoid terminating itself 2025-03-30 22:41:47 +07:00
hieu.sats
6d53a926e0 Fix syntax error in cursor_linux_id_modifier.sh script 2025-03-30 17:03:09 +07:00
煎饼果子卷鲨鱼辣椒
d47f127ba3 更新README文件中的微信群二维码和有效期信息 2025-03-30 17:16:04 +08:00
煎饼果子卷鲨鱼辣椒
49f5af4827
Merge pull request #387 from hulu798/master
修正脚本Linux版本路径问题
2025-03-30 17:13:16 +08:00
hulu135289
b0455d2c46 修正脚本Linux版本路径问题 2025-03-29 08:14:28 +08:00
煎饼果子卷鲨鱼辣椒
ff17ed48d7 更新cursor_linux_id_modifier.sh和cursor_mac_id_modifier.sh脚本 2025-03-26 23:04:58 +08:00
煎饼果子卷鲨鱼辣椒
df9507a433
Merge pull request #374 from LeaveC/master
Update cursor_mac_id_modifier.sh
2025-03-26 23:00:17 +08:00
LeaveC
f4d8ba125c
Update cursor_mac_id_modifier.sh
去除重置机器码选项
2025-03-26 16:31:40 +08:00
煎饼果子卷鲨鱼辣椒
9ec3f0518c 更新cursor_linux_id_modifier.sh脚本,修改了macOS版本信息的日志输出,注释掉了Linux环境检查的相关代码,并优化了应用修复选项的菜单选择提示,以提升用户交互体验。 2025-03-24 15:09:57 +08:00
煎饼果子卷鲨鱼辣椒
f130869f51
Merge pull request #366 from LeaveC/master
免重置机器码,完美去除app机器码校验
2025-03-24 14:23:31 +08:00
LeaveC
2a382d7faa
免重置机器码,完美去除app机器码校验 2025-03-24 14:18:38 +08:00
LeaveC
fc4f4b870e
免重置机器码,完美去除app机器码校验 2025-03-24 14:14:08 +08:00
煎饼果子卷鲨鱼辣椒
42b6c3f159 重构cursor_mac_id_modifier.sh脚本,新增通用菜单选择函数以提升用户交互体验。优化了用户输入处理逻辑,简化了备份文件恢复和其他选项的选择过程,增强了日志记录功能,确保用户选择的可追溯性。 2025-03-23 20:48:50 +08:00
煎饼果子卷鲨鱼辣椒
d6155e5342 更新README_JP.md文件中的微信群二维码和有效期信息,确保用户获取最新的联系方式和有效期提示。 2025-03-22 15:33:38 +08:00
煎饼果子卷鲨鱼辣椒
f74541b712 Merge branch 'master' of https://github.com/yuaotian/go-cursor-help
he
2025-03-22 15:32:22 +08:00
煎饼果子卷鲨鱼辣椒
b099f4d8a9 更新README文件中的微信群二维码和有效期信息,确保用户获取最新的联系方式和有效期提示。 2025-03-22 15:32:06 +08:00
煎饼果子卷鲨鱼辣椒
d90c9e49d0
Merge pull request #361 from Lintech-1/patch-1
Update cursor_linux_id_modifier.sh
2025-03-22 00:06:02 +08:00
煎饼果子卷鲨鱼辣椒
3b677e23bb
Merge pull request #351 from eltociear/add-japanese-readme
docs: add Japanese README file
2025-03-22 00:05:36 +08:00
Lintech
34b45b5dda
Update cursor_linux_id_modifier.sh
Updated the Linux-specific script to support Cursor v0.47.x, optimized device ID generation logic, enhanced process termination safety, fixed path detection for non-standard installations, improved error handling/logging, added backup/restore functionality, and synchronized multilingual user prompts.
2025-03-21 14:31:27 +03:00
煎饼果子卷鲨鱼辣椒
28de33a5ad 添加修复"应用已损坏"功能到cursor_mac_id_modifier.sh脚本,提供用户选项以解决macOS提示应用已损坏无法打开的问题。增强了日志记录和用户提示信息,提升了脚本的交互性和用户体验。 2025-03-21 19:21:18 +08:00
Ikko Eltociear Ashimine
febb2f551b docs: add Japanese README file
I created Japanese translated README.
2025-03-19 17:54:21 +09:00
煎饼果子卷鲨鱼辣椒
f6cd48a7a5 更新README文件,移除macOS安装脚本中的第一种方法,简化用户操作,确保文档内容更清晰易懂。 2025-03-19 15:33:43 +08:00
煎饼果子卷鲨鱼辣椒
f2e315beac 优化cursor_win_id_modifier.ps1脚本,增强注册表操作的错误处理和用户提示信息,确保在获取和更新MachineGuid时提供更清晰的反馈。同时,简化了备份文件的创建逻辑,仅在原始值存在时进行备份,提升了脚本的稳定性和用户体验。 2025-03-18 00:36:07 +08:00
煎饼果子卷鲨鱼辣椒
5a8d32a807 优化执行macos脚本 2025-03-17 16:59:07 +08:00
煎饼果子卷鲨鱼辣椒
7834b85bde wx_group7.jpg 2025-03-17 16:55:14 +08:00
煎饼果子卷鲨鱼辣椒
6c8a458be2 更新macOS安装脚本,改用临时文件执行以增强安全性和可读性,确保用户在执行过程中获得更好的体验。 2025-03-17 11:34:58 +08:00
煎饼果子卷鲨鱼辣椒
7b0e701422 支持版本更新 2025-03-17 11:17:28 +08:00
21 changed files with 5581 additions and 843 deletions

View File

@ -6,7 +6,7 @@
[![License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square&logo=bookstack)](https://github.com/yuaotian/go-cursor-help/blob/master/LICENSE)
[![Stars](https://img.shields.io/github/stars/yuaotian/go-cursor-help?style=flat-square&logo=github)](https://github.com/yuaotian/go-cursor-help/stargazers)
[🌟 English](README.md) | [🌏 中文](README_CN.md)
[🌟 English](README.md) | [🌏 中文](README_CN.md) | [🌏 日本語](README_JP.md)
<img src="https://ai-cursor.com/wp-content/uploads/2024/09/logo-cursor-ai-png.webp" alt="Cursor Logo" width="120"/>
@ -15,9 +15,8 @@
> ⚠️ **IMPORTANT NOTICE**
>
> This tool currently supports:
> - ✅ Cursor v0.44.11 and below
> - ✅ Windows: Latest 0.47.x versions (Supported)
> - ✅ Mac/Linux: Latest 0.47.x versions (Supported, feedback welcome)
> - ✅ Windows: Latest 0.50.x versions (Supported)
> - ✅ Mac/Linux: Latest 0.50.x versions (Supported, feedback welcome)
>
> Please check your Cursor version before using this tool.
@ -27,21 +26,29 @@
<div class="version-card" style="background: linear-gradient(135deg, #6e8efb, #a777e3); border-radius: 8px; padding: 15px; margin: 10px 0; color: white;">
### 🌟 Latest Versions
- v0.45.11 (2025-02-07) - Latest Release
- v0.44.11 (2025-01-03) - Most Stable Release
[View Full Version History](CursorHistoryDown.md)
[View Full Version History]([CursorHistoryDown.md](https://github.com/oslook/cursor-ai-downloads?tab=readme-ov-file))
</div>
### 📥 Direct Download Links
**v0.44.11 (Recommended Stable Version)**
- Windows: [Official](https://downloader.cursor.sh/builds/250103fqxdt5u9z/windows/nsis/x64) | [Mirror](https://download.todesktop.com/230313mzl4w4u92/Cursor%20Setup%200.44.11%20-%20Build%20250103fqxdt5u9z-x64.exe)
- Mac: [Apple Silicon](https://dl.todesktop.com/230313mzl4w4u92/versions/0.44.11/mac/zip/arm64)
</details>
⚠️ **General Solutions for Cursor**
> 1. Close Cursor, log out of your account, and delete your account in the official website Settings (refresh IP node: Japan, Singapore, USA, Hong Kong, prioritizing low latency - not necessarily required but change if conditions allow; Windows users are recommended to refresh DNS cache: `ipconfig /flushdns`)
> Go to the Cursor official website to delete your current account
> Steps: User avatar -> Setting -> Advanced▼ in the bottom left -> Delete Account
>
> 2. Run the machine code refresh script, see the script address below, available in China
>
> 3. Re-register an account, log in, and open Cursor to resume normal use.
>
> 4. Alternative solution: If still unusable after step [**3**], or if you encounter problems such as account registration failure or inability to delete an account, this usually means your browser has been identified or restricted by the target website (risk control). In this case, try switching browsers, such as: Edge, Google Chrome, Firefox. (Or, consider using a browser that can modify or randomize browser fingerprint information).
---
⚠️ **MAC Address Modification Warning**
>
> For Mac users: This script includes a MAC address modification feature that will:
@ -50,14 +57,6 @@
> - This modification may temporarily affect network connectivity
> - You can skip this step when prompted during execution
>
> 💾 **Download Cursor v0.44.11**
>
> Windows:
> - [Download from Cursor Official](https://downloader.cursor.sh/builds/250103fqxdt5u9z/windows/nsis/x64)
> - [Download from ToDesktop](https://download.todesktop.com/230313mzl4w4u92/Cursor%20Setup%200.44.11%20-%20Build%20250103fqxdt5u9z-x64.exe)
>
> Mac:
> - [Download for Mac (Apple Silicon)](https://dl.todesktop.com/230313mzl4w4u92/versions/0.44.11/mac/zip/arm64)
<details >
<summary><b>🔒 Disable Auto-Update Feature</b></summary>
@ -246,7 +245,8 @@ If you see the "High Load" message for Claude 3.7 Sonnet, this indicates Cursor
**macOS**
```bash
curl -fsSL https://raw.githubusercontent.com/yuaotian/go-cursor-help/refs/heads/master/scripts/run/cursor_mac_id_modifier.sh | sudo bash
# Method two
curl -fsSL https://aizaozao.com/accelerate.php/https://raw.githubusercontent.com/yuaotian/go-cursor-help/refs/heads/master/scripts/run/cursor_mac_id_modifier.sh -o ./cursor_mac_id_modifier.sh && sudo bash ./cursor_mac_id_modifier.sh && rm ./cursor_mac_id_modifier.sh
```
**Linux**
@ -255,6 +255,8 @@ curl -fsSL https://raw.githubusercontent.com/yuaotian/go-cursor-help/refs/heads/
curl -fsSL https://raw.githubusercontent.com/yuaotian/go-cursor-help/refs/heads/master/scripts/run/cursor_linux_id_modifier.sh | sudo bash
```
> **Note for Linux users:** The script attempts to find your Cursor installation by checking common paths (`/usr/bin`, `/usr/local/bin`, `$HOME/.local/bin`, `/opt/cursor`, `/snap/bin`), using the `which cursor` command, and searching within `/usr`, `/opt`, and `$HOME/.local`. If Cursor is installed elsewhere or not found via these methods, the script may fail. Ensure Cursor is accessible via one of these standard locations or methods.
**Windows**
```powershell
@ -273,7 +275,7 @@ irm https://raw.githubusercontent.com/yuaotian/go-cursor-help/refs/heads/master/
**macOS**
```bash
curl -fsSL https://aizaozao.com/accelerate.php/https://raw.githubusercontent.com/yuaotian/go-cursor-help/refs/heads/master/scripts/run/cursor_mac_id_modifier.sh | sudo bash
curl -fsSL https://aizaozao.com/accelerate.php/https://raw.githubusercontent.com/yuaotian/go-cursor-help/refs/heads/master/scripts/run/cursor_mac_id_modifier.sh -o ./cursor_mac_id_modifier.sh && sudo bash ./cursor_mac_id_modifier.sh && rm ./cursor_mac_id_modifier.sh
```
**Linux**
@ -501,8 +503,8 @@ Modifying this registry key may affect:
</td>
<td align="center">
<b>WeChat</b><br>
<img src="img/wx_group6.jpg" width="500" alt="WeChat"><br>
<em>二维码7天内(3月19日前)有效,过期请加微信</em>
<img src="img/qun13.png" width="500" alt="WeChat"><br>
<em>二维码7天内(5月30日前)有效,过期请加微信</em>
</td>
<!-- <td align="center">
<b>ETC</b><br>

View File

@ -6,7 +6,7 @@
[![License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square&logo=bookstack)](https://github.com/yuaotian/go-cursor-help/blob/master/LICENSE)
[![Stars](https://img.shields.io/github/stars/yuaotian/go-cursor-help?style=flat-square&logo=github)](https://github.com/yuaotian/go-cursor-help/stargazers)
[🌟 English](README.md) | [🌏 中文](README_CN.md)
[🌟 English](README.md) | [🌏 中文](README_CN.md) | [🌏 日本語](README_JP.md)
<img src="https://ai-cursor.com/wp-content/uploads/2024/09/logo-cursor-ai-png.webp" alt="Cursor Logo" width="120"/>
@ -15,10 +15,9 @@
> ⚠️ **重要提示**
>
> 本工具当前支持版本:
> - ✅ Cursor v0.44.11 及以下版本
> - ✅ Windows: 最新的 0.47.x 版本(已支持)
> - ✅ Mac/Linux: 最新的 0.47.x 版本(已支持,欢迎测试并反馈问题)
>
> - ✅ Windows: 最新的 0.50.x 版本(已支持)
> - ✅ Mac/Linux: 最新的 0.50.x 版本(已支持,欢迎测试并反馈问题)
> 使用前请确认您的 Cursor 版本。
<details open>
@ -26,22 +25,31 @@
<div class="version-card" style="background: linear-gradient(135deg, #6e8efb, #a777e3); border-radius: 8px; padding: 15px; margin: 10px 0; color: white;">
### 🌟 最新版本
- v0.45.11 (2025-02-07) - 最新发布
- v0.44.11 (2025-01-03) - 最稳定版本
[查看完整版本历史](CursorHistoryDown.md)
[查看完整版本历史]([CursorHistoryDown.md](https://github.com/oslook/cursor-ai-downloads?tab=readme-ov-file))
</div>
### 📥 直接下载链接
**v0.44.11 (推荐稳定版)**
- Windows: [官方下载](https://downloader.cursor.sh/builds/250103fqxdt5u9z/windows/nsis/x64) | [镜像下载](https://download.todesktop.com/230313mzl4w4u92/Cursor%20Setup%200.44.11%20-%20Build%20250103fqxdt5u9z-x64.exe)
- Mac: [Apple Silicon](https://dl.todesktop.com/230313mzl4w4u92/versions/0.44.11/mac/zip/arm64)
</details>
⚠️ **Cursor通用解决方案**
> 1. 关闭Cursor、退出账号、官网Setting删除账号(刷新节点IP日本、新加坡、 美国、香港低延迟为主不一定需要但是有条件就换Windows用户建议刷新DNS缓存`ipconfig /flushdns`)
> 前往Cursor官网删除当前账号
> 步骤:用户头像->Setting-左下角Advanced▼->Delete Account
>
> 2. 刷新机器码脚本,看下面脚本地址,国内可用
>
> 3. 重新注册账号、登录、打开Cursor即可恢复正常使用。
>
> 4. 备用方案:如果步骤 [**3**] 后仍不可用或者遇到注册账号失败、无法删除账号等问题这通常意味着您的浏览器被目标网站识别或限制风控。此时请尝试更换浏览器例如Edge、Google Chrome、Firefox。或者可以尝试使用能够修改或随机化浏览器指纹信息的浏览器
关注大佬公众号煎饼果子卷AI
---
> ⚠️ **MAC地址修改警告**
>
> Mac用户请注意: 本脚本包含MAC地址修改功能将会:
@ -178,7 +186,7 @@ We're experiencing high demand for Claude 3.7 Sonnet right now. Please upgrade t
**macOS**
```bash
curl -fsSL https://aizaozao.com/accelerate.php/https://raw.githubusercontent.com/yuaotian/go-cursor-help/refs/heads/master/scripts/run/cursor_mac_id_modifier.sh | sudo bash
curl -fsSL https://aizaozao.com/accelerate.php/https://raw.githubusercontent.com/yuaotian/go-cursor-help/refs/heads/master/scripts/run/cursor_mac_id_modifier.sh -o ./cursor_mac_id_modifier.sh && sudo bash ./cursor_mac_id_modifier.sh && rm ./cursor_mac_id_modifier.sh
```
**Linux**
@ -187,6 +195,8 @@ curl -fsSL https://aizaozao.com/accelerate.php/https://raw.githubusercontent.com
curl -fsSL https://aizaozao.com/accelerate.php/https://raw.githubusercontent.com/yuaotian/go-cursor-help/refs/heads/master/scripts/run/cursor_linux_id_modifier.sh | sudo bash
```
> **Linux 用户请注意:** 该脚本通过检查常用路径(`/usr/bin`, `/usr/local/bin`, `$HOME/.local/bin`, `/opt/cursor`, `/snap/bin`)、使用 `which cursor` 命令以及在 `/usr``/opt``$HOME/.local` 目录内搜索,来尝试定位您的 Cursor 安装。如果 Cursor 安装在其他位置或通过这些方法无法找到,脚本可能会失败。请确保可以通过这些标准位置或方法之一访问到 Cursor。
**Windows**
```powershell
@ -378,7 +388,7 @@ mv app-update.yml app-update.yml.bak
touch app-update.yml
chmod 444 app-update.yml
# 打开Cursor设置将更新模式设置为“无”该步骤必须执行否则Cursor依然会自动检查更新
# 打开Cursor设置将更新模式设置为"无"该步骤必须执行否则Cursor依然会自动检查更新
# 步骤Settings -> Application -> Update, 将Mode设置为none
# 注意: cursor-updater修改方法可能已失效。但为了以防万一还是删除更新目录并创建阻止文件
@ -395,8 +405,30 @@ touch ~/Library/Application\ Support/Caches/cursor-updater
- ✅ 错误处理和恢复
</details>
<details>
<summary><b>重置 Cursor 免费试用</b></summary>
### 使用 `cursor_free_trial_reset.sh` 脚本
#### macOS
```bash
curl -fsSL https://raw.githubusercontent.com/yuaotian/go-cursor-help/refs/heads/master/scripts/run/cursor_free_trial_reset.sh -o ./cursor_free_trial_reset.sh && sudo bash ./cursor_free_trial_reset.sh && rm ./cursor_free_trial_reset.sh
```
#### Linux
```bash
curl -fsSL https://raw.githubusercontent.com/yuaotian/go-cursor-help/refs/heads/master/scripts/run/cursor_free_trial_reset.sh | sudo bash
```
#### Windows
```powershell
irm https://raw.githubusercontent.com/yuaotian/go-cursor-help/refs/heads/master/scripts/run/cursor_free_trial_reset.sh | iex
```
</details>
## 联系方式
@ -410,8 +442,8 @@ touch ~/Library/Application\ Support/Caches/cursor-updater
</td>
<td align="center">
<b>微信交流群</b><br>
<img src="img/wx_group6.jpg" width="500" alt="WeChat"><br>
<small>二维码7天内(3月19日前)有效,过期请加微信</small>
<img src="img/qun13.png" width="500" alt="WeChat"><br>
<small>二维码7天内(5月30日前)有效,过期请加微信</small>
</td>
<td align="center">
<b>公众号</b><br>

546
README_JP.md Normal file
View File

@ -0,0 +1,546 @@
# 🚀 Cursor 無料試用リセットツール
<div align="center">
[![Release](https://img.shields.io/github/v/release/yuaotian/go-cursor-help?style=flat-square&logo=github&color=blue)](https://github.com/yuaotian/go-cursor-help/releases/latest)
[![License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square&logo=bookstack)](https://github.com/yuaotian/go-cursor-help/blob/master/LICENSE)
[![Stars](https://img.shields.io/github/stars/yuaotian/go-cursor-help?style=flat-square&logo=github)](https://github.com/yuaotian/go-cursor-help/stargazers)
[🌟 English](README.md) | [🌏 中文](README_CN.md) | [🌏 日本語](README_JP.md)
<img src="https://ai-cursor.com/wp-content/uploads/2024/09/logo-cursor-ai-png.webp" alt="Cursor Logo" width="120"/>
</div>
> ⚠️ **重要なお知らせ**
>
> このツールは現在以下のバージョンをサポートしています:
> - ✅ Windows: 最新の0.50.xバージョンサポート済み
> - ✅ Mac/Linux: 最新の0.50.xバージョンサポート済み、フィードバック歓迎
>
> このツールを使用する前に、Cursorのバージョンを確認してください。
<details open>
<summary><b>📦 バージョン履歴とダウンロード</b></summary>
<div class="version-card" style="background: linear-gradient(135deg, #6e8efb, #a777e3); border-radius: 8px; padding: 15px; margin: 10px 0; color: white;">
### 🌟 最新バージョン
[完全なバージョン履歴を見る]([CursorHistoryDown.md](https://github.com/oslook/cursor-ai-downloads?tab=readme-ov-file))
</div>
</details>
⚠️ **Cursorの一般的な解決策**
> 1. Cursorを閉じ、アカウントからログアウトし、公式サイトの設定からアカウントを削除しますIPードを更新日本、シンガポール、アメリカ、香港など、低遅延を優先。必須ではありませんが条件が整えば変更してください。Windowsユーザーの場合はDNSキャッシュの更新をお勧めします`ipconfig /flushdns`
> Cursor公式サイトで現在のアカウントを削除します
> 手順:ユーザーアイコン->設定->左下のAdvanced▼->Delete Account
>
> 2. マシンコードリセットスクリプトを実行します。下記のスクリプトアドレスを参照してください。
>
> 3. アカウントを再登録し、ログインして、Cursorを開くと、正常に使用できるようになります。
>
> 4. 代替案:ステップ[**3**]の後でもまだ使用できない場合、またはアカウント登録に失敗したり、アカウントを削除できないなどの問題が発生した場合、これは通常、ブラウザがターゲットサイトに識別または制限されているリスク管理ことを意味します。この場合、Edge、Google Chrome、Firefoxなど別のブラウザを試してみてくださいまたは、ブラウザのフィンガープリント情報を変更またはランダム化できるブラウザの使用を検討してください
---
⚠️ **MACアドレス変更警告**
>
> Macユーザーの皆様へ: このスクリプトにはMACアドレス変更機能が含まれています。以下の操作が行われます
> - ネットワークインターフェースのMACアドレスを変更します
> - 変更前に元のMACアドレスをバックアップします
> - この変更により一時的にネットワーク接続が影響を受ける可能性があります
> - 実行中にこのステップをスキップすることができます
>
<details >
<summary><b>🔒 自動更新機能の無効化</b></summary>
> Cursorがサポートされていない新しいバージョンに自動的に更新されるのを防ぐために、自動更新機能を無効にすることができます。
#### 方法1: 組み込みスクリプトを使用する(推奨)
リセットツールを実行するとき、スクリプトは自動更新を無効にするかどうかを尋ねます:
```text
[質問] Cursorの自動更新機能を無効にしますか
0) いいえ - デフォルト設定を維持Enterキーを押す
1) はい - 自動更新を無効にする
```
`1`を選択して無効化操作を自動的に完了します。
#### 方法2: 手動で無効化
**Windows:**
1. すべてのCursorプロセスを閉じます
2. ディレクトリを削除します: `%LOCALAPPDATA%\cursor-updater`
3. 同じ名前のファイルを作成します(拡張子なし)
**macOS:**
```bash
# 注意: テスト済みでは、この方法はバージョン0.45.11およびそれ以前のバージョンでのみ機能します。
# Cursorを閉じます
pkill -f "Cursor"
# app-update.ymlを空の読み取り専用ファイルに置き換えます
cd /Applications/Cursor.app/Contents/Resources
mv app-update.yml app-update.yml.bak
touch app-update.yml
chmod 444 app-update.yml
# 設定 -> アプリケーション -> 更新、モードをnoneに設定します。
# これを行わないと、Cursorは更新をチェックし続けます。
# 注意: cursor-updaterの変更方法はもはや有効ではないかもしれません
# いずれにせよ、更新ディレクトリを削除し、ブロックファイルを作成します
rm -rf ~/Library/Application\ Support/Caches/cursor-updater
touch ~/Library/Application\ Support/Caches/cursor-updater
```
**Linux:**
```bash
# Cursorを閉じます
pkill -f "Cursor"
# 更新ディレクトリを削除し、ブロックファイルを作成します
rm -rf ~/.config/cursor-updater
touch ~/.config/cursor-updater
```
> ⚠️ **注意:** 自動更新を無効にした後、新しいバージョンを手動でダウンロードしてインストールする必要があります。新しいバージョンが互換性があることを確認した後に更新することをお勧めします。
</details>
---
### 📝 説明
> これらのメッセージのいずれかに遭遇した場合:
#### 問題1: 試用アカウント制限 <p align="right"><a href="#issue1"><img src="https://img.shields.io/badge/Move%20to%20Solution-Blue?style=plastic" alt="Back To Top"></a></p>
```text
Too many free trial accounts used on this machine.
Please upgrade to pro. We have this limit in place
to prevent abuse. Please let us know if you believe
this is a mistake.
```
#### 問題2: APIキー制限 <p align="right"><a href="#issue2"><img src="https://img.shields.io/badge/Move%20to%20Solution-green?style=plastic" alt="Back To Top"></a></p>
```text
[New Issue]
Composer relies on custom models that cannot be billed to an API key.
Please disable API keys and use a Pro or Business subscription.
Request ID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
```
#### 問題3: 試用リクエスト制限
> これは、VIP無料試用期間中に使用制限に達したことを示しています
```text
You've reached your trial request limit.
```
#### 問題4: Claude 3.7 高負荷 <p align="right"><a href="#issue4"><img src="https://img.shields.io/badge/Move%20to%20Solution-purple?style=plastic" alt="Back To Top"></a></p>
```text
High Load
We're experiencing high demand for Claude 3.7 Sonnet right now. Please upgrade to Pro, or switch to the
'default' model, Claude 3.5 sonnet, another model, or try again in a few moments.
```
<br>
<p id="issue2"></p>
#### 解決策 : Cursorを完全にアンインストールして再インストールするAPIキーの問題
1. [Geek.exeアンインストーラー[無料]](https://geekuninstaller.com/download)をダウンロードします
2. Cursorアプリを完全にアンインストールします
3. Cursorアプリを再インストールします
4. 解決策1を続行します
<br>
<p id="issue1"></p>
> 一時的な解決策:
#### 解決策1: クイックリセット(推奨)
1. Cursorアプリケーションを閉じます
2. マシンコードリセットスクリプトを実行します(以下のインストール手順を参照)
3. Cursorを再度開いて使用を続けます
#### 解決策2: アカウントの切り替え
1. ファイル -> Cursor設定 -> サインアウト
2. Cursorを閉じます
3. マシンコードリセットスクリプトを実行します
4. 新しいアカウントでログインします
#### 解決策3: ネットワークの最適化
上記の解決策が機能しない場合は、次のことを試してください:
- 低遅延ノードに切り替えます(推奨地域:日本、シンガポール、米国、香港)
- ネットワークの安定性を確保します
- ブラウザのキャッシュをクリアして再試行します
#### 解決策4: Claude 3.7 アクセス問題(高負荷)
Claude 3.7 Sonnetの"High Load"メッセージが表示された場合、これはCursorが特定の時間帯に無料試用アカウントの3.7モデルの使用を制限していることを示しています。次のことを試してください:
1. Gmailで作成した新しいアカウントに切り替えます。異なるIPアドレスを使用して接続することをお勧めします
2. 非ピーク時間帯にアクセスを試みます通常、5-10 AMまたは3-7 PMの間に制限が少ないです
3. Proにアップグレードしてアクセスを保証します
4. Claude 3.5 Sonnetを代替オプションとして使用します
> 注意: Cursorがリソース配分ポリシーを調整するにつれて、これらのアクセスパターンは変更される可能性があります。
### 💻 システムサポート
<table>
<tr>
<td>
**Windows** ✅
- x64 (64ビット)
- x86 (32ビット)
</td>
<td>
**macOS** ✅
- Intel (x64)
- Apple Silicon (M1/M2)
</td>
<td>
**Linux** ✅
- x64 (64ビット)
- x86 (32ビット)
- ARM64
</td>
</tr>
</table>
### 🚀 ワンクリックソリューション
<details open>
<summary><b>グローバルユーザー</b></summary>
**macOS**
```bash
# 方法2
curl -fsSL https://aizaozao.com/accelerate.php/https://raw.githubusercontent.com/yuaotian/go-cursor-help/refs/heads/master/scripts/run/cursor_mac_id_modifier.sh -o ./cursor_mac_id_modifier.sh && sudo bash ./cursor_mac_id_modifier.sh && rm ./cursor_mac_id_modifier.sh
```
**Linux**
```bash
curl -fsSL https://raw.githubusercontent.com/yuaotian/go-cursor-help/refs/heads/master/scripts/run/cursor_linux_id_modifier.sh | sudo bash
```
**Windows**
```powershell
irm https://raw.githubusercontent.com/yuaotian/go-cursor-help/refs/heads/master/scripts/run/cursor_win_id_modifier.ps1 | iex
```
<div align="center">
<img src="img/run_success.png" alt="Run Success" width="600"/>
</div>
</details>
<details open>
<summary><b>中国ユーザー(推奨)</b></summary>
**macOS**
```bash
curl -fsSL https://aizaozao.com/accelerate.php/https://raw.githubusercontent.com/yuaotian/go-cursor-help/refs/heads/master/scripts/run/cursor_mac_id_modifier.sh -o ./cursor_mac_id_modifier.sh && sudo bash ./cursor_mac_id_modifier.sh && rm ./cursor_mac_id_modifier.sh
```
**Linux**
```bash
curl -fsSL https://aizaozao.com/accelerate.php/https://raw.githubusercontent.com/yuaotian/go-cursor-help/refs/heads/master/scripts/run/cursor_linux_id_modifier.sh | sudo bash
```
> **Linuxユーザーへの注意** スクリプトは、一般的なパス(`/usr/bin`, `/usr/local/bin`, `$HOME/.local/bin`, `/opt/cursor`, `/snap/bin`)の確認、`which cursor` コマンドの使用、および `/usr``/opt``$HOME/.local` ディレクトリ内の検索によって、Cursor のインストールを見つけようとします。Cursorが他の場所にインストールされているか、これらの方法で見つからない場合、スクリプトは失敗する可能性があります。これらの標準的な場所または方法のいずれかを通じてCursorにアクセスできることを確認してください。
**Windows**
```powershell
irm https://aizaozao.com/accelerate.php/https://raw.githubusercontent.com/yuaotian/go-cursor-help/refs/heads/master/scripts/run/cursor_win_id_modifier.ps1 | iex
```
</details>
<details open>
<summary><b>Windowsターミナルの実行と構成</b></summary>
#### Windowsで管理者ターミナルを開く方法
##### 方法1: Win + Xショートカットを使用する
```md
1. Win + Xキーの組み合わせを押します
2. メニューから次のオプションのいずれかを選択します:
- "Windows PowerShell (管理者)"
- "Windows Terminal (管理者)"
- "ターミナル (管理者)"
Windowsのバージョンによってオプションが異なる場合があります
```
##### 方法2: Win + R実行コマンドを使用する
```md
1. Win + Rキーの組み合わせを押します
2. 実行ダイアログにpowershellまたはpwshと入力します
3. Ctrl + Shift + Enterを押して管理者として実行します
または開いたウィンドウに次のように入力します: Start-Process pwsh -Verb RunAs
4. 管理者ターミナルにリセットスクリプトを入力します:
irm https://aizaozao.com/accelerate.php/https://raw.githubusercontent.com/yuaotian/go-cursor-help/refs/heads/master/scripts/run/cursor_win_id_modifier.ps1 | iex
```
##### 方法3: 検索を使用する
>![PowerShellを検索](img/pwsh_1.png)
>
>検索ボックスにpwshと入力し、右クリックして「管理者として実行」を選択します
>![管理者として実行](img/pwsh_2.png)
管理者ターミナルにリセットスクリプトを入力します:
```powershell
irm https://aizaozao.com/accelerate.php/https://raw.githubusercontent.com/yuaotian/go-cursor-help/refs/heads/master/scripts/run/cursor_win_id_modifier.ps1 | iex
```
### 🔧 PowerShellインストールガイド
システムにPowerShellがインストールされていない場合は、次の方法でインストールできます
#### 方法1: Wingetを使用してインストール推奨
1. コマンドプロンプトまたはPowerShellを開きます
2. 次のコマンドを実行します:
```powershell
winget install --id Microsoft.PowerShell --source winget
```
#### 方法2: 手動でインストール
1. システムに適したインストーラーをダウンロードします:
- [PowerShell-7.4.6-win-x64.msi](https://github.com/PowerShell/PowerShell/releases/download/v7.4.6/PowerShell-7.4.6-win-x64.msi)64ビットシステム用
- [PowerShell-7.4.6-win-x86.msi](https://github.com/PowerShell/PowerShell/releases/download/v7.4.6/PowerShell-7.4.6-win-x86.msi)32ビットシステム用
- [PowerShell-7.4.6-win-arm64.msi](https://github.com/PowerShell/PowerShell/releases/download/v7.4.6/PowerShell-7.4.6-win-arm64.msi)ARM64システム用
2. ダウンロードしたインストーラーをダブルクリックし、インストールの指示に従います
> 💡 問題が発生した場合は、[Microsoft公式インストールガイド](https://learn.microsoft.com/ja-jp/powershell/scripting/install/installing-powershell-on-windows)を参照してください
</details>
#### Windowsインストール機能
- 🔍 PowerShell 7が利用可能な場合は自動的に検出して使用します
- 🛡️ UACプロンプトを介して管理者権限を要求します
- 📝 PS7が見つからない場合はWindows PowerShellにフォールバックします
- 💡 権限昇格に失敗した場合は手動の指示を提供します
これで完了です!スクリプトは次のことを行います:
1. ✨ ツールを自動的にインストールします
2. 🔄 Cursorの試用期間を即座にリセットします
### 📦 手動インストール
> [リリース](https://github.com/yuaotian/go-cursor-help/releases/latest)からシステムに適したファイルをダウンロードします
<details>
<summary>Windowsパッケージ</summary>
- 64ビット: `cursor-id-modifier_windows_x64.exe`
- 32ビット: `cursor-id-modifier_windows_x86.exe`
</details>
<details>
<summary>macOSパッケージ</summary>
- Intel: `cursor-id-modifier_darwin_x64_intel`
- M1/M2: `cursor-id-modifier_darwin_arm64_apple_silicon`
</details>
<details>
<summary>Linuxパッケージ</summary>
- 64ビット: `cursor-id-modifier_linux_x64`
- 32ビット: `cursor-id-modifier_linux_x86`
- ARM64: `cursor-id-modifier_linux_arm64`
</details>
### 🔧 技術的詳細
<details>
<summary><b>構成ファイル</b></summary>
プログラムはCursorの`storage.json`構成ファイルを変更します。場所は次のとおりです:
- Windows: `%APPDATA%\Cursor\User\globalStorage\storage.json`
- macOS: `~/Library/Application Support/Cursor/User/globalStorage/storage.json`
- Linux: `~/.config/Cursor/User/globalStorage/storage.json`
</details>
<details>
<summary><b>変更されたフィールド</b></summary>
ツールは次の新しい一意の識別子を生成します:
- `telemetry.machineId`
- `telemetry.macMachineId`
- `telemetry.devDeviceId`
- `telemetry.sqmId`
</details>
<details>
<summary><b>手動自動更新無効化</b></summary>
Windowsユーザーは自動更新機能を手動で無効にすることができます
1. すべてのCursorプロセスを閉じます
2. ディレクトリを削除します: `C:\Users\username\AppData\Local\cursor-updater`
3. 同じ名前のファイルを作成します: `cursor-updater`(拡張子なし)
macOS/Linuxユーザーはシステム内で同様の`cursor-updater`ディレクトリを見つけて同じ操作を行うことができます。
</details>
<details>
<summary><b>安全機能</b></summary>
- ✅ 安全なプロセス終了
- ✅ アトミックファイル操作
- ✅ エラーハンドリングとリカバリ
</details>
<details>
<summary><b>レジストリ変更通知</b></summary>
> ⚠️ **重要: このツールはWindowsレジストリを変更します**
#### 変更されたレジストリ
- パス: `コンピュータ\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography`
- キー: `MachineGuid`
#### 潜在的な影響
このレジストリキーを変更すると、次のことに影響を与える可能性があります:
- Windowsシステムの一意のデバイス識別
- 特定のソフトウェアのデバイス認識と認証状態
- ハードウェア識別に基づくシステム機能
#### 安全対策
1. 自動バックアップ
- 変更前に元の値が自動的にバックアップされます
- バックアップ場所: `%APPDATA%\Cursor\User\globalStorage\backups`
- バックアップファイル形式: `MachineGuid.backup_YYYYMMDD_HHMMSS`
2. 手動復元手順
- レジストリエディタregeditを開きます
- 次の場所に移動します: `コンピュータ\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography`
- `MachineGuid`を右クリックします
- 「修正」を選択します
- バックアップファイルの値を貼り付けます
#### 重要な注意事項
- 変更前にバックアップファイルの存在を確認します
- 必要に応じてバックアップファイルを使用して元の値を復元します
- レジストリの変更には管理者権限が必要です
</details>
---
### 📚 推奨読書
- [Cursorの問題収集と解決策](https://mp.weixin.qq.com/s/pnJrH7Ifx4WZvseeP1fcEA)
- [AIユニバーサル開発アシスタントプロンプトガイド](https://mp.weixin.qq.com/s/PRPz-qVkFJSgkuEKkTdzwg)
---
## サポート
<div align="center">
<b>このツールが役立つと感じた場合、スパイシーグルテンのおやつLatiaoを買っていただけると嬉しいです~ 💁☕️</b>
<table>
<tr>
<td align="center">
<b>WeChat Pay</b><br>
<img src="img/wx_zsm2.png" width="500" alt="WeChat Pay"><br>
<small>要到饭咧?啊咧?啊咧?不给也没事~ 请随意打赏</small>
</td>
<td align="center">
<b>Alipay</b><br>
<img src="img/alipay.png" width="500" alt="Alipay"><br>
<small>如果觉得有帮助,来包辣条犒劳一下吧~</small>
</td>
<td align="center">
<b>Alipay</b><br>
<img src="img/alipay_scan_pay.jpg" width="500" alt="Alipay"><br>
<em>1 Latiao = 1 AI thought cycle</em>
</td>
<td align="center">
<b>WeChat</b><br>
<img src="img/qun13.png" width="500" alt="WeChat"><br>
<em>二维码7天内(5月30日前)有效,过期请加微信</em>
</td>
<!-- <td align="center">
<b>ETC</b><br>
<img src="img/etc.png" width="100" alt="ETC Address"><br>
ETC: 0xa2745f4CD5d32310AC01694ABDB28bA32D125a6b
</td>
<td align="center"> -->
</td>
</tr>
</table>
</div>
---
## ⭐ プロジェクト統計
<div align="center">
[![Star History Chart](https://api.star-history.com/svg?repos=yuaotian/go-cursor-help&type=Date)](https://star-history.com/#yuaotian/go-cursor-help&Date)
![Repobeats analytics image](https://repobeats.axiom.co/api/embed/ddaa9df9a94b0029ec3fad399e1c1c4e75755477.svg "Repobeats analytics image")
</div>
## 📄 ライセンス
<details>
<summary><b>MITライセンス</b></summary>
Copyright (c) 2024
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
</details>

View File

@ -11,13 +11,13 @@ import (
"runtime/debug"
"strings"
"github.com/sirupsen/logrus"
"github.com/yuaotian/go-cursor-help/internal/config"
"github.com/yuaotian/go-cursor-help/internal/lang"
"github.com/yuaotian/go-cursor-help/internal/process"
"github.com/yuaotian/go-cursor-help/internal/ui"
"github.com/yuaotian/go-cursor-help/pkg/idgen"
"github.com/sirupsen/logrus"
)
// Global variables
@ -29,7 +29,15 @@ var (
)
func main() {
setupErrorRecovery()
// Place defer at the beginning of main to ensure it can catch panics from all subsequent function calls
defer func() {
if r := recover(); r != nil {
log.Errorf("Panic recovered: %v\n", r)
debug.PrintStack()
waitExit()
}
}()
handleFlags()
setupLogger()
@ -73,16 +81,6 @@ func main() {
}
}
func setupErrorRecovery() {
defer func() {
if r := recover(); r != nil {
log.Errorf("Panic recovered: %v\n", r)
debug.PrintStack()
waitExit()
}
}()
}
func handleFlags() {
flag.Parse()
if *showVersion {

BIN
img/qun-10.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 KiB

BIN
img/qun-12.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

BIN
img/qun-8.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 147 KiB

BIN
img/qun11.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 KiB

BIN
img/qun13.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 KiB

BIN
img/qun9.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 KiB

BIN
img/wx_group7.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 181 KiB

View File

@ -0,0 +1,318 @@
msgid ""
msgstr ""
"Project-Id-Version: cursor_id_modifier\n"
"POT-Creation-Date: 2025-04-25 12:00+0000\n"
"PO-Revision-Date: 2025-04-25 12:00+0000\n"
"Language-Team: None\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
msgid "Error: No translation file found for domain 'cursor_id_modifier' in {}/zh_CN/LC_MESSAGES/"
msgstr ""
msgid "========== Cursor ID modification tool log start {} =========="
msgstr ""
msgid "[INFO] {} {}"
msgstr ""
msgid "[WARN] {} {}"
msgstr ""
msgid "[ERROR] {} {}"
msgstr ""
msgid "[DEBUG] {} {}"
msgstr ""
msgid "[CMD] {} Executing command: {}"
msgstr ""
msgid "[CMD] {}:"
msgstr ""
msgid "Unable to get username"
msgstr ""
msgid "Finding Cursor installation path..."
msgstr ""
msgid "Found Cursor installation path: {}"
msgstr ""
msgid "Found Cursor via which: {}"
msgstr ""
msgid "Cursor executable not found, will try using config directory"
msgstr ""
msgid "Found Cursor via search: {}"
msgstr ""
msgid "Finding Cursor resource directory..."
msgstr ""
msgid "Found Cursor resource directory: {}"
msgstr ""
msgid "Found resource directory via binary path: {}"
msgstr ""
msgid "Cursor resource directory not found"
msgstr ""
msgid "Please run this script with sudo"
msgstr ""
msgid "Example: sudo {}"
msgstr ""
msgid "Checking Cursor processes..."
msgstr ""
msgid "Getting process details for {}:"
msgstr ""
msgid "No running Cursor processes found"
msgstr ""
msgid "Found running Cursor processes"
msgstr ""
msgid "Attempting to terminate Cursor processes..."
msgstr ""
msgid "Attempting to forcefully terminate processes..."
msgstr ""
msgid "Waiting for processes to terminate, attempt {}/{}..."
msgstr ""
msgid "Cursor processes successfully terminated"
msgstr ""
msgid "Unable to terminate Cursor processes after {} attempts"
msgstr ""
msgid "Please manually terminate the processes and try again"
msgstr ""
msgid "Configuration file does not exist, skipping backup"
msgstr ""
msgid "Configuration backed up to: {}"
msgstr ""
msgid "Backup failed"
msgstr ""
msgid "File does not exist: {}"
msgstr ""
msgid "Unable to modify file permissions: {}"
msgstr ""
msgid "Generated temporary file is empty"
msgstr ""
msgid "Unable to write to file: {}"
msgstr ""
msgid "Machine code reset options"
msgstr ""
msgid "Do you need to reset the machine code? (Usually, modifying JS files is sufficient):"
msgstr ""
msgid "Don't reset - only modify JS files"
msgstr ""
msgid "Reset - modify both config file and machine code"
msgstr ""
msgid "[INPUT_DEBUG] Machine code reset option selected: {}"
msgstr ""
msgid "You chose to reset the machine code"
msgstr ""
msgid "Found existing configuration file: {}"
msgstr ""
msgid "Setting new device and machine IDs..."
msgstr ""
msgid "New device ID: {}"
msgstr ""
msgid "New machine ID: {}"
msgstr ""
msgid "Configuration file modified successfully"
msgstr ""
msgid "Configuration file modification failed"
msgstr ""
msgid "Configuration file not found, this is normal, skipping ID modification"
msgstr ""
msgid "You chose not to reset the machine code, will only modify JS files"
msgstr ""
msgid "Configuration processing completed"
msgstr ""
msgid "Finding Cursor's JS files..."
msgstr ""
msgid "Searching for JS files in resource directory: {}"
msgstr ""
msgid "Found JS file: {}"
msgstr ""
msgid "No JS files found in resource directory, trying other directories..."
msgstr ""
msgid "Searching directory: {}"
msgstr ""
msgid "No modifiable JS files found"
msgstr ""
msgid "Found {} JS files to modify"
msgstr ""
msgid "Starting to modify Cursor's JS files..."
msgstr ""
msgid "Unable to find modifiable JS files"
msgstr ""
msgid "Processing file: {}"
msgstr ""
msgid "Unable to create backup for file: {}"
msgstr ""
msgid "Found x-cursor-checksum setting code"
msgstr ""
msgid "Successfully modified x-cursor-checksum setting code"
msgstr ""
msgid "Failed to modify x-cursor-checksum setting code"
msgstr ""
msgid "Found IOPlatformUUID keyword"
msgstr ""
msgid "Successfully injected randomUUID call into a$ function"
msgstr ""
msgid "Failed to modify a$ function"
msgstr ""
msgid "Successfully injected randomUUID call into v5 function"
msgstr ""
msgid "Failed to modify v5 function"
msgstr ""
msgid "Completed universal modification"
msgstr ""
msgid "File already contains custom injection code, skipping modification"
msgstr ""
msgid "Completed most universal injection"
msgstr ""
msgid "File has already been modified, skipping modification"
msgstr ""
msgid "Failed to modify any JS files"
msgstr ""
msgid "Successfully modified {} JS files"
msgstr ""
msgid "Disabling Cursor auto-update..."
msgstr ""
msgid "Found update configuration file: {}"
msgstr ""
msgid "Disabled update configuration file: {}"
msgstr ""
msgid "Found updater: {}"
msgstr ""
msgid "Disabled updater: {}"
msgstr ""
msgid "No update configuration files or updaters found"
msgstr ""
msgid "Successfully disabled auto-update"
msgstr ""
msgid "You selected: {}"
msgstr ""
msgid "This script only supports Linux systems"
msgstr ""
msgid "Script started..."
msgstr ""
msgid "System information: {}"
msgstr ""
msgid "Current user: {}"
msgstr ""
msgid "System version information"
msgstr ""
msgid "Cursor Linux startup tool"
msgstr ""
msgid "Important notice"
msgstr ""
msgid "This tool prioritizes modifying JS files, which is safer and more reliable"
msgstr ""
msgid "Modifying Cursor JS files..."
msgstr ""
msgid "JS files modified successfully!"
msgstr ""
msgid "JS file modification failed, but configuration file modification may have succeeded"
msgstr ""
msgid "If Cursor still indicates the device is disabled after restarting, please rerun this script"
msgstr ""
msgid "Please restart Cursor to apply the new configuration"
msgstr ""
msgid "Follow the WeChat public account [Pancake AI] to discuss more Cursor tips and AI knowledge (script is free, join the group via the public account for more tips and experts)"
msgstr ""
msgid "Script execution completed"
msgstr ""
msgid "========== Cursor ID modification tool log end {} =========="
msgstr ""
msgid "Detailed log saved to: {}"
msgstr ""
msgid "If you encounter issues, please provide this log file to the developer for troubleshooting"
msgstr ""

File diff suppressed because it is too large Load Diff

9
scripts/git-actions.sh Executable file
View File

@ -0,0 +1,9 @@
#!/bin/bash
REPO_DIR="$PWD"
LOCALES_DIR="$REPO_DIR/locales"
msginit -i cursor_id_modifier.pot -o $LOCALES_DIR/en_US/LC_MESSAGES/cursor_id_modifier.po -l en_US
for lang in en_US zh_CN; do
cd $LOCALES_DIR/$lang/LC_MESSAGES
msgfmt -o cursor_id_modifier.mo cursor_id_modifier.po
done

View File

@ -0,0 +1,349 @@
msgid ""
msgstr ""
"Project-Id-Version: cursor_id_modifier\n"
"POT-Creation-Date: 2025-04-25 12:00+0000\n"
"PO-Revision-Date: 2025-04-25 09:25-0400\n"
"Language-Team: English\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Last-Translator: Poikilos using Grok <7557867+poikilos@users.noreply.github.com>\n"
"Language: en_US\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
msgid ""
"Error: No translation file found for domain 'cursor_id_modifier' in {}/zh_CN/"
"LC_MESSAGES/"
msgstr ""
"Error: No translation file found for domain 'cursor_id_modifier' in {}/zh_CN/"
"LC_MESSAGES/"
msgid "========== Cursor ID modification tool log start {} =========="
msgstr "========== Cursor ID modification tool log start {} =========="
msgid "[INFO] {} {}"
msgstr "[INFO] {} {}"
msgid "[WARN] {} {}"
msgstr "[WARN] {} {}"
msgid "[ERROR] {} {}"
msgstr "[ERROR] {} {}"
msgid "[DEBUG] {} {}"
msgstr "[DEBUG] {} {}"
msgid "[CMD] {} Executing command: {}"
msgstr "[CMD] {} Executing command: {}"
msgid "[CMD] {}:"
msgstr "[CMD] {}:"
msgid "Unable to get username"
msgstr "Unable to get username"
msgid "Finding Cursor installation path..."
msgstr "Finding Cursor installation path..."
msgid "Found Cursor installation path: {}"
msgstr "Found Cursor installation path: {}"
msgid "Found Cursor via which: {}"
msgstr "Found Cursor via which: {}"
msgid "Cursor executable not found, will try using config directory"
msgstr "Cursor executable not found, will try using config directory"
msgid "Found Cursor via search: {}"
msgstr "Found Cursor via search: {}"
msgid "Finding Cursor resource directory..."
msgstr "Finding Cursor resource directory..."
msgid "Found Cursor resource directory: {}"
msgstr "Found Cursor resource directory: {}"
msgid "Found resource directory via binary path: {}"
msgstr "Found resource directory via binary path: {}"
msgid "Cursor resource directory not found"
msgstr "Cursor resource directory not found"
msgid "Please run this script with sudo"
msgstr "Please run this script with sudo"
msgid "Example: sudo {}"
msgstr "Example: sudo {}"
msgid "Checking Cursor processes..."
msgstr "Checking Cursor processes..."
msgid "Getting process details for {}:"
msgstr "Getting process details for {}:"
msgid "No running Cursor processes found"
msgstr "No running Cursor processes found"
msgid "Found running Cursor processes"
msgstr "Found running Cursor processes"
msgid "Attempting to terminate Cursor processes..."
msgstr "Attempting to terminate Cursor processes..."
msgid "Attempting to forcefully terminate processes..."
msgstr "Attempting to forcefully terminate processes..."
msgid "Waiting for processes to terminate, attempt {}/{}..."
msgstr "Waiting for processes to terminate, attempt {}/{}..."
msgid "Cursor processes successfully terminated"
msgstr "Cursor processes successfully terminated"
msgid "Unable to terminate Cursor processes after {} attempts"
msgstr "Unable to terminate Cursor processes after {} attempts"
msgid "Please manually terminate the processes and try again"
msgstr "Please manually terminate the processes and try again"
msgid "Configuration file does not exist, skipping backup"
msgstr "Configuration file does not exist, skipping backup"
msgid "Configuration backed up to: {}"
msgstr "Configuration backed up to: {}"
msgid "Backup failed"
msgstr "Backup failed"
msgid "File does not exist: {}"
msgstr "File does not exist: {}"
msgid "Unable to modify file permissions: {}"
msgstr "Unable to modify file permissions: {}"
msgid "Generated temporary file is empty"
msgstr "Generated temporary file is empty"
msgid "Unable to write to file: {}"
msgstr "Unable to write to file: {}"
msgid "Machine code reset options"
msgstr "Machine code reset options"
msgid ""
"Do you need to reset the machine code? (Usually, modifying JS files is "
"sufficient):"
msgstr ""
"Do you need to reset the machine code? (Usually, modifying JS files is "
"sufficient):"
msgid "Don't reset - only modify JS files"
msgstr "Don't reset - only modify JS files"
msgid "Reset - modify both config file and machine code"
msgstr "Reset - modify both config file and machine code"
msgid "[INPUT_DEBUG] Machine code reset option selected: {}"
msgstr "[INPUT_DEBUG] Machine code reset option selected: {}"
msgid "You chose to reset the machine code"
msgstr "You chose to reset the machine code"
msgid "Found existing configuration file: {}"
msgstr "Found existing configuration file: {}"
msgid "Setting new device and machine IDs..."
msgstr "Setting new device and machine IDs..."
msgid "New device ID: {}"
msgstr "New device ID: {}"
msgid "New machine ID: {}"
msgstr "New machine ID: {}"
msgid "Configuration file modified successfully"
msgstr "Configuration file modified successfully"
msgid "Configuration file modification failed"
msgstr "Configuration file modification failed"
msgid "Configuration file not found, this is normal, skipping ID modification"
msgstr "Configuration file not found, this is normal, skipping ID modification"
msgid "You chose not to reset the machine code, will only modify JS files"
msgstr "You chose not to reset the machine code, will only modify JS files"
msgid "Configuration processing completed"
msgstr "Configuration processing completed"
msgid "Finding Cursor's JS files..."
msgstr "Finding Cursor's JS files..."
msgid "Searching for JS files in resource directory: {}"
msgstr "Searching for JS files in resource directory: {}"
msgid "Found JS file: {}"
msgstr "Found JS file: {}"
msgid "No JS files found in resource directory, trying other directories..."
msgstr "No JS files found in resource directory, trying other directories..."
msgid "Searching directory: {}"
msgstr "Searching directory: {}"
msgid "No modifiable JS files found"
msgstr "No modifiable JS files found"
msgid "Found {} JS files to modify"
msgstr "Found {} JS files to modify"
msgid "Starting to modify Cursor's JS files..."
msgstr "Starting to modify Cursor's JS files..."
msgid "Unable to find modifiable JS files"
msgstr "Unable to find modifiable JS files"
msgid "Processing file: {}"
msgstr "Processing file: {}"
msgid "Unable to create backup for file: {}"
msgstr "Unable to create backup for file: {}"
msgid "Found x-cursor-checksum setting code"
msgstr "Found x-cursor-checksum setting code"
msgid "Successfully modified x-cursor-checksum setting code"
msgstr "Successfully modified x-cursor-checksum setting code"
msgid "Failed to modify x-cursor-checksum setting code"
msgstr "Failed to modify x-cursor-checksum setting code"
msgid "Found IOPlatformUUID keyword"
msgstr "Found IOPlatformUUID keyword"
msgid "Successfully injected randomUUID call into a$ function"
msgstr "Successfully injected randomUUID call into a$ function"
msgid "Failed to modify a$ function"
msgstr "Failed to modify a$ function"
msgid "Successfully injected randomUUID call into v5 function"
msgstr "Successfully injected randomUUID call into v5 function"
msgid "Failed to modify v5 function"
msgstr "Failed to modify v5 function"
msgid "Completed universal modification"
msgstr "Completed universal modification"
msgid "File already contains custom injection code, skipping modification"
msgstr "File already contains custom injection code, skipping modification"
msgid "Completed most universal injection"
msgstr "Completed most universal injection"
msgid "File has already been modified, skipping modification"
msgstr "File has already been modified, skipping modification"
msgid "Failed to modify any JS files"
msgstr "Failed to modify any JS files"
msgid "Successfully modified {} JS files"
msgstr "Successfully modified {} JS files"
msgid "Disabling Cursor auto-update..."
msgstr "Disabling Cursor auto-update..."
msgid "Found update configuration file: {}"
msgstr "Found update configuration file: {}"
msgid "Disabled update configuration file: {}"
msgstr "Disabled update configuration file: {}"
msgid "Found updater: {}"
msgstr "Found updater: {}"
msgid "Disabled updater: {}"
msgstr "Disabled updater: {}"
msgid "No update configuration files or updaters found"
msgstr "No update configuration files or updaters found"
msgid "Successfully disabled auto-update"
msgstr "Successfully disabled auto-update"
msgid "You selected: {}"
msgstr "You selected: {}"
msgid "This script only supports Linux systems"
msgstr "This script only supports Linux systems"
msgid "Script started..."
msgstr "Script started..."
msgid "System information: {}"
msgstr "System information: {}"
msgid "Current user: {}"
msgstr "Current user: {}"
msgid "System version information"
msgstr "System version information"
msgid "Cursor Linux startup tool"
msgstr "Cursor Linux startup tool"
msgid "Important notice"
msgstr "Important notice"
msgid ""
"This tool prioritizes modifying JS files, which is safer and more reliable"
msgstr ""
"This tool prioritizes modifying JS files, which is safer and more reliable"
msgid "Modifying Cursor JS files..."
msgstr "Modifying Cursor JS files..."
msgid "JS files modified successfully!"
msgstr "JS files modified successfully!"
msgid ""
"JS file modification failed, but configuration file modification may have "
"succeeded"
msgstr ""
"JS file modification failed, but configuration file modification may have "
"succeeded"
msgid ""
"If Cursor still indicates the device is disabled after restarting, please "
"rerun this script"
msgstr ""
"If Cursor still indicates the device is disabled after restarting, please "
"rerun this script"
msgid "Please restart Cursor to apply the new configuration"
msgstr "Please restart Cursor to apply the new configuration"
msgid ""
"Follow the WeChat public account [Pancake AI] to discuss more Cursor tips "
"and AI knowledge (script is free, join the group via the public account for "
"more tips and experts)"
msgstr ""
"Follow the WeChat public account [Pancake AI] to discuss more Cursor tips "
"and AI knowledge (script is free, join the group via the public account for "
"more tips and experts)"
msgid "Script execution completed"
msgstr "Script execution completed"
msgid "========== Cursor ID modification tool log end {} =========="
msgstr "========== Cursor ID modification tool log end {} =========="
msgid "Detailed log saved to: {}"
msgstr "Detailed log saved to: {}"
msgid ""
"If you encounter issues, please provide this log file to the developer for "
"troubleshooting"
msgstr ""
"If you encounter issues, please provide this log file to the developer for "
"troubleshooting"

View File

@ -0,0 +1,320 @@
msgid ""
msgstr ""
"Project-Id-Version: cursor_id_modifier\n"
"POT-Creation-Date: 2025-04-25 12:00+0000\n"
"PO-Revision-Date: 2025-04-25 12:00+0000\n"
"Last-Translator: None\n"
"Language-Team: Chinese\n"
"Language: zh_CN\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
msgid "Error: No translation file found for domain 'cursor_id_modifier' in {}/zh_CN/LC_MESSAGES/"
msgstr "错误:未在 {}/zh_CN/LC_MESSAGES/ 中找到域 'cursor_id_modifier' 的翻译文件"
msgid "========== Cursor ID modification tool log start {} =========="
msgstr "========== Cursor ID 修改工具日志开始 {} =========="
msgid "[INFO] {} {}"
msgstr "[INFO] {} {}"
msgid "[WARN] {} {}"
msgstr "[WARN] {} {}"
msgid "[ERROR] {} {}"
msgstr "[ERROR] {} {}"
msgid "[DEBUG] {} {}"
msgstr "[DEBUG] {} {}"
msgid "[CMD] {} Executing command: {}"
msgstr "[CMD] {} 执行命令: {}"
msgid "[CMD] {}:"
msgstr "[CMD] {}:"
msgid "Unable to get username"
msgstr "无法获取用户名"
msgid "Finding Cursor installation path..."
msgstr "查找Cursor安装路径..."
msgid "Found Cursor installation path: {}"
msgstr "找到Cursor安装路径: {}"
msgid "Found Cursor via which: {}"
msgstr "通过which找到Cursor: {}"
msgid "Cursor executable not found, will try using config directory"
msgstr "未找到Cursor可执行文件将尝试使用配置目录"
msgid "Found Cursor via search: {}"
msgstr "通过查找找到Cursor: {}"
msgid "Finding Cursor resource directory..."
msgstr "查找Cursor资源目录..."
msgid "Found Cursor resource directory: {}"
msgstr "找到Cursor资源目录: {}"
msgid "Found resource directory via binary path: {}"
msgstr "通过二进制路径找到资源目录: {}"
msgid "Cursor resource directory not found"
msgstr "未找到Cursor资源目录"
msgid "Please run this script with sudo"
msgstr "请使用 sudo 运行此脚本"
msgid "Example: sudo {}"
msgstr "示例: sudo {}"
msgid "Checking Cursor processes..."
msgstr "检查 Cursor 进程..."
msgid "Getting process details for {}:"
msgstr "正在获取 {} 进程详细信息:"
msgid "No running Cursor processes found"
msgstr "未发现运行中的 Cursor 进程"
msgid "Found running Cursor processes"
msgstr "发现 Cursor 进程正在运行"
msgid "Attempting to terminate Cursor processes..."
msgstr "尝试关闭 Cursor 进程..."
msgid "Attempting to forcefully terminate processes..."
msgstr "尝试强制终止进程..."
msgid "Waiting for processes to terminate, attempt {}/{}..."
msgstr "等待进程关闭,尝试 {}/{}..."
msgid "Cursor processes successfully terminated"
msgstr "Cursor 进程已成功关闭"
msgid "Unable to terminate Cursor processes after {} attempts"
msgstr "在 {} 次尝试后仍无法关闭 Cursor 进程"
msgid "Please manually terminate the processes and try again"
msgstr "请手动关闭进程后重试"
msgid "Configuration file does not exist, skipping backup"
msgstr "配置文件不存在,跳过备份"
msgid "Configuration backed up to: {}"
msgstr "配置已备份到: {}"
msgid "Backup failed"
msgstr "备份失败"
msgid "File does not exist: {}"
msgstr "文件不存在: {}"
msgid "Unable to modify file permissions: {}"
msgstr "无法修改文件权限: {}"
msgid "Generated temporary file is empty"
msgstr "生成的临时文件为空"
msgid "Unable to write to file: {}"
msgstr "无法写入文件: {}"
msgid "Machine code reset options"
msgstr "机器码重置选项"
msgid "Do you need to reset the machine code? (Usually, modifying JS files is sufficient):"
msgstr "是否需要重置机器码? (通常情况下只修改js文件即可)"
msgid "Don't reset - only modify JS files"
msgstr "不重置 - 仅修改js文件即可"
msgid "Reset - modify both config file and machine code"
msgstr "重置 - 同时修改配置文件和机器码"
msgid "[INPUT_DEBUG] Machine code reset option selected: {}"
msgstr "[INPUT_DEBUG] 机器码重置选项选择: {}"
msgid "You chose to reset the machine code"
msgstr "您选择了重置机器码"
msgid "Found existing configuration file: {}"
msgstr "发现已有配置文件: {}"
msgid "Setting new device and machine IDs..."
msgstr "正在设置新的设备和机器ID..."
msgid "New device ID: {}"
msgstr "新设备ID: {}"
msgid "New machine ID: {}"
msgstr "新机器ID: {}"
msgid "Configuration file modified successfully"
msgstr "配置文件修改成功"
msgid "Configuration file modification failed"
msgstr "配置文件修改失败"
msgid "Configuration file not found, this is normal, skipping ID modification"
msgstr "未找到配置文件这是正常的脚本将跳过ID修改"
msgid "You chose not to reset the machine code, will only modify JS files"
msgstr "您选择了不重置机器码将仅修改js文件"
msgid "Configuration processing completed"
msgstr "配置处理完成"
msgid "Finding Cursor's JS files..."
msgstr "查找Cursor的JS文件..."
msgid "Searching for JS files in resource directory: {}"
msgstr "在资源目录中搜索JS文件: {}"
msgid "Found JS file: {}"
msgstr "找到JS文件: {}"
msgid "No JS files found in resource directory, trying other directories..."
msgstr "在资源目录中未找到JS文件尝试在其他目录中搜索..."
msgid "Searching directory: {}"
msgstr "搜索目录: {}"
msgid "No modifiable JS files found"
msgstr "未找到任何可修改的JS文件"
msgid "Found {} JS files to modify"
msgstr "找到 {} 个JS文件需要修改"
msgid "Starting to modify Cursor's JS files..."
msgstr "开始修改Cursor的JS文件..."
msgid "Unable to find modifiable JS files"
msgstr "无法找到可修改的JS文件"
msgid "Processing file: {}"
msgstr "处理文件: {}"
msgid "Unable to create backup for file: {}"
msgstr "无法创建文件备份: {}"
msgid "Found x-cursor-checksum setting code"
msgstr "找到 x-cursor-checksum 设置代码"
msgid "Successfully modified x-cursor-checksum setting code"
msgstr "成功修改 x-cursor-checksum 设置代码"
msgid "Failed to modify x-cursor-checksum setting code"
msgstr "修改 x-cursor-checksum 设置代码失败"
msgid "Found IOPlatformUUID keyword"
msgstr "找到 IOPlatformUUID 关键字"
msgid "Successfully injected randomUUID call into a$ function"
msgstr "成功注入 randomUUID 调用到 a$ 函数"
msgid "Failed to modify a$ function"
msgstr "修改 a$ 函数失败"
msgid "Successfully injected randomUUID call into v5 function"
msgstr "成功注入 randomUUID 调用到 v5 函数"
msgid "Failed to modify v5 function"
msgstr "修改 v5 函数失败"
msgid "Completed universal modification"
msgstr "完成通用修改"
msgid "File already contains custom injection code, skipping modification"
msgstr "文件已经包含自定义注入代码,跳过修改"
msgid "Completed most universal injection"
msgstr "完成最通用注入"
msgid "File has already been modified, skipping modification"
msgstr "文件已经被修改过,跳过修改"
msgid "Failed to modify any JS files"
msgstr "未能成功修改任何JS文件"
msgid "Successfully modified {} JS files"
msgstr "成功修改了 {} 个JS文件"
msgid "Disabling Cursor auto-update..."
msgstr "正在禁用 Cursor 自动更新..."
msgid "Found update configuration file: {}"
msgstr "找到更新配置文件: {}"
msgid "Disabled update configuration file: {}"
msgstr "已禁用更新配置文件: {}"
msgid "Found updater: {}"
msgstr "找到更新程序: {}"
msgid "Disabled updater: {}"
msgstr "已禁用更新程序: {}"
msgid "No update configuration files or updaters found"
msgstr "未找到任何更新配置文件或更新程序"
msgid "Successfully disabled auto-update"
msgstr "成功禁用了自动更新"
msgid "You selected: {}"
msgstr "您选择了: {}"
msgid "This script only supports Linux systems"
msgstr "本脚本仅支持 Linux 系统"
msgid "Script started..."
msgstr "脚本启动..."
msgid "System information: {}"
msgstr "系统信息: {}"
msgid "Current user: {}"
msgstr "当前用户: {}"
msgid "System version information"
msgstr "系统版本信息"
msgid "Cursor Linux startup tool"
msgstr "Cursor Linux 启动工具"
msgid "Important notice"
msgstr "重要提示"
msgid "This tool prioritizes modifying JS files, which is safer and more reliable"
msgstr "本工具优先修改js文件更加安全可靠"
msgid "Modifying Cursor JS files..."
msgstr "正在修改Cursor JS文件..."
msgid "JS files modified successfully!"
msgstr "JS文件修改成功"
msgid "JS file modification failed, but configuration file modification may have succeeded"
msgstr "JS文件修改失败但配置文件修改可能已成功"
msgid "If Cursor still indicates the device is disabled after restarting, please rerun this script"
msgstr "如果重启后 Cursor 仍然提示设备被禁用,请重新运行此脚本"
msgid "Please restart Cursor to apply the new configuration"
msgstr "请重启 Cursor 以应用新的配置"
msgid "Follow the WeChat public account [Pancake AI] to discuss more Cursor tips and AI knowledge (script is free, join the group via the public account for more tips and experts)"
msgstr "关注公众号【煎饼果子卷AI】一起交流更多Cursor技巧和AI知识(脚本免费、关注公众号加群有更多技巧和大佬)"
msgid "Script execution completed"
msgstr "脚本执行完成"
msgid "========== Cursor ID modification tool log end {} =========="
msgstr "========== Cursor ID 修改工具日志结束 {} =========="
msgid "Detailed log saved to: {}"
msgstr "详细日志已保存到: {}"
msgid "If you encounter issues, please provide this log file to the developer for troubleshooting"
msgstr "如遇问题请将此日志文件提供给开发者以协助排查"

1338
scripts/run/cursor_linux_id_modifier.sh Normal file → Executable file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -13,6 +13,70 @@ $NC = "`e[0m"
$STORAGE_FILE = "$env:APPDATA\Cursor\User\globalStorage\storage.json"
$BACKUP_DIR = "$env:APPDATA\Cursor\User\globalStorage\backups"
# 新增 Cursor 初始化函数
function Cursor-初始化 {
Write-Host "$GREEN[信息]$NC 正在执行 Cursor 初始化清理..."
$BASE_PATH = "$env:APPDATA\Cursor\User"
$filesToDelete = @(
(Join-Path -Path $BASE_PATH -ChildPath "globalStorage\\state.vscdb"),
(Join-Path -Path $BASE_PATH -ChildPath "globalStorage\\state.vscdb.backup")
)
$folderToCleanContents = Join-Path -Path $BASE_PATH -ChildPath "History"
$folderToDeleteCompletely = Join-Path -Path $BASE_PATH -ChildPath "workspaceStorage"
Write-Host "$BLUE[调试]$NC 基础路径: $BASE_PATH"
# 删除指定文件
foreach ($file in $filesToDelete) {
Write-Host "$BLUE[调试]$NC 检查文件: $file"
if (Test-Path $file) {
try {
Remove-Item -Path $file -Force -ErrorAction Stop
Write-Host "$GREEN[成功]$NC 已删除文件: $file"
}
catch {
Write-Host "$RED[错误]$NC 删除文件 $file 失败: $($_.Exception.Message)"
}
} else {
Write-Host "$YELLOW[警告]$NC 文件不存在,跳过删除: $file"
}
}
# 清空指定文件夹内容
Write-Host "$BLUE[调试]$NC 检查待清空文件夹: $folderToCleanContents"
if (Test-Path $folderToCleanContents) {
try {
# 获取子项进行删除,以避免删除 History 文件夹本身
Get-ChildItem -Path $folderToCleanContents -Recurse | Remove-Item -Recurse -Force -ErrorAction Stop
Write-Host "$GREEN[成功]$NC 已清空文件夹内容: $folderToCleanContents"
}
catch {
Write-Host "$RED[错误]$NC 清空文件夹 $folderToCleanContents 内容失败: $($_.Exception.Message)"
}
} else {
Write-Host "$YELLOW[警告]$NC 文件夹不存在,跳过清空: $folderToCleanContents"
}
# 删除指定文件夹及其内容
Write-Host "$BLUE[调试]$NC 检查待删除文件夹: $folderToDeleteCompletely"
if (Test-Path $folderToDeleteCompletely) {
try {
Remove-Item -Path $folderToDeleteCompletely -Recurse -Force -ErrorAction Stop
Write-Host "$GREEN[成功]$NC 已删除文件夹: $folderToDeleteCompletely"
}
catch {
Write-Host "$RED[错误]$NC 删除文件夹 $folderToDeleteCompletely 失败: $($_.Exception.Message)"
}
} else {
Write-Host "$YELLOW[警告]$NC 文件夹不存在,跳过删除: $folderToDeleteCompletely"
}
Write-Host "$GREEN[信息]$NC Cursor 初始化清理完成。"
Write-Host "" # 添加空行以改善输出格式
}
# 检查管理员权限
function Test-Administrator {
$user = [Security.Principal.WindowsIdentity]::GetCurrent()
@ -44,14 +108,15 @@ Write-Host "$GREEN Cursor 设备ID 修改工具 $NC"
Write-Host "$YELLOW 关注公众号【煎饼果子卷AI】 $NC"
Write-Host "$YELLOW 一起交流更多Cursor技巧和AI知识(脚本免费、关注公众号加群有更多技巧和大佬) $NC"
Write-Host "$YELLOW [重要提示] 本工具免费如果对您有帮助请关注公众号【煎饼果子卷AI】 $NC"
Write-Host "$BLUE================================$NC"
Write-Host ""
Write-Host "$YELLOW [小小广告] 出售CursorPro教育号一年质保三个月有需要找我(86)WeChatJavaRookie666 $NC"
Write-Host "$BLUE================================$NC"
# 获取并显示 Cursor 版本
function Get-CursorVersion {
try {
# 主要检测路径
$packagePath = "$env:LOCALAPPDATA\Programs\cursor\resources\app\package.json"
$packagePath = "$env:LOCALAPPDATA\\Programs\\cursor\\resources\\app\\package.json"
if (Test-Path $packagePath) {
$packageJson = Get-Content $packagePath -Raw | ConvertFrom-Json
@ -62,7 +127,7 @@ function Get-CursorVersion {
}
# 备用路径检测
$altPath = "$env:LOCALAPPDATA\cursor\resources\app\package.json"
$altPath = "$env:LOCALAPPDATA\\cursor\\resources\\app\\package.json"
if (Test-Path $altPath) {
$packageJson = Get-Content $altPath -Raw | ConvertFrom-Json
if ($packageJson.version) {
@ -85,7 +150,7 @@ function Get-CursorVersion {
$cursorVersion = Get-CursorVersion
Write-Host ""
Write-Host "$YELLOW[重要提示]$NC 最新的 0.47.x (以支持)"
Write-Host "$YELLOW[重要提示]$NC 最新的 0.50.x (以支持)"
Write-Host ""
# 检查并关闭 Cursor 进程
@ -139,6 +204,9 @@ function Close-CursorProcess {
Close-CursorProcess "Cursor"
Close-CursorProcess "cursor"
# 执行 Cursor 初始化清理
# Cursor-初始化
# 创建备份目录
if (-not (Test-Path $BACKUP_DIR)) {
New-Item -ItemType Directory -Path $BACKUP_DIR | Out-Null
@ -200,42 +268,51 @@ if (-NOT ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdenti
function Update-MachineGuid {
try {
# 检查注册表路径是否存在
# 检查注册表路径是否存在,不存在则创建
$registryPath = "HKLM:\SOFTWARE\Microsoft\Cryptography"
if (-not (Test-Path $registryPath)) {
throw "注册表路径不存在: $registryPath"
Write-Host "$YELLOW[警告]$NC 注册表路径不存在: $registryPath,正在创建..."
New-Item -Path $registryPath -Force | Out-Null
Write-Host "$GREEN[信息]$NC 注册表路径创建成功"
}
# 获取当前的 MachineGuid
$currentGuid = Get-ItemProperty -Path $registryPath -Name MachineGuid -ErrorAction Stop
if (-not $currentGuid) {
throw "无法获取当前的 MachineGuid"
# 获取当前的 MachineGuid如果不存在则使用空字符串作为默认值
$originalGuid = ""
try {
$currentGuid = Get-ItemProperty -Path $registryPath -Name MachineGuid -ErrorAction SilentlyContinue
if ($currentGuid) {
$originalGuid = $currentGuid.MachineGuid
Write-Host "$GREEN[信息]$NC 当前注册表值:"
Write-Host "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography"
Write-Host " MachineGuid REG_SZ $originalGuid"
} else {
Write-Host "$YELLOW[警告]$NC MachineGuid 值不存在,将创建新值"
}
} catch {
Write-Host "$YELLOW[警告]$NC 获取 MachineGuid 失败: $($_.Exception.Message)"
}
$originalGuid = $currentGuid.MachineGuid
Write-Host "$GREEN[信息]$NC 当前注册表值:"
Write-Host "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography"
Write-Host " MachineGuid REG_SZ $originalGuid"
# 创建备份目录(如果不存在)
if (-not (Test-Path $BACKUP_DIR)) {
New-Item -ItemType Directory -Path $BACKUP_DIR -Force | Out-Null
}
# 创建备份文件
$backupFile = "$BACKUP_DIR\MachineGuid_$(Get-Date -Format 'yyyyMMdd_HHmmss').reg"
$backupResult = Start-Process "reg.exe" -ArgumentList "export", "`"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography`"", "`"$backupFile`"" -NoNewWindow -Wait -PassThru
if ($backupResult.ExitCode -eq 0) {
Write-Host "$GREEN[信息]$NC 注册表项已备份到:$backupFile"
} else {
Write-Host "$YELLOW[警告]$NC 备份创建失败,继续执行..."
# 创建备份文件(仅当原始值存在时)
if ($originalGuid) {
$backupFile = "$BACKUP_DIR\MachineGuid_$(Get-Date -Format 'yyyyMMdd_HHmmss').reg"
$backupResult = Start-Process "reg.exe" -ArgumentList "export", "`"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography`"", "`"$backupFile`"" -NoNewWindow -Wait -PassThru
if ($backupResult.ExitCode -eq 0) {
Write-Host "$GREEN[信息]$NC 注册表项已备份到:$backupFile"
} else {
Write-Host "$YELLOW[警告]$NC 备份创建失败,继续执行..."
}
}
# 生成新GUID
$newGuid = [System.Guid]::NewGuid().ToString()
# 更新注册表
# 更新或创建注册表
Set-ItemProperty -Path $registryPath -Name MachineGuid -Value $newGuid -Force -ErrorAction Stop
# 验证更新
@ -252,8 +329,8 @@ function Update-MachineGuid {
catch {
Write-Host "$RED[错误]$NC 注册表操作失败:$($_.Exception.Message)"
# 尝试恢复备份
if ($backupFile -and (Test-Path $backupFile)) {
# 尝试恢复备份(如果存在)
if (($backupFile -ne $null) -and (Test-Path $backupFile)) {
Write-Host "$YELLOW[恢复]$NC 正在从备份恢复..."
$restoreResult = Start-Process "reg.exe" -ArgumentList "import", "`"$backupFile`"" -NoNewWindow -Wait -PassThru
@ -527,44 +604,4 @@ function Write-ConfigFile {
catch {
throw "写入配置文件失败: $_"
}
}
function Compare-Version {
param (
[string]$version1,
[string]$version2
)
try {
$v1 = [version]($version1 -replace '[^\d\.].*$')
$v2 = [version]($version2 -replace '[^\d\.].*$')
return $v1.CompareTo($v2)
}
catch {
Write-Host "$RED[错误]$NC 版本比较失败: $_"
return 0
}
}
# 在主流程开始时添加版本检查
Write-Host "$GREEN[信息]$NC 正在检查 Cursor 版本..."
$cursorVersion = Get-CursorVersion
if ($cursorVersion) {
$compareResult = Compare-Version $cursorVersion "0.45.0"
if ($compareResult -ge 0) {
Write-Host "$RED[错误]$NC 当前版本 ($cursorVersion) 暂不支持"
Write-Host "$YELLOW[建议]$NC 请使用 v0.44.11 及以下版本"
Write-Host "$YELLOW[建议]$NC 可以从以下地址下载支持的版本:"
Write-Host "Windows: https://download.todesktop.com/230313mzl4w4u92/Cursor%20Setup%200.44.11%20-%20Build%20250103fqxdt5u9z-x64.exe"
Write-Host "Mac ARM64: https://dl.todesktop.com/230313mzl4w4u92/versions/0.44.11/mac/zip/arm64"
Read-Host "按回车键退出"
exit 1
}
else {
Write-Host "$GREEN[信息]$NC 当前版本 ($cursorVersion) 支持重置功能"
}
}
else {
Write-Host "$YELLOW[警告]$NC 无法检测版本,将继续执行..."
}