Browse Source

在临时修改系统 MAC 地址的功能中新增检查,以确保文件中是否已存在 randomDeviceId_ 时间戳模式。此更改通过日志记录跳过通用注入,提升了功能的可靠性和用户体验。

pull/483/head v0.0.150
煎饼果子卷鲨鱼辣椒 1 month ago
parent
commit
207689ff56
  1. 8
      scripts/run/cursor_mac_id_modifier.sh

8
scripts/run/cursor_mac_id_modifier.sh

@ -599,6 +599,14 @@ modify_cursor_app_files() {
continue
fi
# 新增检查:检查是否已存在 randomDeviceId_ 时间戳模式
if grep -q "const randomDeviceId_[0-9]\\{10,\\}" "$file"; then
log_info "文件已经包含 randomDeviceId_ 模式,跳过通用注入"
echo "[FOUND] 文件已包含 randomDeviceId_ 模式,跳过通用注入: $file" >> "$LOG_FILE"
((modified_count++)) # 计为已修改,防止后续尝试其他方法
continue
fi
# 使用更通用的注入方法
log_warn "未找到具体函数,尝试使用通用修改方法"
inject_code="

Loading…
Cancel
Save