Files
hello_js_reverse_skill/tcaptcha/web/static/index.html
T
yml2213 99565f65f0 feat(web): 新增 Web 观测台(形态 A)+ 抽出 render/targets 共用层
- tcaptcha/web/:FastAPI + SSE + 零构建单页。把同步阻塞的 solve() 包成可观测
  后台任务(工作线程 + 全局串行,因 onnxruntime session 非线程安全),用
  logging.Handler 零侵入把 client 日志变成事件流;按靶子实测 min_interval 强制节流。
- tcaptcha/render.py:标注图(点击顺序编号 + 质心偏差)与点位量尺,CLI 与 web 共用。
- tcaptcha/targets.py:靶子表提为单一来源(含实测频控间隔 1ms=60s / mliev=3s)。
- fastapi/uvicorn 走 optional extra `web`,核心包零 web 依赖(带回归断言)。
- 修两个真 bug:hook 求解器时 args[0] 是实例自身(真入参从 args[1] 起);
  client 默认每次新建 solver,预热实例未被复用(每发重载 56MB ONNX)。
- 复验:icon/text/slider 三题型各拿到 errorCode=0;selftest 全绿;依赖隔离通过。

用法:uv run --extra web python -m tcaptcha.web.app
2026-10-14 19:10:54 +08:00

69 lines
2.2 KiB
HTML

<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>tcaptcha 观测台</title>
<link rel="stylesheet" href="/static/style.css">
</head>
<body>
<header>
<div class="brand">
<h1>tcaptcha 观测台</h1>
<span class="sub">腾讯天御验证码 · 纯协议求解 · 实时观测</span>
</div>
<div class="controls">
<label>靶子
<select id="target"></select>
</label>
<label>题型
<select id="kind">
<option value="any">any 遇到啥过啥(推荐)</option>
<option value="icon">icon 图标点选 2408</option>
<option value="text">text 文字点选 2404</option>
<option value="slider">slider 滑块 2401/2402</option>
</select>
</label>
<button id="start" class="primary">开始一发</button>
<button id="cancel" disabled>取消</button>
<span id="cooldown" class="cooldown"></span>
</div>
<div id="targetNote" class="note"></div>
</header>
<main>
<section class="panel">
<h2>执行轨迹 <span id="state" class="badge">空闲</span>
<span id="jobId" class="mono muted"></span>
</h2>
<div id="log" class="log"></div>
</section>
<section class="panel">
<h2>题目 / 点位 / 结果</h2>
<div id="result" class="result"><p class="muted">还没有任务。选好靶子与题型,点「开始一发」。</p></div>
<div id="images" class="images"></div>
</section>
</main>
<section class="panel wide">
<h2>历史任务</h2>
<table id="history">
<thead>
<tr><th>时间</th><th>靶子</th><th>题型</th><th>errorCode</th><th>耗时</th><th>点位</th><th>ticket</th></tr>
</thead>
<tbody></tbody>
</table>
</section>
<footer class="legend">
<span><b class="ec0">0</b> 通过</span>
<span><b class="ec50">50 / 9</b> 答案被否(点位或目标错)</span>
<span><b class="ec12">12</b> 包级拒答(轨迹指纹 / 频控)</span>
<span class="muted">靶子带实测最小间隔,后端会强制节流</span>
</footer>
<script src="/static/app.js"></script>
</body>
</html>