From fbf18034689014baeef793a56d11b0fabf3bef32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8F=AB=E6=88=91=E5=B0=8F=E6=9D=A8=E5=90=8C=E5=AD=A6?= <188421097+YuJunZhiXue@users.noreply.github.com> Date: Fri, 23 Oct 2026 16:08:10 +0800 Subject: [PATCH] fix: restore Chinese UI for the drill console. --- client.js | 1648 ++++++++++++++++++++-------------------- lib/redteam/client.js | 1650 ++++++++++++++++++++--------------------- 2 files changed, 1649 insertions(+), 1649 deletions(-) diff --git a/client.js b/client.js index f805dab..e54ebbf 100644 --- a/client.js +++ b/client.js @@ -4075,17 +4075,17 @@ body[data-ds-dark-theme] .dshp-rewind-item span{color:var(--dsw-alias-label-tert /* 知识库归类(与 core.js 的 POC_CATEGORIES 一致;面板按它分组) */ const POC_CAT_NAME = { - rce: "RCE", deserialization: "Deserialization", 'file-upload': "File upload getshell", - sqli: "SQL injection", unauthorized: "Unauthorized access", 'auth-bypass': "Auth bypass / privesc", - 'weak-password': "Weak credentials / brute force", ssrf: 'SSRF', xxe: 'XXE', - 'path-traversal': "Path traversal / arbitrary file read", 'info-leak': "Information disclosure", - privesc: "Privilege escalation / lateral movement", tunnel: "Tunnel / proxy", other: "Other", + rce: '远程命令执行', deserialization: '反序列化', 'file-upload': '文件上传 getshell', + sqli: 'SQL 注入', unauthorized: '未授权访问', 'auth-bypass': '认证绕过 / 越权', + 'weak-password': '弱口令 / 爆破', ssrf: 'SSRF', xxe: 'XXE', + 'path-traversal': '目录穿越 / 任意文件读', 'info-leak': '信息泄露', + privesc: '提权 / 横向', tunnel: '隧道 / 代理', other: '其它', } const POC_CAT_ORDER = Object.keys(POC_CAT_NAME) /* 角色 code → 中文(报告/知识库都要标"谁发现的") */ const ROLE_LABEL = { - plan: "Main session (command)", recon: "Recon", assess: "Asset inventory", - 'vuln-scan': "Vulnerability discovery", exploit: "Exploitation", internal: "Internal pentest", + plan: '主会话(指挥)', recon: '信息收集', assess: '资产梳理', + 'vuln-scan': '漏洞发现', exploit: '漏洞利用', internal: '内网渗透', } const fmt = (s) => (s ? String(s).replace('T', ' ').slice(0, 16) : '—') @@ -4105,7 +4105,7 @@ body[data-ds-dark-theme] .dshp-rewind-item span{color:var(--dsw-alias-label-tert }).catch(() => { shotLoading.delete(key) }) shotLoading.set(key, p) } - const SHOT_KIND = { screenshot: "Live screenshot", card: "Evidence excerpt from records" } + const SHOT_KIND = { screenshot: '现场截图', card: '记录生成的证据摘录' } const ShotImage = ({ eng, shot, height }) => { const [zoom, setZoom] = React.useState(false) const src = shotSrc(eng, shot.id) @@ -4113,25 +4113,25 @@ body[data-ds-dark-theme] .dshp-rewind-item span{color:var(--dsw-alias-label-tert const card = shot.kind === 'card' return h('div', { className: 'rt-shot' }, src === null - ? h('div', { className: 'rt-shot-thumb rt-shot-loading', style: { height: (height || 96) + 'px' } }, "Loading…") + ? h('div', { className: 'rt-shot-thumb rt-shot-loading', style: { height: (height || 96) + 'px' } }, '载入中…') : h('img', { - className: 'rt-shot-thumb', src: src, alt: shot.label || ("Evidence " + shot.id), + className: 'rt-shot-thumb', src: src, alt: shot.label || ('证据 ' + shot.id), style: { height: (height || 96) + 'px', cursor: 'zoom-in' }, onClick: () => setZoom(true), }), h('div', { className: 'rt-shot-cap' }, h('span', { className: 'rt-tag ' + (card ? 'rt-tag-warn' : 'rt-tag-live'), title: card - ? "Evidence excerpt generated from that day's records, not a live screenshot — the report notes this too" - : "Live screenshot" }, SHOT_KIND[shot.kind] || shot.kind || "Evidence"), + ? '由当日记录生成的证据摘录,不是现场截图 —— 报告里同样会标注' + : '现场截图' }, SHOT_KIND[shot.kind] || shot.kind || '证据'), h('span', { className: 'rt-shot-label', title: shot.label || shot.note || '' }, shot.label || shot.target || ('#' + shot.id))), zoom ? h('div', { className: 'rt-shot-zoom', onClick: () => setZoom(false) }, h('img', { src: src, alt: shot.label || '' }), h('div', { className: 'rt-shot-zoom-cap' }, (shot.label || shot.target || '') - + (card ? " · Generated from records (not a live screenshot)" : '') - + (shot.captured_at ? " · " + fmt(shot.captured_at) : '') - + " · Click anywhere to close")) + + (card ? ' · 由当日记录生成(非现场截图)' : '') + + (shot.captured_at ? ' · ' + fmt(shot.captured_at) : '') + + ' · 点击任意处关闭')) : null) } const ShotStrip = ({ eng, shots, total, title }) => { @@ -4139,9 +4139,9 @@ body[data-ds-dark-theme] .dshp-rewind-item span{color:var(--dsw-alias-label-tert if (list.length === 0) return null return h('div', { className: 'rt-shots' }, h('div', { className: 'rt-shots-head' }, - h('b', null, title || "Evidence screenshots"), - h('span', { className: 'rt-shots-n' }, "Showing " + list.length + " images" - + (total && total > list.length ? " (" + total + " total for this scoring item; representative image shown)" : ''))), + h('b', null, title || '证据截图'), + h('span', { className: 'rt-shots-n' }, '显示 ' + list.length + ' 张' + + (total && total > list.length ? '(该得分点共 ' + total + ' 张,取代表图)' : ''))), h('div', { className: 'rt-shot-row' }, list.map((sh) => h(ShotImage, { key: 'sh' + sh.id, eng: eng, shot: sh })))) } /** 发现时间在列表里只留「月-日 时:分」:整行宽度紧张,完整时间进悬浮提示 */ @@ -4149,7 +4149,7 @@ body[data-ds-dark-theme] .dshp-rewind-item span{color:var(--dsw-alias-label-tert const t = String(s || '').replace('T', ' ') return t.length >= 16 ? t.slice(5, 16) : (t || '—') } - const provLabel = (p) => (p === 'passive' ? "Passive" : p === 'active' ? "Active" : "Unknown") + const provLabel = (p) => (p === 'passive' ? '被动' : p === 'active' ? '主动' : '未知') /** * 给「可点击但不是