资源共享

菇太帷i Lv4

佬友可自行添加
以下全是无需付费的学习版游戏,如果有付费可帮忙删除下

游戏天堂

─────游戏天堂─────
flysheep资源避难所 - 单机游戏资源站
Switch520 - Switch游戏资源站(网盘)
Switch618 普通用户,每日可下载的资源数量1个
Nexus mods and community - 游戏模组社区
Koyso - 单机游戏资源站(直链)
离线啦 - STEAM游戏账号分享论坛
有叽叽游戏社 - 单机游戏论坛
GBT乐赏游戏空间 现已404
奔跑中的奶酪 - 游戏资源导航站
小叽资源 - 游戏资源站(网盘)
ByRutor - 游戏资源站(磁链)
FitGirl Repacks - 单机游戏资源站(磁链)
Online-Fix - 联机游戏资源站(磁链)

原帖: https://linux.do/t/topic/197015?u=z_heb

CursorPro.env

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# 你的CF路由填写的域名
DOMAIN=gutaiwei.me
# 邮件服务地址
# 注册临时邮件服务 https://tempmail.plus
TEMP_MAIL=damoz
# 设置的PIN码
TEMP_MAIL_EPIN=gutaiwei
# 使用的后缀
TEMP_MAIL_EXT=@mailto.plus
BROWSER_USER_AGENT=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.6723.92 Safari/537.36

# 代理
# BROWSER_PROXY='http://127.0.0.1:2080'

# 无头模式 默认开启
# BROWSER_HEADLESS='True'

Cursor 机器码重置

原帖:cursor继续

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
import sys

# 检查 Python 版本
if sys.version_info[0] < 3:
print("错误: 此脚本需要 Python 3")
sys.exit(1)

import json
import os
from pathlib import Path
import argparse
import hashlib
import uuid
import random
import string
import subprocess

def get_config_path():
"""根据不同操作系统返回配置文件路径"""
if sys.platform == "darwin": # macOS
base_path = Path("~/Library/Application Support/Cursor/User/globalStorage")
elif sys.platform == "win32": # Windows
base_path = Path(os.environ.get("APPDATA", "")) / "Cursor/User/globalStorage"
else: # Linux 和其他类Unix系统
base_path = Path("~/.config/Cursor/User/globalStorage")

return Path(os.path.expanduser(str(base_path))) / "storage.json"

CONFIG_PATH = get_config_path()

def is_cursor_running():
"""检查 Cursor 是否正在运行(不依赖第三方库)"""
try:
if sys.platform == "win32":
# Windows
output = subprocess.check_output('tasklist', shell=True).decode()
return 'cursor' in output.lower()
else:
# Unix-like systems (Linux, macOS)
output = subprocess.check_output(['ps', 'aux']).decode()
return 'cursor' in output.lower()
except:
return False # 如果出错,假设进程未运行

def check_cursor_process(func):
"""装饰器:检查 Cursor 进程"""
def wrapper(*args, **kwargs):
if is_cursor_running():
print("警告: 检测到 Cursor 正在运行!")
print("请先关闭 Cursor 再执行操作,否则修改可能会被覆盖。")
choice = input("是否继续?(y/N): ")
if choice.lower() != 'y':
return
return func(*args, **kwargs)
return wrapper

def show_config():
"""显示当前配置文件的内容"""
try:
if not CONFIG_PATH.exists():
print(f"配置文件不存在: {CONFIG_PATH}")
return

with open(CONFIG_PATH, 'r', encoding='utf-8') as f:
data = json.load(f)
print(json.dumps(data, indent=2, ensure_ascii=False))
except Exception as e:
print(f"读取配置文件时出错: {str(e)}")

def get_value(key):
"""获取指定键的值"""
try:
if not CONFIG_PATH.exists():
print(f"配置文件不存在: {CONFIG_PATH}")
return

with open(CONFIG_PATH, 'r', encoding='utf-8') as f:
data = json.load(f)
value = data.get(key)
if value is None:
print(f"未找到键: {key}")
else:
print(json.dumps(value, indent=2, ensure_ascii=False))
except Exception as e:
print(f"读取配置文件时出错: {str(e)}")

def get_machine_ids():
"""获取机器 ID 信息"""
try:
if not CONFIG_PATH.exists():
print(f"配置文件不存在: {CONFIG_PATH}")
return

with open(CONFIG_PATH, 'r', encoding='utf-8') as f:
data = json.load(f)
mac_id = data.get("telemetry.macMachineId", "未设置")
machine_id = data.get("telemetry.machineId", "未设置")
print(f"Mac机器ID: {mac_id}")
print(f"机器ID: {machine_id}")
except Exception as e:
print(f"读取配置文件时出错: {str(e)}")

@check_cursor_process
def set_value(key, value):
"""设置指定键的值"""
try:
data = {}
if CONFIG_PATH.exists():
with open(CONFIG_PATH, 'r', encoding='utf-8') as f:
data = json.load(f)

# 尝试将输入的值转换为 JSON
try:
value = json.loads(value)
except json.JSONDecodeError:
# 如果不是有效的 JSON,就按字符串处理
pass

data[key] = value

# 确保目录存在
CONFIG_PATH.parent.mkdir(parents=True, exist_ok=True)

with open(CONFIG_PATH, 'w', encoding='utf-8') as f:
json.dump(data, f, indent=2, ensure_ascii=False)
print(f"已设置 {key} = {value}")
except Exception as e:
print(f"设置值时出错: {str(e)}")

@check_cursor_process
def reset_machine_ids():
"""重置机器 ID"""
try:
if not CONFIG_PATH.exists():
print(f"配置文件不存在: {CONFIG_PATH}")
return

with open(CONFIG_PATH, 'r', encoding='utf-8') as f:
data = json.load(f)

# 删除遥测 ID
data.pop("telemetry.macMachineId", None)
data.pop("telemetry.machineId", None)

with open(CONFIG_PATH, 'w', encoding='utf-8') as f:
json.dump(data, f, indent=2, ensure_ascii=False)
print("已成功重置机器 ID")
except Exception as e:
print(f"重置机器 ID 时出错: {str(e)}")

@check_cursor_process
def generate_random_machine_ids():
"""生成随机的机器 ID"""
try:
if not CONFIG_PATH.exists():
print(f"配置文件不存在: {CONFIG_PATH}")
return

# 生成随机字符串并计算其哈希值
def generate_random_hash():
random_str = ''.join(random.choices(string.ascii_letters + string.digits, k=32))
random_str += str(uuid.uuid4()) # 添加 UUID 增加随机性
return hashlib.sha256(random_str.encode()).hexdigest()

with open(CONFIG_PATH, 'r', encoding='utf-8') as f:
data = json.load(f)

# 生成新的 ID
data["telemetry.macMachineId"] = generate_random_hash()
data["telemetry.machineId"] = generate_random_hash()

with open(CONFIG_PATH, 'w', encoding='utf-8') as f:
json.dump(data, f, indent=2, ensure_ascii=False)

print("已生成新的机器 ID:")
print(f"Mac机器ID: {data['telemetry.macMachineId']}")
print(f"机器ID: {data['telemetry.machineId']}")
except Exception as e:
print(f"生成机器 ID 时出错: {str(e)}")

def main():
parser = argparse.ArgumentParser(description='管理 Cursor 配置文件的命令行工具')
subparsers = parser.add_subparsers(dest='command', help='可用命令')

# show 命令
subparsers.add_parser('show', help='显示当前配置文件的内容')

# get 命令
get_parser = subparsers.add_parser('get', help='获取指定键的值')
get_parser.add_argument('key', help='键名')

# set 命令
set_parser = subparsers.add_parser('set', help='设置指定键的值')
set_parser.add_argument('key', help='键名')
set_parser.add_argument('value', help='值')

# 机器 ID 相关命令
subparsers.add_parser('ids', help='显示机器 ID 信息')
subparsers.add_parser('reset-ids', help='重置机器 ID')
subparsers.add_parser('random-ids', help='生成随机机器 ID')

args = parser.parse_args()

if args.command == 'show':
show_config()
elif args.command == 'get':
get_value(args.key)
elif args.command == 'set':
set_value(args.key, args.value)
elif args.command == 'ids':
get_machine_ids()
elif args.command == 'reset-ids':
reset_machine_ids()
elif args.command == 'random-ids':
generate_random_machine_ids()
else:
parser.print_help()

if __name__ == '__main__':
main()

使用命令行工具运行脚本。例如:

  • 显示配置文件内容:

    1
    python cursor_manager.py show
  • 获取指定键的值:

    1
    python cursor_manager.py get 键名

    替换 键名 为配置文件中的实际键名。

  • 设置键值:

    1
    python cursor_manager.py set 键名 值

    替换 键名 为你想要设置的键值对。

  • 显示机器 ID 信息:

    1
    python cursor_manager.py ids
  • 重置机器 ID:

    1
    python cursor_manager.py reset-ids
  • 生成随机机器 ID:

    1
    python cursor_manager.py random-ids

备用免费的订阅

  • 标题: 资源共享
  • 作者: 菇太帷i
  • 创建于 : 2024-10-18 11:58:00
  • 更新于 : 2025-09-18 06:39:53
  • 链接: https://blog.gutawei.com/2024/10/18/CCC/
  • 版权声明: 本文章采用 CC BY-NC-SA 4.0 进行许可。
评论