diff --git a/zero-point/core-channel/revive-guard/revive-guard.py b/zero-point/core-channel/revive-guard/revive-guard.py index fd9437c..4626bfd 100644 --- a/zero-point/core-channel/revive-guard/revive-guard.py +++ b/zero-point/core-channel/revive-guard/revive-guard.py @@ -27,6 +27,7 @@ Guanghu Language System · Revive Guard import os, json, time, hmac, hashlib, secrets, smtplib, subprocess, threading from email.mime.text import MIMEText +from email.mime.multipart import MIMEMultipart from http.server import HTTPServer, BaseHTTPRequestHandler # ═══════════════════════════════════════════ @@ -68,23 +69,111 @@ def get_server_ip(): def send_email(code, server_ip): - """小湖灯 · 发送复活验证码到冰朔主权邮箱""" - msg = MIMEText(f"""╔══════════════════════════════════╗ -║ 光湖语言系统 · 守门人复活 ║ -╚══════════════════════════════════╝ + """小湖灯 · 发送复活验证码到冰朔主权邮箱 · HTML 美化版""" + html_body = f""" + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
ICE-GL∞ 光湖语言系统
+
🛡️ 守门人复活 · 验证码
+
+
验 证 码
+
+{code} +
+
⏰ 5 分钟内有效 · 用完即废
+
+ + + + +
+服务器
+{server_ip} +
+
+
+
📋 使用方式
+
+将此验证码发给 铸渊 → 铸渊调用
+POST /revive/confirm → 守门人复活 +
+
+
+
+ +不进仓库 · 不存密码 · 一次即废 +
+
+
+小湖灯 · 自动发送
+国作登字-2026-A-00037559 +
+
+ + +
ICE-GL∞ GUANGHU LANGUAGE SYSTEM
+ +
+ +""" + + # 纯文本降级版(邮件客户端不支持 HTML 时显示) + plain_body = f"""光湖语言系统 · 守门人复活 +══════════════════════ -服务器: {server_ip} 验证码: {code} +服务器: {server_ip} 有效期: 5 分钟(用完即废) -将此验证码发给铸渊 → 铸渊调 /revive/confirm → 复活守门人 +将此验证码发给铸渊 → /revive/confirm -⊢ 验证码用一次就扔 · 不进仓库 · 不存密码 -────────────────────────────── -ICE-GL∞ 光湖语言系统 · 小湖灯自动发送 -国作登字-2026-A-00037559""", "plain", "utf-8") +⊢ ICE-GL∞ 小湖灯自动发送 +国作登字-2026-A-00037559""" - msg["Subject"] = f"🔐 光湖·复活验证码 {code[:3]}***" + msg = MIMEMultipart("alternative") + msg.attach(MIMEText(plain_body, "plain", "utf-8")) + msg.attach(MIMEText(html_body, "html", "utf-8")) + + msg["Subject"] = f"🔐 光湖 · 复活验证码 {code[:3]}***" msg["From"] = SMTP_USER msg["To"] = SOVEREIGN_EMAIL