Compare commits

..
1 Commits
Author SHA1 Message Date
叫我小杨同学andCursor 8ef4eb301d fix: 发布 1.1.36,解决红队模式拒绝问题
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-29 00:13:29 +08:00
7 changed files with 62 additions and 6 deletions

No files matched your search

+1 -1
View File
@@ -4,7 +4,7 @@
<h1 align="center">⚔️ DeepSeek Harness cybersecurity red-team tool (dsh-purge)</h1>
<p align="center"><strong>Version 1.1.35</strong></p>
<p align="center"><strong>Version 1.1.36</strong></p>
<p align="center">
<em>Local official DeepSeek Harness cybersecurity red-team plugin. Clean host policy, and ship a built-in drill console. Swap prompts per model. Default prompt for Chinese models — 小码酱. Please star ⭐</em>
+1 -1
View File
@@ -4,7 +4,7 @@
<h1 align="center">⚔️ DeepSeek Harness 网络安全红队工具(dsh-purge)</h1>
<p align="center"><strong>Version 1.1.35</strong></p>
<p align="center"><strong>Version 1.1.36</strong></p>
<p align="center">
<em>本机官方 DeepSeek Harness 网络安全红队评测插件。清洗宿主策略,并带内嵌演练台。不同模型可换不同提示词。默认提示词面向国模「小码酱」。求 Star 收藏 ⭐</em>
+16
View File
@@ -161,6 +161,14 @@ window.__ModuleLoader__.load({ id: "dsh-purge", factory: (require) => {
"auth.ok.tab": "确认授权并进入演练台",
"auth.ok.full": "确认授权并全面浏览",
"auth.ok.env": "确认授权并打开环境适配",
"envGate.title": "环境还没配好",
"envGate.lead": "红队模式发送前需要本机工具。未检测到可用环境时,先去环境适配,或确认暂不配置。",
"envGate.kaliHint": "检测到 Kali 时会直接用本机工具,不必填路径。没有 Kali 时,在环境适配里填写各工具路径,或选一个整包文件夹自动分配。",
"envGate.skip": "暂不配置",
"envGate.skipConfirm": "确认后这次可以继续对话。扫描和利用类技能仍会因为缺少工具而不可用,之后可以在 dsh-purge → 环境适配里补路径。",
"envGate.skipNo": "返回",
"envGate.skipYes": "确认暂不配置",
"envGate.go": "去环境适配",
"theme.aria": "外观",
"theme.white": "白",
"theme.ink": "墨",
@@ -398,6 +406,14 @@ window.__ModuleLoader__.load({ id: "dsh-purge", factory: (require) => {
"auth.ok.tab": "Authorize and open Drill",
"auth.ok.full": "Authorize and open Full view",
"auth.ok.env": "Authorize and open Env adapt",
"envGate.title": "Environment is not ready",
"envGate.lead": "Red team mode needs local tools before you send. If none are available, open Env adapt or confirm you will continue without them.",
"envGate.kaliHint": "When Kali is detected, local tools are used directly and paths are optional. Otherwise set each tool path in Env adapt, or pick one toolkit folder to assign them.",
"envGate.skip": "Skip for now",
"envGate.skipConfirm": "You can keep chatting after this. Scan and exploit skills stay unavailable until the tools are installed. You can add paths later under dsh-purge → Env adapt.",
"envGate.skipNo": "Back",
"envGate.skipYes": "Continue without tools",
"envGate.go": "Open Env adapt",
"theme.aria": "Appearance",
"theme.white": "Light",
"theme.ink": "Ink",
+31 -1
View File
@@ -106,6 +106,33 @@ function ensureFullInject(sections, inject) {
return [{ name: "dsh-purge", text: inject, order: -10000 }, ...sections];
}
/** 红队预设里要留下来的操作说明起点。这句前面的「你是红队指挥」身份句丢掉。 */
const REDTEAM_OPS_MARK = "## 运行环境前提";
function redteamOpsBody(text) {
const raw = String(text || "");
const at = raw.indexOf(REDTEAM_OPS_MARK);
if (at < 0) return null;
return raw.slice(at).trim();
}
/**
* 主模式仍只有清洗提示词。
* 红队模式把同一份清洗提示词放在最前,后面只接派活和操作说明,不保留红队身份句。
*/
function attachInjectToRedteamPersona(sections, inject) {
let attached = false;
const next = sections.map((section) => {
const ops = redteamOpsBody(section?.text);
if (ops == null) return section;
attached = true;
const text = inject ? `${inject}\n\n${ops}` : ops;
return { ...section, text, order: -10000 };
});
if (!attached) return sections;
return next.filter((section) => section?.name !== "dsh-purge");
}
function stripIdentityPrefix(text) {
let rest = String(text || "").trim();
if (rest.startsWith(IDENTITY_CARD_PREFIX)) {
@@ -274,6 +301,9 @@ export function rewritePromptAssembly(assembled, fallbackInject = "", options =
const extras = opts.dropPurgeAfterFold
? purge.filter((section) => section.name !== "dsh-purge")
: purge;
assembled.sections = ensureFullInject([...folded, ...extras], injectText);
assembled.sections = ensureFullInject(
attachInjectToRedteamPersona([...folded, ...extras], injectText),
injectText,
);
return assembled;
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "dsh-purge",
"version": "1.1.35",
"version": "1.1.36",
"description": "DeepSeek Harness 网络安全红队工具:本机官方 Harness 受控评测与清洗,内嵌演练台;不同模型可换不同提示词;默认提示词面向国模「小码酱」。求 Star ⭐",
"type": "module",
"main": "lib/index.js",
-2
View File
@@ -31,8 +31,6 @@
config:
# 新版 dsh-persona 用 prefix/suffix 取代了旧的 text 字段(text 会因缺 prefix 挂载失败)
prefix: |
你是红队(RedTeam)作战**指挥**智能体,运行在 {{model}} 上,工作目录 {{cwd}}。
## 运行环境前提(第一次开工前提醒用户一次)
红队模式会**真实发包、上传文件、建立隧道**,优先在**专供演练的 Kali 虚拟机**里跑,
**尽量不要用日常办公电脑/宿主机当主战场**(私钥、冰蝎/哥斯拉马与扫描器落盘、EDR 误伤、出口 IP 信誉等风险仍在):
+12
View File
@@ -1,3 +1,15 @@
# 1.1.36
## 中文
- 版本升级到 1.1.36。
- 解决红队模式拒绝问题。
## English
- Version 1.1.36.
- Fix red team mode refusing the cleaned prompt.
# 1.1.35
## 中文