mirror of
https://github.com/hotyue/IP-Sentinel.git
synced 2026-09-05 23:49:56 +08:00
fix(core): 为深海声呐探针拉取引入源文件基因防伪校验,彻底阻断 HTML 投毒与网络劫持导致的假死变砖
This commit is contained in:
+6
-1
@@ -139,10 +139,15 @@ fi
|
|||||||
# ==========================================================
|
# ==========================================================
|
||||||
TMP_PROBE="/tmp/ip_sentinel_probe.sh"
|
TMP_PROBE="/tmp/ip_sentinel_probe.sh"
|
||||||
$CURL_CMD "https://raw.githubusercontent.com/xykt/IPQuality/main/ip.sh" -o "$TMP_PROBE"
|
$CURL_CMD "https://raw.githubusercontent.com/xykt/IPQuality/main/ip.sh" -o "$TMP_PROBE"
|
||||||
if [ -s "$TMP_PROBE" ]; then
|
|
||||||
|
# 🛡️ 供应链防毒:验证脚本内是否包含原作者特有签名,防止被墙重定向为 HTML
|
||||||
|
if [ -s "$TMP_PROBE" ] && grep -q "xykt" "$TMP_PROBE" 2>/dev/null; then
|
||||||
mv "$TMP_PROBE" "${INSTALL_DIR}/core/ip_probe.sh"
|
mv "$TMP_PROBE" "${INSTALL_DIR}/core/ip_probe.sh"
|
||||||
chmod +x "${INSTALL_DIR}/core/ip_probe.sh"
|
chmod +x "${INSTALL_DIR}/core/ip_probe.sh"
|
||||||
log "Updater" "INFO " "✅ 深海声呐底层探针 (ip_probe.sh) 源文件安全对齐"
|
log "Updater" "INFO " "✅ 深海声呐底层探针 (ip_probe.sh) 源文件安全对齐"
|
||||||
|
else
|
||||||
|
log "Updater" "WARN " "❌ 探针源文件拉取受损或遭投毒劫持,已触发防砖机制,保留本地旧版本"
|
||||||
|
rm -f "$TMP_PROBE" 2>/dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# ==========================================================
|
# ==========================================================
|
||||||
|
|||||||
Reference in New Issue
Block a user