mirror of
https://github.com/yuaotian/go-cursor-help.git
synced 2025-06-08 04:22:06 +08:00
在临时修改系统 MAC 地址的功能中新增检查,以确保文件中是否已存在 randomDeviceId_ 时间戳模式。此更改通过日志记录跳过通用注入,提升了功能的可靠性和用户体验。
This commit is contained in:
parent
a2d55a00a2
commit
207689ff56
@ -598,7 +598,15 @@ modify_cursor_app_files() {
|
|||||||
((modified_count++))
|
((modified_count++))
|
||||||
continue
|
continue
|
||||||
fi
|
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 "未找到具体函数,尝试使用通用修改方法"
|
log_warn "未找到具体函数,尝试使用通用修改方法"
|
||||||
inject_code="
|
inject_code="
|
||||||
|
Loading…
x
Reference in New Issue
Block a user