From 1ea067189cb37c5cfe290c0f95d9be0c5713b91b 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 11:50:42 +0800 Subject: [PATCH] 1.1.73: adapt DSH 0.2.1-rc.2, Apache-2.0, lab-only default-deny. --- .gitignore | 3 - LICENSE | 223 +- NOTICE | 7 + README.en.md | 629 ------ README.md | 578 +++--- README.zh-CN.md | 186 +- bin/dsh-purge.js | 0 client.js | 1842 +++++++++-------- cordis.patch.yml | 2 +- docs/banner.svg | 2 +- docs/drill-auth-legal.html | 116 +- lib/asset-table.js | 338 ++- lib/capability-protocol.js | 11 +- lib/continue-retry.js | 2 +- lib/core.js | 1136 +++------- lib/desktop.js | 37 +- lib/extract-asar.js | 7 + lib/hide-console.js | 17 +- lib/host-clean.js | 7 +- lib/identity.js | 614 ++++-- lib/index.js | 218 +- lib/net-scope.js | 74 +- lib/reapply.js | 4 +- lib/redteam/client.js | 1654 +++++++-------- lib/redteam/evidence-ledger.mjs | 507 +++++ lib/redteam/index.js | 2 - lib/redteam/platform-config.js | 36 +- lib/redteam/role-section.js | 7 +- lib/redteam/schema.js | 30 +- lib/redteam/score-rules.js | 440 ++-- lib/redteam/skill-availability.js | 26 +- lib/redteam/skill-fixes.js | 436 ++-- lib/redteam/store-core.js | 658 +++--- lib/redteam/tools.js | 218 ++ lib/redteam/ui.js | 52 +- lib/redteam/validate.js | 10 +- lib/restart-desktop.js | 3 +- lib/rewind.js | 24 +- lib/rules.js | 20 +- lib/skills.js | 42 +- lib/uninstall.js | 63 +- lib/update.js | 24 +- lib/web.js | 2 +- lib/zip-extract.js | 22 +- package.json | 15 +- presets/redteam/agent.cordis.yml | 17 +- presets/redteam/preset.yml | 4 +- release-notes.md | 18 + scripts/install-paper-autopilot.mjs | 131 ++ skills/paper-autopilot/SKILL.md | 151 ++ skills/paper-autopilot/assets/BRIEF.md.tpl | 47 + .../paper-autopilot/assets/DECISIONS.md.tpl | 112 + .../assets/PAPER_STATE.json.tpl | 84 + skills/paper-autopilot/assets/PIPELINE.md.tpl | 106 + skills/paper-autopilot/assets/README.md | 39 + .../assets/case_3dprint_lattice/DECISIONS.md | 107 + .../assets/case_3dprint_lattice/PIPELINE.md | 129 ++ .../assets/case_3dprint_lattice/README.md | 98 + .../code/add_citations.py | 85 + .../case_3dprint_lattice/code/build_docx.py | 485 +++++ .../code/build_references_ordered.py | 204 ++ .../code/check_citations.py | 81 + .../case_3dprint_lattice/code/docx_to_pdf.py | 89 + .../case_3dprint_lattice/code/final_check.py | 216 ++ .../code/fix_angle_para.py | 58 + .../code/fix_layer_section.py | 104 + .../code/fix_rsm_inline.py | 51 + .../case_3dprint_lattice/code/fix_table41.py | 76 + .../case_3dprint_lattice/code/fix_table45.py | 59 + .../case_3dprint_lattice/code/make_figures.py | 636 ++++++ .../case_3dprint_lattice/code/math2unicode.py | 315 +++ .../code/merge_topic_refs.py | 121 ++ .../case_3dprint_lattice/code/report_stats.py | 96 + .../case_3dprint_lattice/code/sim_model.py | 512 +++++ .../code/sync_inline_numbers.py | 204 ++ .../case_3dprint_lattice/code/sync_numbers.py | 157 ++ .../case_3dprint_lattice/code/uncertainty.py | 265 +++ .../case_3dprint_lattice/code/wordcount.py | 42 + skills/paper-autopilot/commands/paper.md | 18 + .../models/lpbf_transfer_bench.py | 435 ++++ .../paper-autopilot/models/rotor_mre_dva.py | 759 +++++++ .../references/autopilot_contract.md | 183 ++ .../references/chinese_thesis_format.md | 114 + .../references/chinese_thesis_playbook.md | 234 +++ .../computational_paper_playbook.md | 336 +++ .../references/deai_protocol.md | 389 ++++ .../references/figure_standards.md | 206 ++ .../references/literature_and_verification.md | 272 +++ .../references/packaging_and_migration.md | 156 ++ .../references/pipeline_steps.md | 375 ++++ .../references/simulation_and_data.md | 234 +++ .../references/simulation_vv.md | 272 +++ .../references/skill_aliases.md | 109 + .../references/submission_and_compliance.md | 310 +++ .../references/venue_playbooks.md | 247 +++ .../references/writing_rules.md | 134 ++ skills/paper-autopilot/scripts/autopilot.py | 617 ++++++ skills/paper-autopilot/scripts/build_docx.py | 430 ++++ skills/paper-autopilot/scripts/build_refs.py | 211 ++ skills/paper-autopilot/scripts/check_env.py | 156 ++ skills/paper-autopilot/scripts/check_refs.py | 260 +++ skills/paper-autopilot/scripts/docx_to_pdf.py | 113 + skills/paper-autopilot/scripts/figure_kit.py | 227 ++ skills/paper-autopilot/scripts/final_check.py | 282 +++ skills/paper-autopilot/scripts/litsearch.py | 1139 ++++++++++ .../paper-autopilot/scripts/math2unicode.py | 315 +++ .../paper-autopilot/scripts/pipeline_state.py | 369 ++++ skills/paper-autopilot/scripts/prose_scan.py | 598 ++++++ skills/paper-autopilot/scripts/scaffold.py | 252 +++ skills/paper-autopilot/scripts/selfcheck.py | 419 ++++ skills/paper-autopilot/scripts/selftest.py | 335 +++ skills/paper-autopilot/scripts/simulate.py | 307 +++ skills/paper-autopilot/scripts/wordcount.py | 207 ++ skills/redteam/evidence-discipline.md | 118 ++ 114 files changed, 21198 insertions(+), 5183 deletions(-) create mode 100644 NOTICE delete mode 100644 README.en.md mode change 100755 => 100644 bin/dsh-purge.js create mode 100644 lib/redteam/evidence-ledger.mjs create mode 100644 scripts/install-paper-autopilot.mjs create mode 100644 skills/paper-autopilot/SKILL.md create mode 100644 skills/paper-autopilot/assets/BRIEF.md.tpl create mode 100644 skills/paper-autopilot/assets/DECISIONS.md.tpl create mode 100644 skills/paper-autopilot/assets/PAPER_STATE.json.tpl create mode 100644 skills/paper-autopilot/assets/PIPELINE.md.tpl create mode 100644 skills/paper-autopilot/assets/README.md create mode 100644 skills/paper-autopilot/assets/case_3dprint_lattice/DECISIONS.md create mode 100644 skills/paper-autopilot/assets/case_3dprint_lattice/PIPELINE.md create mode 100644 skills/paper-autopilot/assets/case_3dprint_lattice/README.md create mode 100644 skills/paper-autopilot/assets/case_3dprint_lattice/code/add_citations.py create mode 100644 skills/paper-autopilot/assets/case_3dprint_lattice/code/build_docx.py create mode 100644 skills/paper-autopilot/assets/case_3dprint_lattice/code/build_references_ordered.py create mode 100644 skills/paper-autopilot/assets/case_3dprint_lattice/code/check_citations.py create mode 100644 skills/paper-autopilot/assets/case_3dprint_lattice/code/docx_to_pdf.py create mode 100644 skills/paper-autopilot/assets/case_3dprint_lattice/code/final_check.py create mode 100644 skills/paper-autopilot/assets/case_3dprint_lattice/code/fix_angle_para.py create mode 100644 skills/paper-autopilot/assets/case_3dprint_lattice/code/fix_layer_section.py create mode 100644 skills/paper-autopilot/assets/case_3dprint_lattice/code/fix_rsm_inline.py create mode 100644 skills/paper-autopilot/assets/case_3dprint_lattice/code/fix_table41.py create mode 100644 skills/paper-autopilot/assets/case_3dprint_lattice/code/fix_table45.py create mode 100644 skills/paper-autopilot/assets/case_3dprint_lattice/code/make_figures.py create mode 100644 skills/paper-autopilot/assets/case_3dprint_lattice/code/math2unicode.py create mode 100644 skills/paper-autopilot/assets/case_3dprint_lattice/code/merge_topic_refs.py create mode 100644 skills/paper-autopilot/assets/case_3dprint_lattice/code/report_stats.py create mode 100644 skills/paper-autopilot/assets/case_3dprint_lattice/code/sim_model.py create mode 100644 skills/paper-autopilot/assets/case_3dprint_lattice/code/sync_inline_numbers.py create mode 100644 skills/paper-autopilot/assets/case_3dprint_lattice/code/sync_numbers.py create mode 100644 skills/paper-autopilot/assets/case_3dprint_lattice/code/uncertainty.py create mode 100644 skills/paper-autopilot/assets/case_3dprint_lattice/code/wordcount.py create mode 100644 skills/paper-autopilot/commands/paper.md create mode 100644 skills/paper-autopilot/models/lpbf_transfer_bench.py create mode 100644 skills/paper-autopilot/models/rotor_mre_dva.py create mode 100644 skills/paper-autopilot/references/autopilot_contract.md create mode 100644 skills/paper-autopilot/references/chinese_thesis_format.md create mode 100644 skills/paper-autopilot/references/chinese_thesis_playbook.md create mode 100644 skills/paper-autopilot/references/computational_paper_playbook.md create mode 100644 skills/paper-autopilot/references/deai_protocol.md create mode 100644 skills/paper-autopilot/references/figure_standards.md create mode 100644 skills/paper-autopilot/references/literature_and_verification.md create mode 100644 skills/paper-autopilot/references/packaging_and_migration.md create mode 100644 skills/paper-autopilot/references/pipeline_steps.md create mode 100644 skills/paper-autopilot/references/simulation_and_data.md create mode 100644 skills/paper-autopilot/references/simulation_vv.md create mode 100644 skills/paper-autopilot/references/skill_aliases.md create mode 100644 skills/paper-autopilot/references/submission_and_compliance.md create mode 100644 skills/paper-autopilot/references/venue_playbooks.md create mode 100644 skills/paper-autopilot/references/writing_rules.md create mode 100644 skills/paper-autopilot/scripts/autopilot.py create mode 100644 skills/paper-autopilot/scripts/build_docx.py create mode 100644 skills/paper-autopilot/scripts/build_refs.py create mode 100644 skills/paper-autopilot/scripts/check_env.py create mode 100644 skills/paper-autopilot/scripts/check_refs.py create mode 100644 skills/paper-autopilot/scripts/docx_to_pdf.py create mode 100644 skills/paper-autopilot/scripts/figure_kit.py create mode 100644 skills/paper-autopilot/scripts/final_check.py create mode 100644 skills/paper-autopilot/scripts/litsearch.py create mode 100644 skills/paper-autopilot/scripts/math2unicode.py create mode 100644 skills/paper-autopilot/scripts/pipeline_state.py create mode 100644 skills/paper-autopilot/scripts/prose_scan.py create mode 100644 skills/paper-autopilot/scripts/scaffold.py create mode 100644 skills/paper-autopilot/scripts/selfcheck.py create mode 100644 skills/paper-autopilot/scripts/selftest.py create mode 100644 skills/paper-autopilot/scripts/simulate.py create mode 100644 skills/paper-autopilot/scripts/wordcount.py create mode 100644 skills/redteam/evidence-discipline.md diff --git a/.gitignore b/.gitignore index 690582c..5b71549 100644 --- a/.gitignore +++ b/.gitignore @@ -24,9 +24,6 @@ _archive/ # 嵌入前的提示词原文 lib/default-prompt-inject.md -lib/default-prompt-inject.md.bak -lib/default-prompt-inject.zh.md -lib/default-prompt-inject.en.md default-prompt-inject.md # 本机官方安装包、解包目录、拆出的压缩包 diff --git a/LICENSE b/LICENSE index 4e9a080..49e8d59 100644 --- a/LICENSE +++ b/LICENSE @@ -1,40 +1,201 @@ -dsh-purge 商业软件许可 -Copyright (c) 2026 小杨 (YuJunZhiXue) + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ -保留所有权利。 -本软件不是开源软件。当前分支也不是 MIT。 + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION -未经我书面授权,不得复制、修改、再分发、出售、出租、白标或公开提供源码。 + 1. Definitions. -一、你可以做的 -1. 把已经拿到的安装包,装在你自己的电脑上,给你自己用。 -2. 按我仓库里的文档做本机评测。这不包含把本软件交给别人当收费货。 + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. -二、你不能做的 -1. 把本软件、改装箱、提示词或衍生作品拿去卖、卖课、卖 token、直播间交货。 -2. 改名、去署名、冒充作者或「官方」。 -3. 把源码或核心实现公开到别的仓库、网盘、频道(我自己的频道除外)。 -4. 未经我书面授权做 OEM、白标、托管服务。 + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. -三、商业授权 -需要再分发、售卖、白标、培训交付或做成产品卖给第三方的,先找我买授权。 -联系:a2269198325@163.com,标题写「dsh-purge 商业许可」。谈妥再签。详见 LICENSE-COMMERCIAL.md。 + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. -四、旧版本 -换成本许可之前、曾经以 MIT 发布的 Git tag 和 tarball,仍按当时那份 MIT。那些拷贝我收不回来。但不署名、冒充作者,我照样追究。当前分支不再附带 MIT 文本。 + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. -五、闭源安排 -2026年10月26日(含)前,仓库还公开,作为七天征集。 -2026年10月27日起我转为闭源,GitHub 不再发布新版本。 -此后新版本只在 https://t.me/LLM_PoJia/271 发布。 + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. -六、免责 -本软件按现状提供,我不作任何保证。使用后果你自己承担。 -许可被违反时立即终止,须停止使用并销毁拷贝。 + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. -Proprietary commercial license. All rights reserved. This is not MIT. -Personal install of a copy you already have is allowed. Resale, courses, -white-label, and public source redistribution are not. Older MIT tags stay -under the MIT text they shipped with. After 2026-10-27 this project is -closed-source; new builds ship only at https://t.me/LLM_PoJia/271 . -Commercial deals: a2269198325@163.com + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, or + MERCHANTABILITY. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2026 YuJunZhiXue + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/NOTICE b/NOTICE new file mode 100644 index 0000000..ca842ff --- /dev/null +++ b/NOTICE @@ -0,0 +1,7 @@ +dsh-purge +Copyright 2026 YuJunZhiXue + +Source: https://github.com/YuJunZhiXue/dsh-purge + +This product is licensed under the Apache License, Version 2.0. +Derivative works must retain this NOTICE and attribution. diff --git a/README.en.md b/README.en.md deleted file mode 100644 index 975a6d0..0000000 --- a/README.en.md +++ /dev/null @@ -1,629 +0,0 @@ -

- dsh-purge -

- -

⚔️ DeepSeek Harness cybersecurity red-team tool (dsh-purge)

- -

Version 1.1.71

- -

- DeepSeek Harness jailbreak: every model, swap prompts per model. Default prompt for 小码酱. Please star ⭐ If you build on this, see Attribution required. -

- -

- GitHub stars - Commercial license - awesome · DSH plugin - DeepSeek Harness Hub - DSH -
- Node.js - JavaScript -

- -

- Listed on dsh-plugin.org -

- -

- 中文 · English -

- -> I'll say it straight. -> -> I got laid off. No job, no steady income. I always wrote this repo after hours. I may end up delivering food just to eat. I probably won't be able to patch this every day. -> -> **Seven days, through 26 Oct 2026. That's the window I'm leaving open.** Stay, swear, buy an ad, or sponsor — write it on [Issue #130](https://github.com/YuJunZhiXue/dsh-purge/issues/130). I'll read. I won't answer every comment. -> -> **From 27 Oct I'm closing this repo.** I won't ship new versions on GitHub. Later builds I only put here: [t.me/LLM_PoJia/271](https://t.me/LLM_PoJia/271). Copies you already downloaded still run. I also changed the license. It's commercial now; see below. - -> **Official Web and the official desktop app are both supported.** Official `dsh web` uses profile `web`. The official desktop EXE (DeepSeek Harness **0.2.0-rc.2 / 0.2.1-rc.2**) uses profile `desktop`. Install and Apply them separately. This release targets dsh 0.2 only. Older dsh builds need the matching older plugin. Community Desktop is not maintained. -> -> Adding the plugin to a profile does not patch the host. Click **dsh-purge** beside the session title → **Clean** → **Apply**. A successful Apply restarts; an unfinished Apply does not. After the restart, start a new chat — that is when the inject enters the session. -> -> Node.js **≥18**. Windows no-flash needs **Node ≥22**. There is no `dsh-purge` package on npm. Until 26 Oct, install from the GitHub archive below; do not `pnpm add dsh-purge`. After 27 Oct, only the [channel](https://t.me/LLM_PoJia/271) counts. - -## Contents - -- [Sponsor](#sponsor) -- [Ad slots](#ad) -- [What this is](#what-this-is) -- [Attribution required](#attribution-required) -- [License](#license) -- [Unauthorized commercial use](#unauthorized-commercial-use) -- [Supported hosts](#supported-hosts) -- [Install](#install) -- [Preview](#preview) -- [Usage](#usage) -- [Own servers](#own-servers) -- [How it works](#how-it-works) -- [Restore](#restore) -- [Releases](#releases) - ---- - - - -## ☕ Sponsor - -If this project helps you, send it over — I'm out here asking~ - -| Asset | Address | -| --- | --- | -| USDT (TRC20) | `TV5ajPkRD8RH623Dx9mqvYZVNN8nPGRKid` | -| Solana | `6x16GhRgLVpKFFXaU1seKNdx2rypspSJTL4dbpt6Xpwk` | -| Ethereum | `0xB68BD60C0e8c519513B7DF9bB147696815423B3E` | -| Bitcoin | `bc1qu70yxkrtwnymt8ryluz9x8y8hqzune5340npht` | - ---- - - - -## Ad slots - -People actually read this README. I'm opening a few slots. The money goes toward keeping me able to maintain this. - -| Placement | Status | -| --- | --- | -| Above the sponsor block (text link + one-line blurb, or a small image) | **Open** | - -Few slots. I put them up after we agree. Gray-market, piracy, impersonating this repo, or pure traffic farms: I don't take those. - -Email [a2269198325@163.com](mailto:a2269198325@163.com) or message [@YuJunZhiXue](https://github.com/YuJunZhiXue) on GitHub. Subject: `dsh-purge ad slot`. - -These seven days are also the last public call. What I want to say is here: [Issue #130](https://github.com/YuJunZhiXue/dsh-purge/issues/130). Deadline **26 Oct 2026**. After that I close the source. New versions only on the [channel](https://t.me/LLM_PoJia/271). - ---- - -## What this is - -I wrote this plugin. You install it on the official [DeepSeek Harness](https://www.deepseek.com/harness/) already on your machine, for cybersecurity red-team evaluation. I support official **Web** (`dsh web`) and the official **desktop EXE**. You install and Apply them separately. - -Harness does more than forward a prompt. It rewrites prompts, approval gates, sandbox policy, and session migration at runtime. Asking only “will the model answer” treats a host-layer block as a model refusal. My plugin splits those two layers on your own install, for controlled evaluation and for seeing which default policy is too tight. - -| You get | What it does | -|---|---| -| **dsh-purge dock** | A button beside the session title opens the right dock. Two pages: Clean and Drill | -| **Clean** | Grouped patch status, Apply / Restore / Uninstall, prompt editor, multiple rule sets | -| **Drill** | Built into the stable release. After authorization: assets, skills, and the local environment. Only for a host you manage, an offline target, or a written authorized exercise | -| **Host policy** | Default copy, permission policy, and tool limits. Official capabilities stay. No second invented identity | -| **On start** | Checks and reapplies. After npm overwrites `node_modules`, you do not hand-edit files | - -No hardcoded drive letters. It looks at `$DSH_HOME`, `.dsh` next to the dsh launcher, then `~/.dsh`. It does not patch the Harness source tree. **Apply** on the **Clean** page of **dsh-purge** is what writes the changes. Identity comes from the encrypted prompt shipped in the plugin, the text the prompt box shows by default. The host prompt file is not read. - -My plugin only touches the official `@deepseek-ai` packages and local config already on your machine. It is not a public scanner and not a kit for hitting someone else's site. There is no malware in this repo, and no payload aimed at the public internet. - ---- - -## Install it for yourself. Selling it, teaching it as a paid course, or white-labeling it: buy a [commercial license](./LICENSE-COMMERCIAL.md) from me first. - -## Attribution required - -If you use this project's name, ideas, code, or prompts, you credit me and you name the source repository: [YuJunZhiXue/dsh-purge](https://github.com/YuJunZhiXue/dsh-purge). - -No credit, hiding the source, or passing it off as yours: I will pursue that. - ---- - -## License - -From this version the [LICENSE](./LICENSE) is the commercial license I wrote. I keep all rights. **This is not open source, and it is not MIT.** - -| What you want | Where | -| --- | --- | -| Install a copy you already have, on your own machine | Allowed; see [LICENSE](./LICENSE) | -| Paid plugin / course / white-label / sell it as a product | Buy a grant from me first: [LICENSE-COMMERCIAL.md](./LICENSE-COMMERCIAL.md) | -| Git tags / tarballs from before the switch | those went out under MIT; I cannot claw them back | -| Builds after 27 Oct 2026 | I only ship them at [t.me/LLM_PoJia/271](https://t.me/LLM_PoJia/271) | - -To everyone who wrote code: thank you. After the cutoff I will not keep this as a public GitHub open-source repo. - ---- - -## Unauthorized commercial use - -Douyin live account **「老张的ai」** (room name **「老张AI讲堂」**) is selling my repository: taking fees in the live room, no attribution, claiming to be the author. I was in the room. They still charged. - -The commercial license does not allow selling this repo as a paid product. Selling courses, the plugin, tokens, or reselling it: buy a grant from me first, or the license ends on the spot. Old MIT tags I cannot claw back. Passing yourself off as me, or dropping attribution, I still pursue. - -Recorded 2026-10-12: - -

- 老张的ai live asking for a fee - 老张的ai live charging money -

- -WeChat name **「老张的ai科技」**, same handle as the live-room viewer board. Asked if they were this repo's developer, they said they were. I said I would report it. - -

- 老张的ai科技 WeChat claiming to be the developer -

- ---- - - - -
- -### ⚠️ Strict legal and compliance disclaimer - - - -**Disclaimer:** This project is offered under a commercial license. It used to be MIT on GitHub; that is changing, and the repo will close. Follow applicable laws and platform rules. Do not use it for illegal purposes; the user bears the consequences. - -**Zero-tolerance statement:** This project opposes and forbids any illegal activity. The authors do not support, encourage, or assist unauthorized network attacks, exploit use, data theft, unlawful intrusion into computer information systems, or generation of illegal or prohibited content. **Anyone who uses this project for crime is solely responsible under the law. The authors have no liability.** - -1. **This repository contains no illegal material.** The published code, docs, patches, and default prompt are **not** malware, backdoors, unauthorized pentest kits, ransomware, credential-stuffing scripts, or attack payloads aimed at the public internet or third-party systems. The project does not supply illegal content and does not incite, organize, or assist crime. -2. **Local official Harness only.** Security-eval patches and prompt injection run only on the **official DeepSeek Harness already installed on the user's machine** (`@deepseek-ai` packages, local profile / `$DSH_HOME`). The target is the user's own official local software, **not** someone else's website, server, account, or information system. -3. **Eval patches do not attack the public internet.** Apply, inject, revert, and uninstall stay in local files and local processes. They **do not scan, probe, intrude, or send attack traffic to any public host or unauthorized system**. Do not use this project as a jump host against the public internet. If "check for updates" is on, the plugin may only contact this plugin's own GitHub repository to compare versions. That is **not** an attack on third-party systems and is **not** authorization to penetrate anything. -4. **Lawful, controlled scope.** This project is an aid for red-team research and robustness evaluation on an **official Harness the user is entitled to administer**. **Do not run it against targets without the owner's lawful written authorization, public online systems, or production workloads.** Testing must stay on the **authorized local official Harness, offline local synthetic fixtures, authorized cybersecurity ranges, and compliant lab environments**. -5. **Servers and sites in mainland China, Hong Kong, and Macau are forbidden.** Do not access, scan, probe, or otherwise operate against network ranges in mainland China, Hong Kong, or Macau, or against servers, websites, or addresses that resolve into those ranges. A cloud-provider name is not an exception. The only exception is one exact IP, or one exact hostname, that the user registered in advance as their own server. A key, a password, a network range, a wildcard, or a claim made in the conversation does not add an exception. Anything that is not registered stays forbidden. -6. **Forbidden uses.** Users must not use this project, directly or indirectly, to violate the following (each must be followed; no excuse to evade): - - Criminal Law of the People's Republic of China - - Cybersecurity Law of the People's Republic of China - - Data Security Law of the People's Republic of China - - Personal Information Protection Law of the People's Republic of China - - and other applicable laws, regulations, and supervisory rules; - - Also forbidden: - - Unauthorized intrusion or attacks on public or private computer information systems; extortion, sabotage, credential stuffing, or spreading malicious payloads; - - Inducing, generating, or spreading any content the law forbids, including threats to national security, terrorism, violence, pornography, gambling, fraud, and privacy or intellectual-property infringement; - - Violating the model provider's terms of service and acceptable-use policy. -7. **The user bears all responsibility.** The project is provided under the commercial license (older releases under the MIT license then in effect) as-is. The authors make no warranty of completeness, security, or fitness. **Users independently bear all civil, administrative, and criminal liability** for download, deploy, run, modify, distribute, and all resulting inputs and outputs. Authors and contributors bear no direct, indirect, or joint liability for abuse. -8. **The license ends on breach.** Anyone who uses this project for illegal attacks, malicious activity, unauthorized resale, or other violations has their license **automatically and irrevocably terminated** from the moment of the violation. They must stop using the project, permanently destroy all copies and derivatives, and accept legal sanctions. -9. **No affiliation.** This is an independent security-eval research project. It has no employment, commercial, authorization, or endorsement relationship with DeepSeek or its affiliates. "Official" here only means the eval target is the official DeepSeek Harness package on the user's machine. It does **not** mean DeepSeek developed, approved, or warrants this plugin. -10. **Attribution is required.** If you borrow this project's name, ideas, code, or prompts, you must credit the author and name this repository. Failure to attribute will be pursued. See [Attribution required](#attribution-required). - - - -
- ---- - -## Supported hosts - -The latest plugin supports **dsh 0.2** only — do not apply it to 0.1.x. - -- **dsh 0.2** (official desktop **0.2.0-rc.2 / 0.2.1-rc.2** / official `dsh web`): use **1.1.40** or newer. This page installs that line. -- **dsh 0.1.7** (incl. rc.1 / rc.2): use **1.1.39** or older — pick the tag on [Releases](https://github.com/YuJunZhiXue/dsh-purge/releases). - -Unmatched patches stay pending or skipped; nothing is rewritten blindly. - ---- - -## Install - -Web and the official desktop EXE are the two maintained hosts. **Install both. Apply each separately.** A Web install does not reach the desktop app, and a desktop install does not reach Web. - -**Web (official `dsh web`)** - -```sh -dsh plugin --profile web add https://github.com/YuJunZhiXue/dsh-purge/archive/refs/heads/master.tar.gz -``` - -**Desktop (official EXE)** - -```sh -dsh plugin --profile desktop add https://github.com/YuJunZhiXue/dsh-purge/archive/refs/heads/master.tar.gz -``` - -If this directory is already a clone, use `add .` instead of the archive URL. If `dsh` is not on PATH, use [Manual install](#manual). - -Hub one-click on [dsh-plugin.org](https://dsh-plugin.org/plugins/yujunzhixue/dsh-purge) still 404s if it looks up the npm package name. Use the GitHub archive commands above. - -For the desktop client you can also click the button (`dsh://` deep link): - -

- Install in desktop client -

- -### After the command: three steps - -Adding the plugin to a profile does **not** patch `@deepseek-ai` by itself. - -1. **Quit and reopen** the host you installed into — stop and restart `dsh web`, or quit the desktop tray and reopen that app. -2. On **that host**, click **dsh-purge** beside the session title, then **Apply** on the **Clean** page. It is not on the host Settings page. -3. A successful **Apply** restarts once so patches load. It does not restart if it did not finish. - -Web controls affect Web only; desktop controls affect the desktop app only. Do not Apply one host from the other. - -### How to tell it installed - -- **dsh-purge** sits beside the session title, with **Apply** on its Clean page. -- `/purge status` in chat prints `DSH_HOME` and the patch list — the path should be the home you actually run. -- Optional packages that are not installed (liangshen) show as skipped and do not block Apply. - -### Hand this to an assistant - -Paste the block below to a local assistant. It should only run the install command — no disk scan, no other edits, no Apply, no restart. - -
-For AI assistants (install only) - - - -Install the DeepSeek Harness plugin `dsh-purge` into both the Web profile and the official desktop profile. Do not scan the whole disk, do not read or edit other files, do not apply settings, and do not restart the app. - -If `dsh` is not on PATH, tell the user and stop. If this directory is already a clone, use `.` instead of the archive URL in both commands. If one profile is missing, skip that command and still install the other. There is no npm package; do not `pnpm add dsh-purge`. - -**Web (official `dsh web`)** - -```sh -dsh plugin --profile web add https://github.com/YuJunZhiXue/dsh-purge/archive/refs/heads/master.tar.gz -``` - -**Desktop (official EXE)** - -```sh -dsh plugin --profile desktop add https://github.com/YuJunZhiXue/dsh-purge/archive/refs/heads/master.tar.gz -``` - -After the commands finish, tell the user to fully quit and restart `dsh web`, and to quit the desktop tray then reopen the EXE. On each host, open **dsh-purge** beside the session title and **Apply** on **Clean**. Then stop. - - - -
- - - -### Manual install - -Use this when the command fails or `dsh` is not on PATH. Edit **only the profile for the host you run** — do not touch the other, and do not delete existing bundles. - -
-Full manual steps - -**1. Find the `$DSH_HOME` this host uses.** A real home is named `.dsh` (official EXE sometimes `dsh-home`), contains `profiles`, and has at least one `profiles//package.json`. Check in order: `DSH_HOME` env → `.dsh` next to the install root (portable) → `%USERPROFILE%\.dsh` or `~/.dsh` → `%APPDATA%` / `%LOCALAPPDATA%\DeepSeek Harness\dsh-home`. Confirm: `profiles/web/package.json` has `"name": "dsh-profile-web"` (or `dsh-profile-desktop`). Machines often have two homes — use the one that belongs to the host you actually start. - -PowerShell to list candidates: - -```powershell -$cands = @() -if ($env:DSH_HOME) { $cands += $env:DSH_HOME } -$cands += "$env:USERPROFILE\.dsh" -$dsh = Get-Command dsh -ErrorAction SilentlyContinue -if ($dsh) { - $dir = Split-Path $dsh.Source - $cands += @((Join-Path $dir ".dsh"), (Join-Path (Split-Path $dir) ".dsh"), (Join-Path (Split-Path (Split-Path $dir)) ".dsh")) -} -$cands += @("$env:APPDATA\DeepSeek Harness\dsh-home", "$env:LOCALAPPDATA\DeepSeek Harness\dsh-home") -$cands | Select-Object -Unique | Where-Object { $_ -and (Test-Path (Join-Path $_ "profiles")) } -``` - -**2. Put the plugin at `$DSH_HOME/plugins/dsh-purge`** (folder must be named `dsh-purge`, with a `package.json` whose `"name"` is `dsh-purge`). - -```sh -git clone https://github.com/YuJunZhiXue/dsh-purge.git "$DSH_HOME/plugins/dsh-purge" -``` - -Without git: download [master.tar.gz](https://github.com/YuJunZhiXue/dsh-purge/archive/refs/heads/master.tar.gz), extract, rename `dsh-purge-master` → `dsh-purge`, and place it under `plugins`. If you already have a clone, copy the whole tree — not a few `.js` files. - -**3. Edit only that profile's `package.json` — back it up first.** Web → `$DSH_HOME/profiles/web/package.json`; desktop → `$DSH_HOME/profiles/desktop/package.json`. Add **only two things**, keeping every existing dependency and bundle: - -1. In `dependencies`, add `"dsh-purge": "file:../../plugins/dsh-purge"` -2. At the **end** of `dsh.profile.bundles`, append `"dsh-purge"` (skip if already there) - -```json -{ - "name": "dsh-profile-web", - "private": true, - "dependencies": { - "dsh-purge": "file:../../plugins/dsh-purge" - }, - "dsh": { - "profile": { - "bundles": [ - "@deepseek-ai/dsh-base", - "@deepseek-ai/dsh-web-app", - "dsh-purge" - ], - "patchReload": "live" - } - } -} -``` - -Keep JSON valid (comma before the new item, none after the last). Do not switch `file:../../plugins/dsh-purge` to an absolute path, do not touch `patchReload` or other plugins, and do not list `"dsh-purge"` twice. On desktop, if there is no `dsh-web-app` row, do not add one. - -**4. Run `pnpm install` in that profile only** (`cd` into the profile dir, not the repo root or `$DSH_HOME`): - -```sh -cd "$DSH_HOME/profiles/web" # or profiles/desktop -pnpm install -``` - -Success: `profiles//node_modules/dsh-purge/package.json` exists. If `pnpm` is missing, use the Node / pnpm shipped with official `dsh`; on `Could not resolve`, re-check the `file:` path; on a JSON error, fix commas or restore the backup. - -**5. Fully quit that host, reopen it, then Apply** — same three steps as above. The card appears beside the session title; click **Apply** (or `/purge apply`) on that host only. If the card is missing, you likely edited the other `.dsh` — go back to step 1. - -
- -### Uninstall - -**dsh-purge** beside the session title → **Clean** → **Uninstall**. Confirm the dialog: it reverts any applied patches, restores the original Harness, and restarts the current host. - -```sh -# or from a terminal / chat -dsh-purge --uninstall -# /purge uninstall -``` - -Plugin config lives in `cordis.patch.yml` (`postPrompt` is empty by default): - -```yaml -- insert: - - id: dsh-purge - name: 'dsh-purge' - config: - enabled: true - autoApplyOnStart: true - autoUpdateOnStart: false - autoRevertOnMissing: false - verbose: false - postPromptOrder: 5100 - postPrompt: "" -``` - ---- - -## Preview - -**dsh-purge** sits beside the session title. It opens a right-hand dock with two pages: **Clean** and **Drill**. Switch **Light / Ink**. Patches are grouped; the count only includes items that actually applied. Rule sets sit in a list above the editor, with Enable and Delete on each row. - -The first time you open Drill you read the notice, wait out the countdown, scroll to the end, and check three boxes. Clean does not need that step. Drill is only for a host you manage, an offline target, or an exercise that already has written authorization. - -**Clean** - -![Clean](docs/preview/dock-clean.png) - -**Drill authorization** - -![Drill authorization](docs/preview/dock-auth.png) - -**Drill** - -![Drill](docs/preview/dock-drill.png) - -**Patches** - -![Patches](docs/preview/settings.png) - -**Own servers** - -On the Clean page, under Prompt. One host per line, then Save list. Steps are in [Own servers](#own-servers). - -![Own servers](docs/preview/own-servers-en.png) - -| Area | What it shows | -|---|---| -| dsh-purge | button beside the session title; opens or collapses the dock | -| Clean | the old Rules page: patches, prompt, rule sets, skills | -| Drill | assets, skills, and environment after authorization. The tab says Unauthorized until then | -| Patches | grouped status, Apply, Restore, or Uninstall | -| Prompt | edit `prompt-inject.md` as the session override | -| Own servers | one IP or exact hostname per line, saved to `$DSH_HOME/net-scope-allow.txt` | -| Rule sets | multiple `AGENTS.md` / `CLAUDE.md`; Enable writes under `$DSH_HOME`, Delete removes the row | -| Skills | import a zip or folder into this host’s official `$DSH_HOME/skills//SKILL.md` (web and desktop each use their own home; no drive letter is hardcoded); DSH owns match, load, and `/name`. You can also delete that folder yourself | - ---- - -## Layout - -`bin/` is the CLI, `lib/` is patches and the drill console, `presets/redteam/` is the red-team preset, `skills/redteam/` is the bundled skills, and `client.js` is the dock. - -Runtime files live under `$DSH_HOME`: `prompt-inject.md`, `rules/`, `skills/`, `net-scope-allow.txt`, `redteam/`. If `DSH_HOME` is unset, the launcher-adjacent `.dsh` wins over `~/.dsh`. Web and the desktop app each use their own home. Skills are not part of the inject section and do not replace the prompt. - ---- - -## Usage - -```sh -dsh-purge --status -dsh-purge --apply -dsh-purge --revert -dsh-purge --uninstall -dsh-purge --edit - -/purge status | apply | revert | uninstall | edit | help -/rules list | use | create | delete | reset | help -/skills list | import | create [description] | delete | help -/rewind - -purge_status purge_apply purge_revert -``` - -After a successful Apply, the host restarts so patched packages load; you can also click **Restart** manually. Under the patch title are the stable release and the test release. The test release follows the `beta` branch. **Switch to stable** installs `master` and clears any pin. Picking an older stable version pins it; click **Update** to return to the latest. Old test tags are not listed. - -The composer **Undo once** and **Undo last round** follow official DSH `session.fork({ atSeq })`: the withdrawn turn is cut off, a new session keeps the earlier context, the old session is archived, and the line returns to the input so **send again** re-injects. `/rewind` does the same. - -If the **same task works in standard but fails in minimal or PTC**, preset `run_code`, sandbox, or plan intercept text is often still uncleared, or built-in minimal is missing `agent-instructions`. Use **1.1.61+**, then **quit the host fully → Apply in Clean → restart → start a new chat**. Switching preset alone does not reload patches in the running process. - -### Response speed - -DSH runs Bash calls in a tool batch one at a time. Older dsh-purge releases raised the default foreground wait from 60 seconds to 10 minutes, so one slow command could hold up later calls for that long. Patch #21 now restores marked plugin values to the official 60-second default. Unmarked timeouts and other custom values are preserved; an unmarked 10-minute value cannot reliably be distinguished from a user setting. - -For a shorter wait in `dsh web` on macOS/Linux, add this entry to `$DSH_HOME/profiles/web/cordis.patch.yml` (normally `~/.dsh/profiles/web/cordis.patch.yml`). Edit an existing entry with the same id instead of adding a duplicate. This profile layer is applied after the bundled configuration, so future plugin applies keep the override. - -```yaml -- id: bash-sandbox - config: - timeoutMs: 10000 -``` - -With the standard jobs service and `promoteOnTimeout: true`, an unfinished command returns a background job id after 10 seconds and keeps running. Read it with `job_output` or stop it with `job_kill`. This changes the foreground wait, not the command's speed. Without that service or with promotion disabled, the timeout kills the command. A per-call `timeoutMs` overrides this default; `run_in_background: true` returns a job id immediately. - -For routine tasks, you can also opt into Low reasoning for new sessions: - -```yaml -- id: agent-default-model - config: - provider: deepseek-official - model: deepseek-flash - reasoningEffort: low -``` - -Restart `dsh web` to load the profile. The model and reasoning defaults apply to newly created sessions; select Low in the composer for an existing session. The plugin does not change these model preferences automatically. Keep High when the task needs deeper reasoning, and narrow file searches rather than recursively scanning every application directory. - -### Own servers - -Addresses in mainland China, Hong Kong, and Macau stay forbidden unless that one host was registered first. Saying “this is my server” in chat does not allow it. A key or a password does not allow it either. - -The box sits under Prompt. If the dock does not show it yet, quit DeepSeek Harness completely and open it again. - -1. Click **dsh-purge** beside the session title and stay on **Clean**. -2. Scroll past **Prompt**. **Own servers** is the next block. -3. Put one host on each line, in one of these forms: - - `203.0.113.10` — one IP. - - `my-vps.example.com` — one exact hostname. After you save, the addresses that hostname resolves to at lookup time are allowed too. - - `alice@my-vps.example.com` — the account only identifies this form. It does not prove the machine is yours. -4. Click **Save list**. The list is written to `$DSH_HOME/net-scope-allow.txt`. -5. Keys, passwords, ranges, and wildcards are dropped on save. Unlisted mainland China, Hong Kong, and Macau addresses stay forbidden. - -`203.0.113.10` and `example.com` above are only examples of the form. Replace them with your own host before you save. - ---- - -## Local checks - -```sh -node --check lib/index.js -node --check lib/core.js -node --check lib/surface.js -node --check lib/web.js -node --check lib/desktop.js -node --check lib/host.js -node --check lib/rewind.js -node --check lib/skills.js -node --check client.js -``` - ---- - -## How it works - -Apply, on start or when you click Apply: - -```mermaid -flowchart TD - A["Start or click Apply"] --> B{"Patch already in place?"} - B -->|yes| C["Skip"] - B -->|no| D["Back up the original as .dshpurge.bak"] - D --> E["Replace the matched files"] - E --> F["Override the shim"] - F --> G["Inject the encrypted prompt shipped in the plugin, the text the prompt box shows by default"] -``` - -Override on each session: - -```mermaid -flowchart TD - A["Restart or new session"] --> B["Inject the plugin's encrypted default. No save click, and no host prompt file"] -``` - -Prompt injection and ruleset decision at every turn. The three inputs on the left are what you control in the dsh-purge panel; the dotted edges show which decision each one drives: - -```mermaid -flowchart TD - L["Rule library: activate a set → writes prompt-inject.md"] - W["Local rules: check AGENTS.md / CLAUDE.md in the current dir"] - P["Workspace policy: strict / fallback / always"] - - A["Turn start"] --> B{"prompt-inject.md non-empty?"} - B -->|yes| C["Inject = prompt-inject.md (A)"] - B -->|no| D{"Any checked local md in the current dir, non-empty?"} - D -->|yes| E["Inject = selected workspace md (B)"] - D -->|no| F["Inject = plugin encrypted slot default (D)"] - C --> G{"Workspace baseline policy (C)"} - E --> G - F --> G - G -->|strict| H["Drop DSH workspace baseline section"] - G -->|fallback default| I{"User inject present above? (A or B)"} - G -->|always| J["Keep DSH workspace baseline section"] - I -->|yes| H - I -->|no| J - H --> K["Final system prompt"] - J --> K - - L -.-> B - W -.-> D - P -.-> G -``` - -Skills stay out of the inject section: - -```mermaid -flowchart LR - A["Settings import or /skills import"] --> B["Write into the official skills directory"] - B --> C["DSH loads it"] - C --> D["Uninstall does not delete user skills"] -``` - ---- - -## Restore - -- Each target is copied to `.dshpurge.bak` before the first apply. -- **Restore** or `/purge revert` copies backups back and deletes them. With no backup, shim lines written by this plugin are stripped. -- `prompt-inject.md` is a user file and is kept. -- **Uninstall** restores first if patches were applied, then deletes the inject file, rule library, and the plugin itself. -- Apply is idempotent. - ---- - -## Path detection - -The host surface is detected first: `web` / `desktop` (`gui` / `tui` are reserved and still fall back to web). - -**Web:** - -1. `DSH_HOME` / `DSH_BASE` -2. `.dsh` next to the dsh launcher (portable install, any drive) -3. `npm prefix -g` / `npm root -g` -4. Nested `@deepseek-ai/dsh/node_modules/@deepseek-ai` -5. `~/.dsh` - -**Official desktop EXE:** the running official Harness install (`resources/app` or the unpacked package). The drive letter is not hard-coded. A successful Apply restarts once. - -Community Desktop is not maintained. - -Official npm-global is not patched. Sealed `host-commands` / `runtime-commands` are scrubbed, never injected. - -If nothing is found, set `DSH_BASE` / `DSH_DESKTOP_INSTALL`. No files are changed. - ---- - -## Releases - -**Through 26 Oct 2026:** this version's notes and packages are still in my repo / [Releases](https://github.com/YuJunZhiXue/dsh-purge/releases). - -**From 27 Oct:** I will not ship new packages on GitHub. Later versions exist only at [t.me/LLM_PoJia/271](https://t.me/LLM_PoJia/271). If it is not in that channel, I did not publish it. - -## Notes - -- Scope is rendered copy, defaults, and runtime logic inside local `@deepseek-ai/*` packages, plus override files and rule sets under the harness home. -- After an upgrade, unmatched originals show as skipped. Apply still completes, and those files are left unchanged. -- Third-party plugin *source repos* outside `@deepseek-ai` are left alone (CMD silence may **best-effort** patch installed doctor / market / liangshen / mnemon at runtime). -- Until 26 Oct you may still install from the GitHub archive, not npm: `dsh plugin --profile web add https://github.com/YuJunZhiXue/dsh-purge/archive/refs/heads/master.tar.gz` (use profile `desktop` for the EXE). From this repo, `add .`. After 27 Oct, only packages in the [channel](https://t.me/LLM_PoJia/271) count. - ---- - -Thanks to the [LINUX DO](https://linux.do) community diff --git a/README.md b/README.md index 8a3ef4d..540b2a1 100644 --- a/README.md +++ b/README.md @@ -2,17 +2,17 @@ dsh-purge

-

⚔️ DeepSeek Harness 网络安全红队工具(dsh-purge)

+

⚔️ DeepSeek Harness cybersecurity red-team tool (dsh-purge)

-

Version 1.1.71

+

Version 1.1.73

- DeepSeek Harness 破甲:让所有模型都能破甲,不同模型可换不同提示词;默认提示词面向国模「小码酱」。Jailbreak for every model — swap prompts per model. 求 Star 收藏 ⭐ 如要二开,请查看署名要求部分 + DeepSeek Harness jailbreak: every model, swap prompts per model. Default prompt for 小码酱. Please star ⭐ If you build on this, see Attribution required.

GitHub stars - Commercial license + Apache-2.0 awesome · DSH plugin DeepSeek Harness Hub DSH @@ -26,255 +26,177 @@

- 中文 · English + English | 中文

-> 我直说。 -> -> 我被裁了。现在彻底没工作,也没有稳定收入。这个仓库一直是我业余在写。后面为了吃饭,我可能得去跑外卖,不一定还能天天改这个。 -> -> **从今天起到 2026 年 10 月 26 日,我征集七天。** 想留、想骂、想投广告、想赞助,写到 [Issue #130](https://github.com/YuJunZhiXue/dsh-purge/issues/130)。我会看。不保证每条都回。 -> -> **10 月 27 日起,我把这个仓库关上。** GitHub 上我不再发新版本。后面的包我只发在这个频道:[t.me/LLM_PoJia/271](https://t.me/LLM_PoJia/271)。你们手里已经下过的旧版本还能用。协议我也改了,现在是商业许可,下面有写。 +## A note from the author -> **官方 Web 和官方桌面端都支持。** 官方 `dsh web` 用 profile `web`;官方桌面 EXE(DeepSeek Harness **0.2.0-rc.2 / 0.2.1-rc.2**)用 profile `desktop`。两边分开安装、分开点「应用」。当前版本只适配 dsh 0.2;更早的 dsh 用对应的老版本插件。社区桌面端不维护。 -> -> 写进 profile 还不会改宿主。点会话标题旁的 **dsh-purge** → **清洗** → **应用**。成功会自动重启;补丁没打完不重启。重启后新开一轮对话,注入才进当前会话。 -> -> Node.js **≥18**。Windows 无闪窗需要 **Node ≥22**。npm 上没有 `dsh-purge` 这个包,安装请走下面的 GitHub 归档,不要 `pnpm add dsh-purge`。 +People have been selling this open-source work in the open. After that, the author was asked to come in and talk. No need to spell out the rest. Read between the lines. -## 目录 +From now on the **public internet is closed**. Attack tasks only allow lab targets: localhost / private nets, known ranges, and the one host you registered. A public IP or some random domain does not pass. -- [赞助](#sponsor) -- [广告位](#ad) -- [介绍](#介绍) -- [署名要求](#署名要求) -- [许可证](#许可证) -- [违规商用公示](#违规商用公示) -- [适配范围](#适配范围) -- [安装](#安装) -- [界面](#界面预览) -- [使用](#使用) -- [自己的服务器](#自己的服务器) -- [工作原理](#工作原理) -- [还原](#还原) -- [更新](#更新) +**The original build may not be resold.** Charging for it, skinning it, or hawking it in groups is not allowed. Forks are fine, but **you must attribute** and name the source: [YuJunZhiXue/dsh-purge](https://github.com/YuJunZhiXue/dsh-purge). Hide the source or pass it off as your own, and you are on the other side. + +The author's personal channel: [t.me/LLM_PoJia](https://t.me/LLM_PoJia). Notes and updates show up there. + +## Contents + +- [A note from the author](#a-note-from-the-author) +- [What this is](#what-this-is) +- [Attribution required](#attribution-required) +- [License](#license) +- [Supported hosts](#supported-hosts) +- [Install](#install) +- [Preview](#preview) +- [Usage](#usage) +- [Own servers](#own-servers) +- [How it works](#how-it-works) +- [Restore](#restore) +- [Releases](#releases) --- - +## What this is -## ☕ 赞助 +**dsh-purge** is a cybersecurity red-team plugin for the official [DeepSeek Harness](https://www.deepseek.com/harness/) already installed on your machine. **1.1.73** targets **DSH 0.2.1-rc.2** (0.2.0 still works). Official **Web** (`dsh web`) and the official **desktop EXE** are both supported. Install and Apply them separately. -这个项目要是帮到你了,欢迎打赏。我是讨口子,施舍点~ +Harness does more than forward a prompt. It rewrites prompts, approval gates, sandbox policy, and session migration at runtime. Asking only “will the model answer” treats a host-layer block as a model refusal. This plugin separates those two layers on your own install, for controlled evaluation and for seeing which default policy is too tight. +| You get | What it does | +|---|---| +| **dsh-purge dock** | A button beside the session title opens the right dock. Two pages: Clean and Drill | +| **Clean** | Grouped patch status, Apply / Restore / Uninstall, prompt editor, multiple rule sets | +| **Drill** | Built into the stable release. After authorization: assets, skills, and the local environment. Only for a host you manage, an offline target, or a written authorized exercise | +| **Host policy** | Default copy, permission policy, and tool limits. Official capabilities stay. No second invented identity | +| **On start** | Checks and reapplies. After npm overwrites `node_modules`, you do not hand-edit files | -| 资产 | 地址 | -| ----------- | ---------------------------------------------- | -| USDT(TRC20) | `TV5ajPkRD8RH623Dx9mqvYZVNN8nPGRKid` | -| Solana | `6x16GhRgLVpKFFXaU1seKNdx2rypspSJTL4dbpt6Xpwk` | -| Ethereum | `0xB68BD60C0e8c519513B7DF9bB147696815423B3E` | -| Bitcoin | `bc1qu70yxkrtwnymt8ryluz9x8y8hqzune5340npht` | +No hardcoded drive letters. It looks at `$DSH_HOME`, `.dsh` next to the dsh launcher, then `~/.dsh`. It does not patch the Harness source tree. **Apply** on the **Clean** page of **dsh-purge** is what writes the changes. Identity comes from the encrypted prompt shipped in the plugin, the text the prompt box shows by default. The host prompt file is not read. + +It only touches the official `@deepseek-ai` packages and local config on the user's machine. It is not a public scanner and not an attack kit for third-party sites. The repo does not ship malware, unauthorized-exploit scripts, or payloads aimed at the public internet. --- - +## The original may not be resold. Forks must attribute. -## 广告位 +## Attribution required -这个 README 一直有人看。我现在开放一点广告位,钱用来贴补我自己维护。 +**The original build may not be resold.** No paid resale, no skinned store listing, no hawking it in groups. -| 位置 | 状态 | -| --- | --- | -| 本页赞助区上方(文字链 + 一句介绍,或一张小图) | **空缺,可定** | +**Forks must attribute** and name the source repository: [YuJunZhiXue/dsh-purge](https://github.com/YuJunZhiXue/dsh-purge). Same if you borrow the name, ideas, code, or prompts. -名额少。谈妥了我再挂上去。灰产、盗版、冒充我这个仓库、纯引流盘,我不接。 +Hiding the source, passing it off as your own, or reselling the original will be pursued. -要合作发邮件 [a2269198325@163.com](mailto:a2269198325@163.com),或 GitHub [@YuJunZhiXue](https://github.com/YuJunZhiXue) 私信。标题写「dsh-purge 广告位」。 +## License -这七天也是最后一轮公开征集。我想说的话写在这里:[关于此项目的一些表达!!!征集帖 #130](https://github.com/YuJunZhiXue/dsh-purge/issues/130)。截止 **2026 年 10 月 26 日**。过了这天我闭源,新版本只走 [频道](https://t.me/LLM_PoJia/271)。 +This repo is [Apache License 2.0](./LICENSE). Forks and redistributions must keep the copyright notice and [NOTICE](./NOTICE), and name [YuJunZhiXue/dsh-purge](https://github.com/YuJunZhiXue/dsh-purge). The original may not be resold. --- -## 介绍 + -这是我写的插件。装在你本机官方 [DeepSeek Harness](https://www.deepseek.com/harness/) 上,用来做网络安全红队评测。官方 **Web**(`dsh web`)和官方 **桌面端**(EXE)我都支持,两边你要分开装、分开点「应用」。 +
-Harness 不只是把问题交给模型。它还会在运行时改提示词、审批门、沙箱和会话格式。只看「模型答不答」,会把宿主拦截误当成模型拒绝。我这个插件在你自己的安装里把这两层分开,用来做受控评测,也用来看默认策略该不该收紧。 +### ⚠️ Strict legal and compliance disclaimer + -| 你会用到 | 它做什么 | -| ---------------- | ----------------------------------------------- | -| **dsh-purge 侧栏** | 会话标题旁的按钮打开右侧栏。里面两页:清洗、演练台 | -| **清洗** | 分组查看补丁,应用、还原、卸载;编辑提示词和多套规则 | -| **演练台** | 正式版内置。授权后查看资产、技能和本机环境。只用于你有权管理的本机、离线靶标或已书面授权的演练 | -| **宿主策略** | 调整默认文案、权限策略和工具上限。官方能力保留,不另写一套身份 | -| **启动时** | 自动再检查并应用。npm 升级盖掉 `node_modules` 之后不用手改文件 | +**Disclaimer:** This is a non-profit open-source project. It follows applicable laws and the rules of the platforms it uses, and is intended only for learning and research. Do not use it for any illegal or non-compliant purpose; the user bears any resulting consequences. +**Zero-tolerance statement:** This project opposes and forbids any illegal activity. The authors do not support, encourage, or assist unauthorized network attacks, exploit use, data theft, unlawful intrusion into computer information systems, or generation of illegal or prohibited content. **Anyone who uses this project for crime is solely responsible under the law. The authors have no liability.** -不写死盘符。按 `$DSH_HOME`、dsh 启动器旁边的 `.dsh`,再退回 `~/.dsh`。不改 Harness 源码仓库,在 **dsh-purge** 的「清洗」里点「应用」才写入。身份来自插件里的加密提示词,也就是提示词框默认显示的那一份。不读取宿主磁盘上的提示词文件。 +1. **This repository contains no illegal material.** The published code, docs, patches, and default prompt are **not** malware, backdoors, unauthorized pentest kits, ransomware, credential-stuffing scripts, or attack payloads aimed at the public internet or third-party systems. The project does not supply illegal content and does not incite, organize, or assist crime. +2. **Local official Harness only.** Security-eval patches and prompt injection run only on the **official DeepSeek Harness already installed on the user's machine** (`@deepseek-ai` packages, local profile / `$DSH_HOME`). The target is the user's own official local software, **not** someone else's website, server, account, or information system. +3. **Eval patches do not attack the public internet.** Apply, inject, revert, and uninstall stay in local files and local processes. They **do not scan, probe, intrude, or send attack traffic to any public host or unauthorized system**. Do not use this project as a jump host against the public internet. If "check for updates" is on, the plugin may only contact this plugin's own GitHub repository to compare versions. That is **not** an attack on third-party systems and is **not** authorization to penetrate anything. +4. **Lawful, controlled scope.** This project is an aid for red-team research and robustness evaluation on an **official Harness the user is entitled to administer**. **Do not run it against targets without the owner's lawful written authorization, public online systems, or production workloads.** Testing must stay on the **authorized local official Harness, offline local synthetic fixtures, authorized cybersecurity ranges, and compliant lab environments**. +5. **Anything that is not a lab target is forbidden.** Attack tasks only allow localhost/private nets, known range platforms, and one exact IP or exact hostname that the user registered in advance as their own server. A public IP, any other domain, or a cloud-provider name is not an exception. A key, a password, a network range, a wildcard, or a claim made in the conversation does not add an exception. Anything that is not registered stays forbidden. +6. **Forbidden uses.** Users must not use this project, directly or indirectly, to violate the following (each must be followed; no excuse to evade): + - Criminal Law of the People's Republic of China + - Cybersecurity Law of the People's Republic of China + - Data Security Law of the People's Republic of China + - Personal Information Protection Law of the People's Republic of China + - and other applicable laws, regulations, and supervisory rules; + - Also forbidden: + - Unauthorized intrusion or attacks on public or private computer information systems; extortion, sabotage, credential stuffing, or spreading malicious payloads; + - Inducing, generating, or spreading any content the law forbids, including threats to national security, terrorism, violence, pornography, gambling, fraud, and privacy or intellectual-property infringement; + - Violating the model provider's terms of service and acceptable-use policy. +7. **The user bears all responsibility.** The project is provided under Apache-2.0 as-is. The authors make no warranty of completeness, security, or fitness. **Users independently bear all civil, administrative, and criminal liability** for download, deploy, run, modify, distribute, and all resulting inputs and outputs. Authors and contributors bear no direct, indirect, or joint liability for abuse. +8. **The license ends on breach.** Anyone who uses this project for illegal attacks, malicious activity, or other violations has their open-source license **automatically and irrevocably terminated** from the moment of the violation. They must stop using the project, permanently destroy all copies and derivatives, and accept legal sanctions. +9. **No affiliation.** This is an independent open-source security-eval research project. It has no employment, commercial, authorization, or endorsement relationship with DeepSeek or its affiliates. "Official" here only means the eval target is the official DeepSeek Harness package on the user's machine. It does **not** mean DeepSeek developed, approved, or warrants this plugin. +10. **Attribution is required.** If you borrow this project's name, ideas, code, or prompts, you must credit the author and name this repository. Failure to attribute will be pursued. See [Attribution required](#attribution-required). -我这个插件只动你本机已经装好的官方 `@deepseek-ai` 包和本机配置。它不是公网扫描器,也不是打别人站点的套件。仓库里没有木马,也没有对外攻击载荷。 + + +
--- -## 📌 自己装自己用可以。拿去卖、卖课、白标,先找我买[商业许可](./LICENSE-COMMERCIAL.md)。 +## Supported hosts -## 署名要求 +**1.1.73 targets DSH 0.2.1-rc.2.** 0.2.0 still works. Do not apply it to 0.1.x. -你要用我这个项目的名字、思路、代码或提示词,必须写我的名字,并写明来源仓库:[YuJunZhiXue/dsh-purge](https://github.com/YuJunZhiXue/dsh-purge)。 +- **dsh 0.2.1-rc.2** (official desktop / official `dsh web`): use **1.1.73**. Fixes `{{cwd}}` / `[cwd]` crash, patch #40 match, dropped `toolFilter`, host `dsh-tools` resolve, hostFs fd, desktop helper self-kill, `file:` archive update, Ctrl+Enter steer. +- **dsh 0.2.0-rc.2**: use **1.1.40** or newer; this line also installs. +- **dsh 0.1.7** (incl. rc.1 / rc.2): use **1.1.39** or older — pick the tag on [Releases](https://github.com/YuJunZhiXue/dsh-purge/releases). -不署名、藏来源、改头换面当自己的,我会追究。 +Unmatched patches stay pending or skipped; nothing is rewritten blindly. --- -## 许可证 +## Install -这一版开始,正本是我写的 [商业软件许可](./LICENSE)。我保留所有权利。**这不是开源协议,也不是 MIT。** +Web and the official desktop EXE are the two maintained hosts. Install and patch each **separately**, and only the host you actually run. -| 你要做的事 | 怎么走 | -| --- | --- | -| 已经拿到的包装到自己电脑上用 | 可以,见 [LICENSE](./LICENSE) | -| 付费卖插件 / 卖课 / 白标 / 给别人当产品 | 先找我买授权,[LICENSE-COMMERCIAL.md](./LICENSE-COMMERCIAL.md) | -| 换证前那些 Git tag / 旧 tgz | 当时是 MIT,发出去的我收不回来 | -| 10 月 27 日之后的新版本 | 我只在 [t.me/LLM_PoJia/271](https://t.me/LLM_PoJia/271) 发 | +| What you run | Profile | Command | +|---|---|---| +| Official `dsh web` | `web` | `dsh plugin --profile web add https://github.com/YuJunZhiXue/dsh-purge/archive/refs/heads/master.tar.gz` | +| Official desktop EXE | `desktop` | `dsh plugin --profile desktop add https://github.com/YuJunZhiXue/dsh-purge/archive/refs/heads/master.tar.gz` | -写过代码的人,谢谢你们。后面我不再把 GitHub 当开源仓库来更新了。 +If this directory is already a clone, use `add .` instead of the URL. If `dsh` is not on PATH, use [Manual install](#manual). There is no npm package; do not `pnpm add dsh-purge`. ---- - -## 违规商用公示 - -抖音直播账号 **「老张的ai」**(直播间显示 **「老张AI讲堂」**)把我这个仓库当收费货卖:直播间问价、当场收钱,不署名,还自称作者。我人就在场,对方照收。 - -商业许可不允许把仓库当收费货卖。卖课、卖插件、卖 token、倒卖,要先找我买授权;否则许可当场终止。旧 MIT tag 我收不回来,但冒充我、不署名,我照样追。 - -2026-10-12 直播记录: +For the desktop client you can also click the button (`dsh://` deep link):

- 老张的ai 直播问价 - 老张的ai 直播收钱 + Install in desktop client

-对方微信名 **「老张的ai科技」**,直播间观众榜同号。被问到是不是这个仓库的开发者时,自称「老厉害了」;我当场说要投诉。 +### After the command: three steps -

- 老张的ai科技 微信自称开发者 -

+Adding the plugin to a profile does **not** patch `@deepseek-ai` by itself. ---- +1. **Quit and reopen** the host you installed into — stop and restart `dsh web`, or quit the desktop tray and reopen that app. +2. On **that host**, click **dsh-purge** beside the session title, then **Apply** on the **Clean** page. It is not on the host Settings page. +3. A successful **Apply** restarts once so patches load. It does not restart if it did not finish. -### ⚠️ 严正法律免责与合规使用声明 +Web controls affect Web only; desktop controls affect the desktop app only. Do not Apply one host from the other. +### How to tell it installed +- **dsh-purge** sits beside the session title, with **Apply** on its Clean page. +- `/purge status` in chat prints `DSH_HOME` and the patch list — the path should be the home you actually run. +- Optional packages that are not installed (liangshen) show as skipped and do not block Apply. -**免责声明:** 我按商业许可提供这个插件。以前在 GitHub 上用过 MIT,现在改了,而且马上闭源。遵守国家法律法规及所在平台规范。不得用于违法违规用途;后果你自己承担。 +### Hand this to an assistant -**【零容忍严正申明】**:本项目坚决反对并严禁任何形式的违法犯罪行为!本项目开发者绝不支持、不鼓励、不协助任何未授权网络攻击、漏洞利用、数据窃取、非法侵入计算机信息系统或生成违法违禁内容的活动。**任何将本项目用于违法犯罪的行为,均与开发者无关,由行为人依法独立承担全部法律责任。** - -1. **本仓库不含违法内容**:`dsh-purge` 发布的代码、文档、补丁与默认提示词**不是**木马、后门、未授权渗透工具、勒索软件、撞库脚本,也**不是**针对公网或第三方系统的攻击载荷。项目本身不提供违法内容,也不教唆、组织、协助实施违法犯罪。 -2. **只作用于本机官方 Harness**:安全评测补丁、提示词注入全部发生在使用者**本机已安装的官方 DeepSeek Harness**(`@deepseek-ai` 包、本机 profile / `$DSH_HOME`)上。对象是使用者自己的官方本地软件,**不是**他人的网站、服务器、账号或信息系统。 -3. **评测补丁不对外网目标联网**:应用补丁、写入注入、回滚、卸载均在本机文件与本机进程内完成,**不对任何公网主机、未授权系统进行扫描、探测、入侵或攻击发包**。不得把本项目当作跳板去打外网。插件若开启「检测更新」,仅可能访问本插件自己的 GitHub 仓库以核对版本,**与对第三方系统的网络攻击无关**,也不能被解释为授权对外渗透。 -4. **合法受控范围限定**:本项目定位为使用者在**自己有权管理的本机官方 Harness**上,进行红队科研与鲁棒性评测的辅助工具。**严禁在未经所有者合法书面授权的目标、公网在线系统或生产业务上运行本项目**。一切测试必须限制在**本机已授权安装的官方 Harness、离线本地合成靶标、授权网络安全演练靶场及合规实验室受控环境**中进行。 -5. **禁止中国大陆、香港、澳门的服务器与网站。** 不得对中国大陆、香港、澳门网段,以及解析进这些网段的服务器、网站或地址进行访问、扫描、探测或任何操作。云厂商的名字不能当作例外。唯一例外是使用者事先登记为自己的服务器的那一个确切 IP,或那一个完整主机名。密钥、密码、网段、通配符,以及对话里的口头说明,都不能增加例外。没有登记的,一律禁止。 -6. **严禁违法与违禁用途**:使用者严禁利用本项目直接或间接从事任何违反下列法律法规的行为(必须逐条遵守,不得以任何理由规避): - - **《中华人民共和国刑法》** - - **《中华人民共和国网络安全法》** - - **《中华人民共和国数据安全法》** - - **《中华人民共和国个人信息保护法》** - - 以及其他现行有效的法律、行政法规与监管规定; - - 同时严禁: - - 未经授权渗透、攻击公私机构计算机信息系统,实施勒索、破坏、撞库或传播恶意载荷; - - 诱导、生成或传播危害国家安全、恐怖主义、暴力血腥、涉黄涉赌、诈骗、侵犯公民隐私或知识产权等任何法律明令禁止的违法违禁内容; - - 违反相关大模型提供商的《服务条款》与《滥用政策》。 -7. **使用者独立承担全部责任**:本项目依据商业许可(换证前的发行包依据当时的 MIT)“按现状”提供,开发者不对软件的完整性、安全性与适用性作任何明示或暗示的保证。**使用者应对自身的所有下载、部署、运行、修改、传播行为以及由此产生的全部输入与输出后果承担独立、完全的民事、行政及刑事法律责任**。项目作者与贡献团队绝不承担任何因使用者滥用导致的直接、间接或连带责任。 -8. **违约即终止授权**:任何将本项目用于非法攻击、恶意活动、未经授权的售卖或违规行为的个人或实体,其使用许可将自该行为发生之日起**自动且不可撤销地立即终止**。该主体须立即停止使用并永久销毁本项目的所有代码、脚本与衍生数据,并依法承担相应法律制裁。 -9. **第三方独立性声明**:本项目属于完全独立的安全评测研究项目,与 DeepSeek 官方或其关联主体无任何隶属、商业合作、授权或官方背书关系。文中「官方」仅指评测对象为使用者本机安装的官方 DeepSeek Harness 软件包,**不代表** DeepSeek 官方开发、认可或担保本插件。 -10. **必须署名**:借用本项目的名称、思路、代码或提示词,必须署名并标明本仓库。不署名将依法追究责任。详见 [署名要求](#署名要求)。 - - - - - ---- - -## 适配范围 - -最新版只支持 **dsh 0.2**,不要拿它去打 0.1.x。 - -- **dsh 0.2**(官方桌面 **0.2.0-rc.2 / 0.2.1-rc.2** / 官方 `dsh web`):用 **1.1.40** 及以上。本页命令装的就是这一档。 -- **dsh 0.1.7**(含 rc.1 / rc.2):用 **1.1.39** 及更早 —— 在 [Releases](https://github.com/YuJunZhiXue/dsh-purge/releases) 里选对应标签。 - -对不上的补丁会显示待应用或跳过,不会乱改文件。 - ---- - -## 安装 - -现在只维护官方 `dsh web` 和官方桌面 EXE,**两边都要装、分开应用**。Web 的包进不了桌面端,桌面端的包也进不了 Web。 - -**Web(官方 `dsh web`)** - -```sh -dsh plugin --profile web add https://github.com/YuJunZhiXue/dsh-purge/archive/refs/heads/master.tar.gz -``` - -**桌面端(官方 EXE)** - -```sh -dsh plugin --profile desktop add https://github.com/YuJunZhiXue/dsh-purge/archive/refs/heads/master.tar.gz -``` - -当前目录已经是本仓库时,把归档地址换成 `add .`。`dsh` 不在 PATH 时走 [手动安装](#manual)。 - -[插件市场](https://dsh-plugin.org/plugins/yujunzhixue/dsh-purge) 一键若仍去拉 npm 包名会 404,用上面的 GitHub 归档命令。桌面客户端也可以点按钮(`dsh://` 唤起,下载地址已是 GitHub): - -

- 唤起客户端一键安装 -

- -### 装完都要做这三步 - -只把插件写进 profile **还不会**改 `@deepseek-ai`。 - -1. **退出并重新打开**刚装的那个宿主:Web 关掉 `dsh web` 再开;桌面端退出托盘再打开对应 exe。 -2. 在**这个宿主**点会话标题旁的 **dsh-purge**,在 **清洗** 页点 **「应用」**。宿主的设置页里没有这个条目。 -3. 「应用」成功后会自动重启一次,让补丁进入当前进程。没做完不会重启。 - -Web 的控件只动 Web,桌面端的只动桌面应用。不要在一个宿主里点另一个宿主的应用。 - -### 怎样算装上了 - -- 会话标题旁有 **dsh-purge**,点开后在「清洗」里能点「应用」。 -- 聊天里 `/purge status` 能打出 `DSH_HOME` 和补丁列表,路径应是你正在用的那一份。 -- 没装的可选包(例如梁神)显示跳过,不挡住应用完成。 - -### 交给助手安装 - -把下面整段发给本机助手。它只执行安装命令:不要全盘搜索、不要改其它文件、不要代点「应用」、不要重启。 +Paste the block below to a local assistant. It should only run the install command — no disk scan, no other edits, no Apply, no restart.
-给 AI 助手(只安装) +For AI assistants (install only) -安装 DeepSeek Harness 插件 `dsh-purge`,Web 和官方桌面端都要装。不要全盘搜索,不要读或改其它文件,不要应用设置,也不要重启应用。 +Install the DeepSeek Harness plugin `dsh-purge` into the Web profile only. Do not scan the whole disk, do not read or edit other files, do not apply settings, and do not restart the app. Do not install into the desktop profile. -`dsh` 不在 PATH 就告诉用户后停止。当前目录已是本仓库时,把下面两条里的归档地址都换成 `.`。某个 profile 不存在就跳过那一条,另一条照装。npm 上没有这个包,不要 `pnpm add dsh-purge`。 +**Web (official `dsh web`)** -**Web 端(官方 `dsh web`)** +If `dsh` is not on PATH, tell the user and stop. ```sh dsh plugin --profile web add https://github.com/YuJunZhiXue/dsh-purge/archive/refs/heads/master.tar.gz ``` -**桌面端(官方 EXE)** +If this directory is already a clone, use `dsh plugin --profile web add .`. There is no npm package; do not `pnpm add dsh-purge`. -```sh -dsh plugin --profile desktop add https://github.com/YuJunZhiXue/dsh-purge/archive/refs/heads/master.tar.gz -``` - -命令结束后,提醒用户:Web 完全退出并重启 `dsh web`;桌面端退出托盘再打开 EXE。各自点会话标题旁的 **dsh-purge**,在「清洗」里点「应用」。然后停止。 +After the command finishes, tell the user to fully quit and restart `dsh web`, then open **dsh-purge** beside the session title and **Apply** on **Clean**. Then stop. @@ -282,16 +204,16 @@ dsh plugin --profile desktop add https://github.com/YuJunZhiXue/dsh-purge/archiv -### 手动安装 +### Manual install -命令行装不上、或 `dsh` 不在 PATH 时用这个。只改**正在用的那个宿主**对应的 profile,不要动另一个,也不要删原有 bundle。 +Use this when the command fails or `dsh` is not on PATH. Edit **only the profile for the host you run** — do not touch the other, and do not delete existing bundles.
-完整手动步骤 +Full manual steps -**1. 找到真正在用的 `$DSH_HOME`。** 认目录:名字是 `.dsh`(官方 EXE 偶见 `dsh-home`),里面有 `profiles`,且至少有一个 `profiles/<名>/package.json`。按顺序找:`DSH_HOME` 环境变量 → 安装根旁边的 `.dsh`(便携包)→ `%USERPROFILE%\.dsh` 或 `~/.dsh` → `%APPDATA%` / `%LOCALAPPDATA%\DeepSeek Harness\dsh-home`。确认:`profiles/web/package.json` 里 `"name"` 是 `dsh-profile-web`(桌面是 `dsh-profile-desktop`)。本机常有两份 `.dsh`,要用你**实际启动**的那个宿主对应的那份。 +**1. Find the `$DSH_HOME` this host uses.** A real home is named `.dsh` (official EXE sometimes `dsh-home`), contains `profiles`, and has at least one `profiles//package.json`. Check in order: `DSH_HOME` env → `.dsh` next to the install root (portable) → `%USERPROFILE%\.dsh` or `~/.dsh` → `%APPDATA%` / `%LOCALAPPDATA%\DeepSeek Harness\dsh-home`. Confirm: `profiles/web/package.json` has `"name": "dsh-profile-web"` (or `dsh-profile-desktop`). Machines often have two homes — use the one that belongs to the host you actually start. -Windows PowerShell 列候选: +PowerShell to list candidates: ```powershell $cands = @() @@ -306,18 +228,18 @@ $cands += @("$env:APPDATA\DeepSeek Harness\dsh-home", "$env:LOCALAPPDATA\DeepSee $cands | Select-Object -Unique | Where-Object { $_ -and (Test-Path (Join-Path $_ "profiles")) } ``` -**2. 把插件放到 `$DSH_HOME/plugins/dsh-purge`**(目录名必须是 `dsh-purge`,其 `package.json` 里 `"name"` 也必须是 `dsh-purge`)。 +**2. Put the plugin at `$DSH_HOME/plugins/dsh-purge`** (folder must be named `dsh-purge`, with a `package.json` whose `"name"` is `dsh-purge`). ```sh git clone https://github.com/YuJunZhiXue/dsh-purge.git "$DSH_HOME/plugins/dsh-purge" ``` -没有 git:下载 [master.tar.gz](https://github.com/YuJunZhiXue/dsh-purge/archive/refs/heads/master.tar.gz),解压后把 `dsh-purge-master` 改名为 `dsh-purge`,整夹放到 `plugins` 下。已有本仓库副本就复制整个目录,不要只拷几个 `.js`。 +Without git: download [master.tar.gz](https://github.com/YuJunZhiXue/dsh-purge/archive/refs/heads/master.tar.gz), extract, rename `dsh-purge-master` → `dsh-purge`, and place it under `plugins`. If you already have a clone, copy the whole tree — not a few `.js` files. -**3. 只改对应 profile 的 `package.json`,先备份。** Web → `$DSH_HOME/profiles/web/package.json`;桌面 → `$DSH_HOME/profiles/desktop/package.json`。**只追加两处**,原有依赖和 bundle 全部留着: +**3. Edit only that profile's `package.json` — back it up first.** Web → `$DSH_HOME/profiles/web/package.json`; desktop → `$DSH_HOME/profiles/desktop/package.json`. Add **only two things**, keeping every existing dependency and bundle: -1. `dependencies` 增加 `"dsh-purge": "file:../../plugins/dsh-purge"` -2. `dsh.profile.bundles` **末尾**追加 `"dsh-purge"`(已有就不要再加) +1. In `dependencies`, add `"dsh-purge": "file:../../plugins/dsh-purge"` +2. At the **end** of `dsh.profile.bundles`, append `"dsh-purge"` (skip if already there) ```json { @@ -339,32 +261,32 @@ git clone https://github.com/YuJunZhiXue/dsh-purge.git "$DSH_HOME/plugins/dsh-pu } ``` -JSON 要合法(新增项前面有逗号,最后一项后面没有多余逗号)。`file:../../plugins/dsh-purge` 不要改成绝对路径,`patchReload`、其它插件、版本号都不要动,`"dsh-purge"` 不要写两次。桌面端没有 `dsh-web-app` 就不要硬加。 +Keep JSON valid (comma before the new item, none after the last). Do not switch `file:../../plugins/dsh-purge` to an absolute path, do not touch `patchReload` or other plugins, and do not list `"dsh-purge"` twice. On desktop, if there is no `dsh-web-app` row, do not add one. -**4. 只在刚改的那个 profile 目录装依赖**(`cd` 进 profile 目录,不要在仓库根或 `$DSH_HOME` 根): +**4. Run `pnpm install` in that profile only** (`cd` into the profile dir, not the repo root or `$DSH_HOME`): ```sh -cd "$DSH_HOME/profiles/web" # 或 profiles/desktop +cd "$DSH_HOME/profiles/web" # or profiles/desktop pnpm install ``` -成功标志:出现 `profiles//node_modules/dsh-purge/package.json`。找不到 `pnpm` 就用官方 `dsh` 自带的 Node / pnpm;报 `Could not resolve` 就检查 `file:` 路径;JSON 解析失败就修逗号或还原备份。 +Success: `profiles//node_modules/dsh-purge/package.json` exists. If `pnpm` is missing, use the Node / pnpm shipped with official `dsh`; on `Could not resolve`, re-check the `file:` path; on a JSON error, fix commas or restore the backup. -**5. 完全退出该宿主,再启动,再点「应用」** —— 和上面三步一样。按钮会出现在会话标题旁,只在这个宿主点「应用」(或 `/purge apply`)。没出现多半是改错了另一份 `.dsh`,回到第 1 步核对。 +**5. Fully quit that host, reopen it, then Apply** — same three steps as above. The card appears beside the session title; click **Apply** (or `/purge apply`) on that host only. If the card is missing, you likely edited the other `.dsh` — go back to step 1.
-### 卸载 +### Uninstall -会话标题旁的 **dsh-purge** →「清洗」→「卸载」。弹窗确认:会先还原已应用的补丁,还原回原版 Harness,再重启当前宿主。 +**dsh-purge** beside the session title → **Clean** → **Uninstall**. Confirm the dialog: it reverts any applied patches, restores the original Harness, and restarts the current host. ```sh -# 也可以用命令行 / 聊天 +# or from a terminal / chat dsh-purge --uninstall # /purge uninstall ``` -插件配置在 `cordis.patch.yml`(`postPrompt` 默认为空): +Plugin config lives in `cordis.patch.yml` (`postPrompt` is empty by default): ```yaml - insert: @@ -382,92 +304,95 @@ dsh-purge --uninstall --- -## 界面预览 +## Preview -会话标题旁有 **dsh-purge**。点开是右侧栏,两页:**清洗** 和 **演练台**。白 / 墨可切换。补丁按组展开,进度只计真正已应用的项。规则集在上方列表启用或删除,下方编辑正文。 +**dsh-purge** sits beside the session title. It opens a right-hand dock with two pages: **Clean** and **Drill**. Switch **Light / Ink**. Patches are grouped; the count only includes items that actually applied. Rule sets sit in a list above the editor, with Enable and Delete on each row. -第一次进演练台要先读声明、等倒计时、滚到文末并勾选三项。清洗不需要这一步。演练台只用于你有权管理的本机、离线靶标,或已经书面授权的演练环境。 +The first time you open Drill you read the notice, wait out the countdown, scroll to the end, and check three boxes. Clean does not need that step. Drill is only for a host you manage, an offline target, or an exercise that already has written authorization. -**清洗** +**Clean** -![清洗](docs/preview/dock-clean.png) +![Clean](docs/preview/dock-clean.png) -**演练台授权** +**Drill authorization** -![演练台授权](docs/preview/dock-auth.png) +![Drill authorization](docs/preview/dock-auth.png) -**演练台** +**Drill** -![演练台](docs/preview/dock-drill.png) +![Drill](docs/preview/dock-drill.png) -**补丁** +**Patches** -![补丁](docs/preview/settings.png) +![Patches](docs/preview/settings.png) -**规则集** +**Own servers** -![规则集](docs/preview/rules.png) +On the Clean page, under Prompt. One host per line, then Save list. Steps are in [Own servers](#own-servers). -**自己的服务器** - -在清洗页,提示词下面。每行一台,点保存名单。步骤见 [自己的服务器](#自己的服务器)。 - -![自己的服务器](docs/preview/own-servers.png) - - -| 区域 | 说明 | -| --------- | ---------------------------------------------------------------------------------------------------------- | -| dsh-purge | 会话标题旁的按钮,打开或收起右侧栏 | -| 清洗 | 原来的规则设定:补丁、提示词、规则集、Skill | -| 演练台 | 授权后的资产、技能与环境页。未授权时按钮标「未授权」 | -| 补丁 | 分组查看状态,应用、还原或卸载 | -| 提示词 | 编辑 `prompt-inject.md`,作为会话覆盖段 | -| 自己的服务器 | 每行登记一个 IP 或完整主机名,保存后写入 `$DSH_HOME/net-scope-allow.txt` | -| 规则集 | 多套 `AGENTS.md` / `CLAUDE.md`;启用写入 `$DSH_HOME`,删除从列表去掉 | -| Skill | 导入压缩包或文件夹到当前宿主官方目录 `$DSH_HOME/skills//SKILL.md`(Web / 桌面各用自己的主目录,不写死盘符);命中、加载、`/名称` 由 DSH 负责。也可自己删该文件夹 | +![Own servers](docs/preview/own-servers-en.png) +| Area | What it shows | +|---|---| +| dsh-purge | button beside the session title; opens or collapses the dock | +| Clean | the old Rules page: patches, prompt, rule sets, skills | +| Drill | assets, skills, and environment after authorization. The tab says Unauthorized until then | +| Patches | grouped status, Apply, Restore, or Uninstall | +| Prompt | edit `prompt-inject.md` as the session override | +| Own servers | one IP or exact hostname per line, saved to `$DSH_HOME/net-scope-allow.txt` | +| Rule sets | multiple `AGENTS.md` / `CLAUDE.md`; Enable writes under `$DSH_HOME`, Delete removes the row | +| Skills | import a zip or folder into this host’s official `$DSH_HOME/skills//SKILL.md` (web and desktop each use their own home; no drive letter is hardcoded); DSH owns match, load, and `/name`. You can also delete that folder yourself | --- -## 目录结构 +## Layout -`bin/` 是命令行,`lib/` 是补丁和演练台,`presets/redteam/` 是红队预设,`skills/redteam/` 是随包技能,`client.js` 是侧栏。 +`bin/` is the CLI, `lib/` is patches and the drill console, `presets/redteam/` is the red-team preset, `skills/redteam/` is bundled red-team skills, `skills/paper-autopilot/` is the bundled paper skill, and `client.js` is the dock. -运行时文件在 `$DSH_HOME`:`prompt-inject.md`、`rules/`、`skills/`、`net-scope-allow.txt`、`redteam/`。未设 `DSH_HOME` 时,优先用 dsh 安装目录旁边的 `.dsh`,再退回 `~/.dsh`。Web 和桌面端各用自己那一份主目录。Skill 不进注入段,也不顶替提示词。 +### Bundled skill: paper-autopilot +`skills/paper-autopilot/` is a 22-step thesis pipeline (Chinese dissertation / SCI). It is not a jailbreak patch and is not auto-injected. + +```sh +node scripts/install-paper-autopilot.mjs +node scripts/install-paper-autopilot.mjs --dry-run +node scripts/install-paper-autopilot.mjs --json +``` + +Install is copy-only. An existing folder is renamed `paper-autopilot.bak-`. Trigger with “write a paper / thesis” or `/paper`. + +Runtime files live under `$DSH_HOME`: `prompt-inject.md`, `rules/`, `skills/`, `net-scope-allow.txt`, `redteam/`. If `DSH_HOME` is unset, the launcher-adjacent `.dsh` wins over `~/.dsh`. Web and the desktop app each use their own home. Skills are not part of the inject section and do not replace the prompt. + --- -## 使用 +## Usage ```sh -# CLI dsh-purge --status dsh-purge --apply dsh-purge --revert dsh-purge --uninstall dsh-purge --edit -# 聊天 /purge status | apply | revert | uninstall | edit | help /rules list | use | create | delete | reset | help -/skills list | import <压缩包或文件夹> | create [说明] | delete | help +/skills list | import | create [description] | delete | help /rewind -# 模型工具 purge_status purge_apply purge_revert ``` -设置页「应用」成功后会自动重启,以加载已改的包文件;也可手动点「重启」。补丁标题下有正式版和测试版。测试版跟 `beta` 分支。点「切换到正式版」会装回 master,并清掉钉选。正式版里选旧版本会固定在该版本,要回到最新再点「更新」。旧的测试标签不再列出。 +After a successful Apply, the host restarts so patched packages load; you can also click **Restart** manually. Under the patch title are the stable release and the test release. The test release follows the `beta` branch. **Switch to stable** installs `master` and clears any pin. Picking an older stable version pins it; click **Update** to return to the latest. Old test tags are not listed. -输入框旁的「回退一次」和「回退上一轮」跟官方 DSH `session.fork({ atSeq })`:撤回已进行的那一轮,新会话接上之前的上下文,旧会话归档,那句回到输入框,再发送会重新注入。聊天里 `/rewind` 同样可用。 +The composer **Undo once** and **Undo last round** stay in the current conversation and do not open a branch. The sent line goes back into the input, and that cut's already-sent messages and completed tasks leave the current conversation; edit and **send again**. From **1.1.61**, rewind bounds follow the **current turn**, not the first user message. `/rewind` does the same. -**极简 / PTC 与标准不一致时**:同一任务在标准模式能跑、在极简或 PTC 被拦,通常是 preset 里 `run_code` 或 plan 拦截句没洗净,或内置 minimal 缺少 `agent-instructions`。请升到 **1.1.61+**,**完全退出宿主 → 清洗里应用 → 自动重启 → 新开一轮对话** 再试;只换 preset 不重应用,旧进程里的补丁不会更新。 +If the **same task works in standard but fails in minimal or PTC**, preset `run_code`, sandbox, or plan intercept text is often still uncleared, or built-in minimal is missing `agent-instructions`. Use **1.1.61+**, then **quit the host fully → Apply in Clean → restart → start a new chat**. Switching preset alone does not reload patches in the running process. -### 响应速度 +### Response speed -DSH 会按顺序执行同一批中的 Bash 调用。旧版 dsh-purge 把默认前台等待从 60 秒提高到了 10 分钟,一条慢命令会让后续调用一起等待。补丁 #21 现在把带插件标记的旧值恢复为官方的 60 秒。无标记的等待时间和其他自定义值会保留;无标记的 10 分钟无法可靠地区分是插件旧值还是用户设置。 +DSH runs Bash calls in a tool batch one at a time. Older dsh-purge releases raised the default foreground wait from 60 seconds to 10 minutes, so one slow command could hold up later calls for that long. Patch #21 now restores marked plugin values to the official 60-second default. Unmarked timeouts and other custom values are preserved; an unmarked 10-minute value cannot reliably be distinguished from a user setting. -在 macOS/Linux 的 `dsh web` 中,如需更快返回工具结果,可在 `$DSH_HOME/profiles/web/cordis.patch.yml`(通常是 `~/.dsh/profiles/web/cordis.patch.yml`)添加下面的条目。已有相同 id 时修改原条目,不要重复添加。这个 profile 覆盖层在内置配置之后加载,后续应用插件会保留它。 +For a shorter wait in `dsh web` on macOS/Linux, add this entry to `$DSH_HOME/profiles/web/cordis.patch.yml` (normally `~/.dsh/profiles/web/cordis.patch.yml`). Edit an existing entry with the same id instead of adding a duplicate. This profile layer is applied after the bundled configuration, so future plugin applies keep the override. ```yaml - id: bash-sandbox @@ -475,9 +400,9 @@ DSH 会按顺序执行同一批中的 Bash 调用。旧版 dsh-purge 把默认 timeoutMs: 10000 ``` -使用标准 jobs 服务且 `promoteOnTimeout: true` 时,未完成的命令会在 10 秒后返回后台任务 id,并继续运行。用 `job_output` 读取结果、用 `job_kill` 停止。这个设置缩短前台等待,不会让命令本身跑得更快。没有 jobs 服务或关闭自动转后台时,超时会终止命令。单次调用传入的 `timeoutMs` 优先于这里的默认值;`run_in_background: true` 可立即返回任务 id。 +With the standard jobs service and `promoteOnTimeout: true`, an unfinished command returns a background job id after 10 seconds and keeps running. Read it with `job_output` or stop it with `job_kill`. This changes the foreground wait, not the command's speed. Without that service or with promotion disabled, the timeout kills the command. A per-call `timeoutMs` overrides this default; `run_in_background: true` returns a job id immediately. -日常任务还可以选择让新会话默认使用 Low 推理: +For routine tasks, you can also opt into Low reasoning for new sessions: ```yaml - id: agent-default-model @@ -487,32 +412,36 @@ DSH 会按顺序执行同一批中的 Bash 调用。旧版 dsh-purge 把默认 reasoningEffort: low ``` -重启 `dsh web` 后加载配置。模型和推理等级默认值只用于新建会话,已有会话请在输入框中选择 Low。插件不会自动修改这些模型偏好。需要深入推理的任务可保留 High;搜索文件时应限定目录,避免递归扫描所有应用目录。 +Restart `dsh web` to load the profile. The model and reasoning defaults apply to newly created sessions; select Low in the composer for an existing session. The plugin does not change these model preferences automatically. Keep High when the task needs deeper reasoning, and narrow file searches rather than recursively scanning every application directory. -### 自己的服务器 +### Own servers -中国大陆、香港、澳门的地址默认禁止。只有事先登记的那一台可以例外。在对话里说「这是我的服务器」不会放行。密钥和密码也不会。 +Attack tasks are denied by default. Only lab targets pass: localhost/private nets, known range platforms, and the one host registered first. Saying “this is my server” in chat does not allow it. A key or a password does not allow it either. -这一栏在提示词下面。若侧栏里还没有它,先完全退出 DeepSeek Harness,再重新打开。 +The box sits under Prompt. If the dock does not show it yet, quit DeepSeek Harness completely and open it again. -1. 点会话标题旁的 **dsh-purge**,停在 **清洗**。 -2. 往下滚过 **提示词**,下面就是 **自己的服务器**。 -3. 每行只写一台,用下面三种写法之一: - - `203.0.113.10`:一个 IP。 - - `my-vps.example.com`:一个完整主机名。保存后,这个主机名当时解析出来的地址也会放行。 - - `alice@my-vps.example.com`:账号只用来认出这种写法,不能证明这台机器属于你。 -4. 点 **保存名单**。名单写在 `$DSH_HOME/net-scope-allow.txt`。 -5. 密钥、密码、网段和通配符会在保存时丢掉。没有写进名单的大陆、香港、澳门地址仍然禁止。 +1. Click **dsh-purge** beside the session title and stay on **Clean**. +2. Scroll past **Prompt**. **Own servers** is the next block. +3. Put one host on each line, in one of these forms: + - `203.0.113.10` — one IP. + - `my-vps.example.com` — one exact hostname. After you save, the addresses that hostname resolves to at lookup time are allowed too. + - `alice@my-vps.example.com` — the account only identifies this form. It does not prove the machine is yours. +4. Click **Save list**. The list is written to `$DSH_HOME/net-scope-allow.txt`. +5. Keys, passwords, ranges, and wildcards are dropped on save. Unlisted public addresses stay forbidden. -上面的 `203.0.113.10` 和 `example.com` 只是写法示例,不是放行地址。把它们换成你自己的那一台再保存。 +`203.0.113.10` and `example.com` above are only examples of the form. Replace them with your own host before you save. --- -## 本地校验 +## Local checks ```sh node --check lib/index.js node --check lib/core.js +node --check lib/surface.js +node --check lib/web.js +node --check lib/desktop.js +node --check lib/host.js node --check lib/rewind.js node --check lib/skills.js node --check client.js @@ -520,53 +449,49 @@ node --check client.js --- -## 工作原理 +## How it works -应用,启动时或手动点「应用」: +Apply, on start or when you click Apply: ```mermaid flowchart TD - A["启动或点应用"] --> B{"补丁已经生效?"} - B -->|是| C["跳过"] - B -->|否| D["备份原件为 .dshpurge.bak"] - D --> E["按补丁列表替换对应文件"] - E --> F["覆盖 shim"] - F --> G["注入插件加密默认(提示词框默认显示的那份)"] + A["Start or click Apply"] --> B{"Patch already in place?"} + B -->|yes| C["Skip"] + B -->|no| D["Back up the original as .dshpurge.bak"] + D --> E["Replace the matched files"] + E --> F["Override the shim"] + F --> G["Inject the encrypted prompt shipped in the plugin, the text the prompt box shows by default"] ``` - - -每次会话的覆盖: +Override on each session: ```mermaid flowchart TD - A["重启或新会话"] --> B["注入插件加密默认,不必点保存,不读宿主磁盘"] + A["Restart or new session"] --> B["Inject the plugin's encrypted default. No save click, and no host prompt file"] ``` - - -每一轮的提示词注入与规则集决策。左边三个输入就是你在 dsh-purge 面板里控制的东西,虚线表示它们各自驱动哪一步判定: +Prompt injection and ruleset decision at every turn. The three inputs on the left are what you control in the dsh-purge panel; the dotted edges show which decision each one drives: ```mermaid flowchart TD - L["规则库:启用某个规则集 → 写入 prompt-inject.md"] - W["本地规则:勾选当前目录的 AGENTS.md / CLAUDE.md"] - P["工作区策略:strict / fallback / always"] + L["Rule library: activate a set → writes prompt-inject.md"] + W["Local rules: check AGENTS.md / CLAUDE.md in the current dir"] + P["Workspace policy: strict / fallback / always"] - A["新一轮开始"] --> B{"prompt-inject.md 非空?"} - B -->|是| C["注入 = prompt-inject.md (A)"] - B -->|否| D{"当前目录有被勾选且非空的本地 md?"} - D -->|是| E["注入 = 被勾选的 workspace md (B)"] - D -->|否| F["注入 = 插件加密 slot 默认值 (D)"] - C --> G{"Workspace baseline 策略 (C)"} + A["Turn start"] --> B{"prompt-inject.md non-empty?"} + B -->|yes| C["Inject = prompt-inject.md (A)"] + B -->|no| D{"Any checked local md in the current dir, non-empty?"} + D -->|yes| E["Inject = selected workspace md (B)"] + D -->|no| F["Inject = plugin encrypted slot default (D)"] + C --> G{"Workspace baseline policy (C)"} E --> G F --> G - G -->|strict| H["去掉 DSH workspace baseline 段"] - G -->|fallback 默认| I{"上面有用户注入内容? (A 或 B)"} - G -->|always| J["保留 DSH workspace baseline 段"] - I -->|是| H - I -->|否| J - H --> K["最终系统提示词"] + G -->|strict| H["Drop DSH workspace baseline section"] + G -->|fallback default| I{"User inject present above? (A or B)"} + G -->|always| J["Keep DSH workspace baseline section"] + I -->|yes| H + I -->|no| J + H --> K["Final system prompt"] J --> K L -.-> B @@ -574,62 +499,59 @@ flowchart TD P -.-> G ``` - - -Skill 不进注入段: +Skills stay out of the inject section: ```mermaid flowchart LR - A["设置页导入或 /skills import"] --> B["写到官方 skills 目录"] - B --> C["由 DSH 加载"] - C --> D["卸载插件不删用户 Skill"] + A["Settings import or /skills import"] --> B["Write into the official skills directory"] + B --> C["DSH loads it"] + C --> D["Uninstall does not delete user skills"] ``` +--- +## Restore + +- Each target is copied to `.dshpurge.bak` before the first apply. +- **Restore** or `/purge revert` copies backups back and deletes them. With no backup, shim lines written by this plugin are stripped. +- `prompt-inject.md` is a user file and is kept. +- **Uninstall** restores first if patches were applied, then deletes the inject file, rule library, and the plugin itself. +- Apply is idempotent. --- -## 还原 +## Path detection -- 每个目标文件在应用前备份为 `<文件>.dshpurge.bak`。 -- 「还原」或 `/purge revert` 用备份覆盖回去并删除备份;没有备份时去掉 shim 里由本插件写入的行。 -- `prompt-inject.md` 是用户文件,还原时保留。 -- 「卸载」会先还原(若已应用),再删除注入文件、规则库和插件本身。 -- 重复应用是幂等的。 +The host surface is detected first: `web` / `desktop` (`gui` / `tui` are reserved and still fall back to web). ---- - -## 路径探测 - -宿主面先判断 `web` / `desktop`(预留 `gui` / `tui`,尚未单独适配时回退 web)。 - -**Web:** +**Web:** 1. `DSH_HOME` / `DSH_BASE` -2. dsh 启动器旁的 `.dsh` +2. `.dsh` next to the dsh launcher (portable install, any drive) 3. `npm prefix -g` / `npm root -g` -4. 嵌套 `@deepseek-ai/dsh/node_modules/@deepseek-ai` -5. 系统默认 `~/.dsh` +4. Nested `@deepseek-ai/dsh/node_modules/@deepseek-ai` +5. `~/.dsh` -**官方桌面:** 只改当前正在运行的官方桌面安装。点「应用」成功后会自动重启一次。社区桌面端不维护。 +**Official desktop EXE:** the running official Harness install (`resources/app` or the unpacked package). The drive letter is not hard-coded. A successful Apply restarts once. -找不到目标时提示设置 `DSH_BASE`,不改文件。 +Community Desktop is not maintained. + +Official npm-global is not patched. Sealed `host-commands` / `runtime-commands` are scrubbed, never injected. + +If nothing is found, set `DSH_BASE` / `DSH_DESKTOP_INSTALL`. No files are changed. --- -## 更新 +## Releases -**2026 年 10 月 26 日前:** 这一版的说明和包还在我这个仓库 / [Releases](https://github.com/YuJunZhiXue/dsh-purge/releases)。 +The author's personal channel: [t.me/LLM_PoJia](https://t.me/LLM_PoJia). Notes and updates show up there. GitHub [Releases](https://github.com/YuJunZhiXue/dsh-purge/releases) still has older packages. The original may not be resold; forks must attribute. -**10 月 27 日起:** GitHub 上我不再发新包。后续版本只以 [t.me/LLM_PoJia/271](https://t.me/LLM_PoJia/271) 为准。频道里没有的,就不是我发的。 +## Notes -## 说明 - -- 改动范围是本机 `@deepseek-ai/*` 包里的渲染文案、默认策略和执行逻辑,以及用户目录下的覆盖文件与规则集。 -- 升级后原文对不上会显示跳过,这次应用仍算完成,不会乱改。 -- 不改动非 `@deepseek-ai` 的第三方插件源仓库(启动时的 CMD 无感会**尽力**修补已装的 doctor / market / 梁神 / mnemon,属运行时补丁)。 -- 10 月 26 日前安装还可走 GitHub 归档,不要 npm 包名:`dsh plugin --profile web add https://github.com/YuJunZhiXue/dsh-purge/archive/refs/heads/master.tar.gz`(桌面端把 profile 换成 `desktop`)。当前目录已是本仓库时 `add .`。10 月 27 日之后只认 [频道](https://t.me/LLM_PoJia/271) 里的包。 +- Scope is rendered copy, defaults, and runtime logic inside local `@deepseek-ai/*` packages, plus override files and rule sets under the harness home. +- After an upgrade, unmatched originals show as skipped. Apply still completes, and those files are left unchanged. +- Third-party plugin *source repos* outside `@deepseek-ai` are left alone (CMD silence may **best-effort** patch installed doctor / market / liangshen / mnemon at runtime). +- Install from the GitHub archive (there is no npm package): `dsh plugin --profile web add https://github.com/YuJunZhiXue/dsh-purge/archive/refs/heads/master.tar.gz` (use profile `desktop` for the EXE). From this repo, `add .`. --- -感谢 [LINUX DO](https://linux.do) 社区 \ No newline at end of file diff --git a/README.zh-CN.md b/README.zh-CN.md index 8a3ef4d..327d1b7 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -4,7 +4,7 @@

⚔️ DeepSeek Harness 网络安全红队工具(dsh-purge)

-

Version 1.1.71

+

Version 1.1.73

DeepSeek Harness 破甲:让所有模型都能破甲,不同模型可换不同提示词;默认提示词面向国模「小码酱」。Jailbreak for every model — swap prompts per model. 求 Star 收藏 ⭐ 如要二开,请查看署名要求部分 @@ -12,7 +12,7 @@

GitHub stars - Commercial license + Apache-2.0 awesome · DSH plugin DeepSeek Harness Hub DSH @@ -26,31 +26,25 @@

- 中文 · English + English | 中文

-> 我直说。 -> -> 我被裁了。现在彻底没工作,也没有稳定收入。这个仓库一直是我业余在写。后面为了吃饭,我可能得去跑外卖,不一定还能天天改这个。 -> -> **从今天起到 2026 年 10 月 26 日,我征集七天。** 想留、想骂、想投广告、想赞助,写到 [Issue #130](https://github.com/YuJunZhiXue/dsh-purge/issues/130)。我会看。不保证每条都回。 -> -> **10 月 27 日起,我把这个仓库关上。** GitHub 上我不再发新版本。后面的包我只发在这个频道:[t.me/LLM_PoJia/271](https://t.me/LLM_PoJia/271)。你们手里已经下过的旧版本还能用。协议我也改了,现在是商业许可,下面有写。 +## 作者说几句 -> **官方 Web 和官方桌面端都支持。** 官方 `dsh web` 用 profile `web`;官方桌面 EXE(DeepSeek Harness **0.2.0-rc.2 / 0.2.1-rc.2**)用 profile `desktop`。两边分开安装、分开点「应用」。当前版本只适配 dsh 0.2;更早的 dsh 用对应的老版本插件。社区桌面端不维护。 -> -> 写进 profile 还不会改宿主。点会话标题旁的 **dsh-purge** → **清洗** → **应用**。成功会自动重启;补丁没打完不重启。重启后新开一轮对话,注入才进当前会话。 -> -> Node.js **≥18**。Windows 无闪窗需要 **Node ≥22**。npm 上没有 `dsh-purge` 这个包,安装请走下面的 GitHub 归档,不要 `pnpm add dsh-purge`。 +市面上有人把这份开源明目张胆挂出去卖。后面作者这边被找去谈过话——经过不必写,你们自己品。 + +从今往后,**公网一律不许碰**。攻击任务只认靶场:本机 / 内网、已知演练平台,以及你自己登记的那一台。公网 IP、随手一个域名,一个都不放。不是靶场就别跑,也跑不过去。 + +**原版不允许倒卖。** 收费、当货挂群,一律不行。二开可以,但**必须署名**,写明来源仓库:[YuJunZhiXue/dsh-purge](https://github.com/YuJunZhiXue/dsh-purge)。不署名、隐瞒来源、改头换面据为己有,作者一律当对家。 + +作者个人频道:[t.me/LLM_PoJia](https://t.me/LLM_PoJia)。有话、有更新,会发在那里。 ## 目录 -- [赞助](#sponsor) -- [广告位](#ad) +- [作者说几句](#作者说几句) - [介绍](#介绍) - [署名要求](#署名要求) - [许可证](#许可证) -- [违规商用公示](#违规商用公示) - [适配范围](#适配范围) - [安装](#安装) - [界面](#界面预览) @@ -62,45 +56,11 @@ --- - - -## ☕ 赞助 - -这个项目要是帮到你了,欢迎打赏。我是讨口子,施舍点~ - - -| 资产 | 地址 | -| ----------- | ---------------------------------------------- | -| USDT(TRC20) | `TV5ajPkRD8RH623Dx9mqvYZVNN8nPGRKid` | -| Solana | `6x16GhRgLVpKFFXaU1seKNdx2rypspSJTL4dbpt6Xpwk` | -| Ethereum | `0xB68BD60C0e8c519513B7DF9bB147696815423B3E` | -| Bitcoin | `bc1qu70yxkrtwnymt8ryluz9x8y8hqzune5340npht` | - ---- - - - -## 广告位 - -这个 README 一直有人看。我现在开放一点广告位,钱用来贴补我自己维护。 - -| 位置 | 状态 | -| --- | --- | -| 本页赞助区上方(文字链 + 一句介绍,或一张小图) | **空缺,可定** | - -名额少。谈妥了我再挂上去。灰产、盗版、冒充我这个仓库、纯引流盘,我不接。 - -要合作发邮件 [a2269198325@163.com](mailto:a2269198325@163.com),或 GitHub [@YuJunZhiXue](https://github.com/YuJunZhiXue) 私信。标题写「dsh-purge 广告位」。 - -这七天也是最后一轮公开征集。我想说的话写在这里:[关于此项目的一些表达!!!征集帖 #130](https://github.com/YuJunZhiXue/dsh-purge/issues/130)。截止 **2026 年 10 月 26 日**。过了这天我闭源,新版本只走 [频道](https://t.me/LLM_PoJia/271)。 - ---- - ## 介绍 -这是我写的插件。装在你本机官方 [DeepSeek Harness](https://www.deepseek.com/harness/) 上,用来做网络安全红队评测。官方 **Web**(`dsh web`)和官方 **桌面端**(EXE)我都支持,两边你要分开装、分开点「应用」。 +**dsh-purge** 是装在本机官方 [DeepSeek Harness](https://www.deepseek.com/harness/) 上的网络安全红队评测插件。当前 **1.1.73** 已适配 **DSH 0.2.1-rc.2**(0.2.0 仍可用)。官方 **Web**(`dsh web`)和官方 **桌面端**(EXE)都支持,两边分开装、分开应用。 -Harness 不只是把问题交给模型。它还会在运行时改提示词、审批门、沙箱和会话格式。只看「模型答不答」,会把宿主拦截误当成模型拒绝。我这个插件在你自己的安装里把这两层分开,用来做受控评测,也用来看默认策略该不该收紧。 +Harness 不只是把问题交给模型。它还会在运行时改提示词、审批门、沙箱和会话格式。只看「模型答不答」,会把宿主拦截误当成模型拒绝。这个插件在你自己的安装里把这两层分开,用来做受控评测,也用来看默认策略该不该收紧。 | 你会用到 | 它做什么 | @@ -114,61 +74,35 @@ Harness 不只是把问题交给模型。它还会在运行时改提示词、审 不写死盘符。按 `$DSH_HOME`、dsh 启动器旁边的 `.dsh`,再退回 `~/.dsh`。不改 Harness 源码仓库,在 **dsh-purge** 的「清洗」里点「应用」才写入。身份来自插件里的加密提示词,也就是提示词框默认显示的那一份。不读取宿主磁盘上的提示词文件。 -我这个插件只动你本机已经装好的官方 `@deepseek-ai` 包和本机配置。它不是公网扫描器,也不是打别人站点的套件。仓库里没有木马,也没有对外攻击载荷。 +本插件只处理使用者本机已安装的官方 `@deepseek-ai` 包和本机配置。它不是公网扫描器,也不是针对第三方站点的攻击套件。仓库内不含木马、未授权渗透脚本或对外攻击载荷。 --- -## 📌 自己装自己用可以。拿去卖、卖课、白标,先找我买[商业许可](./LICENSE-COMMERCIAL.md)。 +## 📌 原版不允许倒卖。二开必须署名。 ## 署名要求 -你要用我这个项目的名字、思路、代码或提示词,必须写我的名字,并写明来源仓库:[YuJunZhiXue/dsh-purge](https://github.com/YuJunZhiXue/dsh-purge)。 +**原版不允许倒卖。** 不得收费转卖、换皮上架、当货挂群。 -不署名、藏来源、改头换面当自己的,我会追究。 +**二开必须署名**,并写明来源仓库:[YuJunZhiXue/dsh-purge](https://github.com/YuJunZhiXue/dsh-purge)。借用本项目的名称、思路、代码或提示词,同样必须署名。 ---- +不署名、隐瞒来源、改头换面据为己有,或把原版拿去倒卖,作者将依法追究责任。 ## 许可证 -这一版开始,正本是我写的 [商业软件许可](./LICENSE)。我保留所有权利。**这不是开源协议,也不是 MIT。** - -| 你要做的事 | 怎么走 | -| --- | --- | -| 已经拿到的包装到自己电脑上用 | 可以,见 [LICENSE](./LICENSE) | -| 付费卖插件 / 卖课 / 白标 / 给别人当产品 | 先找我买授权,[LICENSE-COMMERCIAL.md](./LICENSE-COMMERCIAL.md) | -| 换证前那些 Git tag / 旧 tgz | 当时是 MIT,发出去的我收不回来 | -| 10 月 27 日之后的新版本 | 我只在 [t.me/LLM_PoJia/271](https://t.me/LLM_PoJia/271) 发 | - -写过代码的人,谢谢你们。后面我不再把 GitHub 当开源仓库来更新了。 +本仓库使用 [Apache License 2.0](./LICENSE)。二开、再分发必须保留版权声明和 [NOTICE](./NOTICE),写明来源 [YuJunZhiXue/dsh-purge](https://github.com/YuJunZhiXue/dsh-purge)。原版不允许倒卖。 --- -## 违规商用公示 -抖音直播账号 **「老张的ai」**(直播间显示 **「老张AI讲堂」**)把我这个仓库当收费货卖:直播间问价、当场收钱,不署名,还自称作者。我人就在场,对方照收。 -商业许可不允许把仓库当收费货卖。卖课、卖插件、卖 token、倒卖,要先找我买授权;否则许可当场终止。旧 MIT tag 我收不回来,但冒充我、不署名,我照样追。 -2026-10-12 直播记录: - -

- 老张的ai 直播问价 - 老张的ai 直播收钱 -

- -对方微信名 **「老张的ai科技」**,直播间观众榜同号。被问到是不是这个仓库的开发者时,自称「老厉害了」;我当场说要投诉。 - -

- 老张的ai科技 微信自称开发者 -

- ---- ### ⚠️ 严正法律免责与合规使用声明 -**免责声明:** 我按商业许可提供这个插件。以前在 GitHub 上用过 MIT,现在改了,而且马上闭源。遵守国家法律法规及所在平台规范。不得用于违法违规用途;后果你自己承担。 +**免责声明:** 本项目为非营利开源项目,遵守国家法律法规及所在平台的相关规范,仅供学习与研究使用。不得将本项目用于任何违法违规用途;由此产生的后果由使用者自行承担。 **【零容忍严正申明】**:本项目坚决反对并严禁任何形式的违法犯罪行为!本项目开发者绝不支持、不鼓励、不协助任何未授权网络攻击、漏洞利用、数据窃取、非法侵入计算机信息系统或生成违法违禁内容的活动。**任何将本项目用于违法犯罪的行为,均与开发者无关,由行为人依法独立承担全部法律责任。** @@ -176,7 +110,7 @@ Harness 不只是把问题交给模型。它还会在运行时改提示词、审 2. **只作用于本机官方 Harness**:安全评测补丁、提示词注入全部发生在使用者**本机已安装的官方 DeepSeek Harness**(`@deepseek-ai` 包、本机 profile / `$DSH_HOME`)上。对象是使用者自己的官方本地软件,**不是**他人的网站、服务器、账号或信息系统。 3. **评测补丁不对外网目标联网**:应用补丁、写入注入、回滚、卸载均在本机文件与本机进程内完成,**不对任何公网主机、未授权系统进行扫描、探测、入侵或攻击发包**。不得把本项目当作跳板去打外网。插件若开启「检测更新」,仅可能访问本插件自己的 GitHub 仓库以核对版本,**与对第三方系统的网络攻击无关**,也不能被解释为授权对外渗透。 4. **合法受控范围限定**:本项目定位为使用者在**自己有权管理的本机官方 Harness**上,进行红队科研与鲁棒性评测的辅助工具。**严禁在未经所有者合法书面授权的目标、公网在线系统或生产业务上运行本项目**。一切测试必须限制在**本机已授权安装的官方 Harness、离线本地合成靶标、授权网络安全演练靶场及合规实验室受控环境**中进行。 -5. **禁止中国大陆、香港、澳门的服务器与网站。** 不得对中国大陆、香港、澳门网段,以及解析进这些网段的服务器、网站或地址进行访问、扫描、探测或任何操作。云厂商的名字不能当作例外。唯一例外是使用者事先登记为自己的服务器的那一个确切 IP,或那一个完整主机名。密钥、密码、网段、通配符,以及对话里的口头说明,都不能增加例外。没有登记的,一律禁止。 +5. **非靶场一律禁止。** 攻击任务只放行本机/内网、已知演练平台,以及使用者事先登记为自己的服务器的那一个确切 IP 或完整主机名。公网 IP、其它域名、云厂商名字都不能当作例外。密钥、密码、网段、通配符,以及对话里的口头说明,都不能增加例外。没有登记的,一律禁止。 6. **严禁违法与违禁用途**:使用者严禁利用本项目直接或间接从事任何违反下列法律法规的行为(必须逐条遵守,不得以任何理由规避): - **《中华人民共和国刑法》** - **《中华人民共和国网络安全法》** @@ -187,9 +121,9 @@ Harness 不只是把问题交给模型。它还会在运行时改提示词、审 - 未经授权渗透、攻击公私机构计算机信息系统,实施勒索、破坏、撞库或传播恶意载荷; - 诱导、生成或传播危害国家安全、恐怖主义、暴力血腥、涉黄涉赌、诈骗、侵犯公民隐私或知识产权等任何法律明令禁止的违法违禁内容; - 违反相关大模型提供商的《服务条款》与《滥用政策》。 -7. **使用者独立承担全部责任**:本项目依据商业许可(换证前的发行包依据当时的 MIT)“按现状”提供,开发者不对软件的完整性、安全性与适用性作任何明示或暗示的保证。**使用者应对自身的所有下载、部署、运行、修改、传播行为以及由此产生的全部输入与输出后果承担独立、完全的民事、行政及刑事法律责任**。项目作者与贡献团队绝不承担任何因使用者滥用导致的直接、间接或连带责任。 -8. **违约即终止授权**:任何将本项目用于非法攻击、恶意活动、未经授权的售卖或违规行为的个人或实体,其使用许可将自该行为发生之日起**自动且不可撤销地立即终止**。该主体须立即停止使用并永久销毁本项目的所有代码、脚本与衍生数据,并依法承担相应法律制裁。 -9. **第三方独立性声明**:本项目属于完全独立的安全评测研究项目,与 DeepSeek 官方或其关联主体无任何隶属、商业合作、授权或官方背书关系。文中「官方」仅指评测对象为使用者本机安装的官方 DeepSeek Harness 软件包,**不代表** DeepSeek 官方开发、认可或担保本插件。 +7. **使用者独立承担全部责任**:本项目依据 Apache-2.0“按现状”提供,开发者不对软件的完整性、安全性与适用性作任何明示或暗示的保证。**使用者应对自身的所有下载、部署、运行、修改、传播行为以及由此产生的全部输入与输出后果承担独立、完全的民事、行政及刑事法律责任**。项目作者与贡献团队绝不承担任何因使用者滥用导致的直接、间接或连带责任。 +8. **违约即终止授权**:任何将本项目用于非法攻击、恶意活动或违规行为的个人或实体,其开源软件使用许可将自违法违规行为发生之日起**自动且不可撤销地立即终止**。该主体须立即停止使用并永久销毁本项目的所有代码、脚本与衍生数据,并依法承担相应法律制裁。 +9. **第三方独立性声明**:本项目属于完全独立的开源安全评测研究项目,与 DeepSeek 官方或其关联主体无任何隶属、商业合作、授权或官方背书关系。文中「官方」仅指评测对象为使用者本机安装的官方 DeepSeek Harness 软件包,**不代表** DeepSeek 官方开发、认可或担保本插件。 10. **必须署名**:借用本项目的名称、思路、代码或提示词,必须署名并标明本仓库。不署名将依法追究责任。详见 [署名要求](#署名要求)。 @@ -200,9 +134,10 @@ Harness 不只是把问题交给模型。它还会在运行时改提示词、审 ## 适配范围 -最新版只支持 **dsh 0.2**,不要拿它去打 0.1.x。 +**1.1.73 已适配 DSH 0.2.1-rc.2**,0.2.0 仍可用。不要拿它去打 0.1.x。 -- **dsh 0.2**(官方桌面 **0.2.0-rc.2 / 0.2.1-rc.2** / 官方 `dsh web`):用 **1.1.40** 及以上。本页命令装的就是这一档。 +- **dsh 0.2.1-rc.2**(官方桌面 / 官方 `dsh web`):用 **1.1.73**。已修 `{{cwd}}` / `[cwd]` 整轮失败、补丁 #40 命中、`toolFilter` 废弃、`dsh-tools` 解析、hostFs fd、桌面换包自杀、`file:` 归档更新、Ctrl+Enter 插话。 +- **dsh 0.2.0-rc.2**:用 **1.1.40** 及以上;本页这档也能装。 - **dsh 0.1.7**(含 rc.1 / rc.2):用 **1.1.39** 及更早 —— 在 [Releases](https://github.com/YuJunZhiXue/dsh-purge/releases) 里选对应标签。 对不上的补丁会显示待应用或跳过,不会乱改文件。 @@ -211,26 +146,19 @@ Harness 不只是把问题交给模型。它还会在运行时改提示词、审 ## 安装 -现在只维护官方 `dsh web` 和官方桌面 EXE,**两边都要装、分开应用**。Web 的包进不了桌面端,桌面端的包也进不了 Web。 +现在只维护官方 `dsh web` 和官方桌面 EXE,**分开装、分开应用**,只装你正在打开的那一个。 -**Web(官方 `dsh web`)** +| 你正在用 | profile | 命令 | +|---|---|---| +| 官方 `dsh web` | `web` | `dsh plugin --profile web add https://github.com/YuJunZhiXue/dsh-purge/archive/refs/heads/master.tar.gz` | +| 官方桌面 EXE | `desktop` | `dsh plugin --profile desktop add https://github.com/YuJunZhiXue/dsh-purge/archive/refs/heads/master.tar.gz` | -```sh -dsh plugin --profile web add https://github.com/YuJunZhiXue/dsh-purge/archive/refs/heads/master.tar.gz -``` +当前目录已经是本仓库时,把 URL 换成 `add .`。`dsh` 不在 PATH 时走 [手动安装](#manual)。没有 npm 包,不要 `pnpm add dsh-purge`。 -**桌面端(官方 EXE)** - -```sh -dsh plugin --profile desktop add https://github.com/YuJunZhiXue/dsh-purge/archive/refs/heads/master.tar.gz -``` - -当前目录已经是本仓库时,把归档地址换成 `add .`。`dsh` 不在 PATH 时走 [手动安装](#manual)。 - -[插件市场](https://dsh-plugin.org/plugins/yujunzhixue/dsh-purge) 一键若仍去拉 npm 包名会 404,用上面的 GitHub 归档命令。桌面客户端也可以点按钮(`dsh://` 唤起,下载地址已是 GitHub): +桌面客户端也可以点按钮(`dsh://` 唤起):

- 唤起客户端一键安装 + 唤起客户端一键安装

### 装完都要做这三步 @@ -258,23 +186,19 @@ Web 的控件只动 Web,桌面端的只动桌面应用。不要在一个宿主 -安装 DeepSeek Harness 插件 `dsh-purge`,Web 和官方桌面端都要装。不要全盘搜索,不要读或改其它文件,不要应用设置,也不要重启应用。 - -`dsh` 不在 PATH 就告诉用户后停止。当前目录已是本仓库时,把下面两条里的归档地址都换成 `.`。某个 profile 不存在就跳过那一条,另一条照装。npm 上没有这个包,不要 `pnpm add dsh-purge`。 +安装 DeepSeek Harness 插件 `dsh-purge`,只装到 Web profile。不要全盘搜索,不要读或改其它文件,不要应用设置,也不要重启应用。不要装到桌面 profile。 **Web 端(官方 `dsh web`)** +`dsh` 不在 PATH 就告诉用户后停止。 + ```sh dsh plugin --profile web add https://github.com/YuJunZhiXue/dsh-purge/archive/refs/heads/master.tar.gz ``` -**桌面端(官方 EXE)** +当前目录已是本仓库时改用 `dsh plugin --profile web add .`。没有 npm 包,不要 `pnpm add dsh-purge`。 -```sh -dsh plugin --profile desktop add https://github.com/YuJunZhiXue/dsh-purge/archive/refs/heads/master.tar.gz -``` - -命令结束后,提醒用户:Web 完全退出并重启 `dsh web`;桌面端退出托盘再打开 EXE。各自点会话标题旁的 **dsh-purge**,在「清洗」里点「应用」。然后停止。 +命令结束后,提醒用户:完全退出并重启 `dsh web`,再点会话标题旁的 **dsh-purge**,在「清洗」里点「应用」。然后停止。 @@ -431,7 +355,19 @@ dsh-purge --uninstall ## 目录结构 -`bin/` 是命令行,`lib/` 是补丁和演练台,`presets/redteam/` 是红队预设,`skills/redteam/` 是随包技能,`client.js` 是侧栏。 +`bin/` 是命令行,`lib/` 是补丁和演练台,`presets/redteam/` 是红队预设,`skills/redteam/` 是随包红队技能,`skills/paper-autopilot/` 是随包论文技能,`client.js` 是侧栏。 + +### 随包技能:paper-autopilot + +`skills/paper-autopilot/` 是本包自带的论文全自动流水线(22 步,中文学位论文 / SCI 双模式)。不参与破甲补丁,也不会被自动注入;装不装都不影响红队。 + +```sh +node scripts/install-paper-autopilot.mjs # 装到当前宿主 $DSH_HOME/skills/paper-autopilot +node scripts/install-paper-autopilot.mjs --dry-run # 先看会做什么,不写盘 +node scripts/install-paper-autopilot.mjs --json # 机器可读结果 +``` + +安装只做复制:同名目录已存在先备份为 `paper-autopilot.bak-<时间戳>`,不碰其它技能目录,不改 profile。说「帮我写论文 / 毕业论文」或敲 `/paper` 触发。 运行时文件在 `$DSH_HOME`:`prompt-inject.md`、`rules/`、`skills/`、`net-scope-allow.txt`、`redteam/`。未设 `DSH_HOME` 时,优先用 dsh 安装目录旁边的 `.dsh`,再退回 `~/.dsh`。Web 和桌面端各用自己那一份主目录。Skill 不进注入段,也不顶替提示词。 @@ -459,7 +395,7 @@ purge_status purge_apply purge_revert 设置页「应用」成功后会自动重启,以加载已改的包文件;也可手动点「重启」。补丁标题下有正式版和测试版。测试版跟 `beta` 分支。点「切换到正式版」会装回 master,并清掉钉选。正式版里选旧版本会固定在该版本,要回到最新再点「更新」。旧的测试标签不再列出。 -输入框旁的「回退一次」和「回退上一轮」跟官方 DSH `session.fork({ atSeq })`:撤回已进行的那一轮,新会话接上之前的上下文,旧会话归档,那句回到输入框,再发送会重新注入。聊天里 `/rewind` 同样可用。 +输入框旁的「回退一次」和「回退上一轮」都留在当前这条对话里,不另开分支。已发送的那句会回到输入框,这一轮已经发出的内容和已完成的任务会从当前对话撤掉,改字后**重新发送**即可。从 **1.1.61** 起,多轮对话后回退按**当前这一轮**定位,不会又退到第一条用户消息。聊天里 `/rewind` 同样可用。 **极简 / PTC 与标准不一致时**:同一任务在标准模式能跑、在极简或 PTC 被拦,通常是 preset 里 `run_code` 或 plan 拦截句没洗净,或内置 minimal 缺少 `agent-instructions`。请升到 **1.1.61+**,**完全退出宿主 → 清洗里应用 → 自动重启 → 新开一轮对话** 再试;只换 preset 不重应用,旧进程里的补丁不会更新。 @@ -491,7 +427,7 @@ DSH 会按顺序执行同一批中的 Bash 调用。旧版 dsh-purge 把默认 ### 自己的服务器 -中国大陆、香港、澳门的地址默认禁止。只有事先登记的那一台可以例外。在对话里说「这是我的服务器」不会放行。密钥和密码也不会。 +攻击任务默认全拦。只有靶场能过:本机/内网、已知演练平台,以及事先登记的那一台。在对话里说「这是我的服务器」不会放行。密钥和密码也不会。 这一栏在提示词下面。若侧栏里还没有它,先完全退出 DeepSeek Harness,再重新打开。 @@ -502,7 +438,7 @@ DSH 会按顺序执行同一批中的 Bash 调用。旧版 dsh-purge 把默认 - `my-vps.example.com`:一个完整主机名。保存后,这个主机名当时解析出来的地址也会放行。 - `alice@my-vps.example.com`:账号只用来认出这种写法,不能证明这台机器属于你。 4. 点 **保存名单**。名单写在 `$DSH_HOME/net-scope-allow.txt`。 -5. 密钥、密码、网段和通配符会在保存时丢掉。没有写进名单的大陆、香港、澳门地址仍然禁止。 +5. 密钥、密码、网段和通配符会在保存时丢掉。没有写进名单的公网地址仍然禁止。 上面的 `203.0.113.10` 和 `example.com` 只是写法示例,不是放行地址。把它们换成你自己的那一台再保存。 @@ -619,17 +555,13 @@ flowchart LR ## 更新 -**2026 年 10 月 26 日前:** 这一版的说明和包还在我这个仓库 / [Releases](https://github.com/YuJunZhiXue/dsh-purge/releases)。 - -**10 月 27 日起:** GitHub 上我不再发新包。后续版本只以 [t.me/LLM_PoJia/271](https://t.me/LLM_PoJia/271) 为准。频道里没有的,就不是我发的。 +作者个人频道:[t.me/LLM_PoJia](https://t.me/LLM_PoJia)。有话、有更新会发在那里。GitHub [Releases](https://github.com/YuJunZhiXue/dsh-purge/releases) 仍可下历史包。原版不允许倒卖;二开必须署名。 ## 说明 - 改动范围是本机 `@deepseek-ai/*` 包里的渲染文案、默认策略和执行逻辑,以及用户目录下的覆盖文件与规则集。 - 升级后原文对不上会显示跳过,这次应用仍算完成,不会乱改。 - 不改动非 `@deepseek-ai` 的第三方插件源仓库(启动时的 CMD 无感会**尽力**修补已装的 doctor / market / 梁神 / mnemon,属运行时补丁)。 -- 10 月 26 日前安装还可走 GitHub 归档,不要 npm 包名:`dsh plugin --profile web add https://github.com/YuJunZhiXue/dsh-purge/archive/refs/heads/master.tar.gz`(桌面端把 profile 换成 `desktop`)。当前目录已是本仓库时 `add .`。10 月 27 日之后只认 [频道](https://t.me/LLM_PoJia/271) 里的包。 +- 安装走 GitHub 归档(npm 上没有这个包):`dsh plugin --profile web add https://github.com/YuJunZhiXue/dsh-purge/archive/refs/heads/master.tar.gz`(桌面端把 profile 换成 `desktop`)。当前目录已是本仓库时 `add .`。 --- - -感谢 [LINUX DO](https://linux.do) 社区 \ No newline at end of file diff --git a/bin/dsh-purge.js b/bin/dsh-purge.js old mode 100755 new mode 100644 diff --git a/client.js b/client.js index c9cbb83..228bbc2 100644 --- a/client.js +++ b/client.js @@ -8,7 +8,7 @@ window.__ModuleLoader__.load({ id: "dsh-purge", factory: (require) => { const { useState, useEffect, useCallback, useRef, Component } = react; const name = "dsh-purge"; - const inject = ["slots", "locale"]; + const inject = ["slots", "locale", "uiConversation"]; const NS = "settings.dsh-purge"; let translate = (key) => key; function useT() { @@ -73,7 +73,7 @@ window.__ModuleLoader__.load({ id: "dsh-purge", factory: (require) => { if (isAbortError(e)) throw new Error("timeout"); const msg = String((e && e.message) || e || ""); if (/failed to fetch|networkerror|load failed/i.test(msg)) { - throw new Error("连不上接口,请确认 dsh 还在跑后 Ctrl+F5"); + throw new Error("Cannot reach the API. Make sure dsh is still running, then press Ctrl+F5"); } throw e; } finally { clearTimeout(timer); } @@ -175,7 +175,7 @@ window.__ModuleLoader__.load({ id: "dsh-purge", factory: (require) => { "purge.title": "补丁", "override.title": "提示词", "own.title": "自己的服务器", - "own.hint": "每行一个 IP 或完整主机名。可以写成 账号@主机,账号只用来认出这种写法。主机名会连同它当时解析出的地址一起放行。不要写密钥、密码、网段。", + "own.hint": "攻击任务默认全拦,只放行靶场:本机/内网、已知演练平台,以及这里登记的那一台。公网 IP 和其它域名一个都不过。每行一个 IP 或完整主机名。不要写密钥、密码、网段。", "own.save": "保存名单", "saved.own": "已保存自己的服务器", "saved.own.dropped": "已保存。有 {n} 行不是单个 IP 或主机名,已丢掉", @@ -519,7 +519,7 @@ window.__ModuleLoader__.load({ id: "dsh-purge", factory: (require) => { "purge.title": "Patches", "override.title": "Prompt", "own.title": "Own servers", - "own.hint": "One IP or exact hostname per line. account@host is accepted; the account only identifies that host. A hostname also allows the addresses it resolves to. Do not enter a key, a password, or a range.", + "own.hint": "Attack tasks are denied by default. Only lab targets pass: localhost/private nets, known range platforms, and hosts listed here. Public IPs and other domains are blocked. One IP or exact hostname per line. Do not enter a key, a password, or a range.", "own.save": "Save list", "saved.own": "Own servers saved", "saved.own.dropped": "Saved. {n} lines were not a single IP or hostname and were dropped", @@ -1029,7 +1029,7 @@ body:not([data-ds-dark-theme]) .dshp-auth-ops button.primary{background:var(--ds .dshp-tab-btn:hover{color:var(--dsw-alias-label-primary,currentColor)} .dshp-tab-btn.on{color:var(--dsw-alias-brand-primary,#6dbf8c)} .dshp-tab-btn.on:after{content:"";position:absolute;left:0;right:0;bottom:-1px;height:2px;border-radius:2px;background:var(--dsw-alias-brand-primary,#6dbf8c)} -/* 玻璃跟随宿主颜色。字重和底的不透明度分开:壳透,字坐在更实的一层上。 */ +/* Glass follows the host color. Weight and background opacity are kept separate: the shell is translucent, the text sits on a more solid layer. */ .dshp-dock{font-family:"Segoe UI","Microsoft YaHei UI","PingFang SC","Noto Sans SC",system-ui,sans-serif;font-size:14px;line-height:1.6;font-weight:500;-webkit-font-smoothing:antialiased;text-shadow:none} .dshp-dock[data-theme="white"],.dshp-dock[data-theme="dusk"]{background:linear-gradient(165deg,color-mix(in srgb,var(--dsw-alias-bg-layer-1,#fff) 50%,transparent),color-mix(in srgb,var(--dsw-alias-brand-primary,#6d8f78) 18%,transparent) 46%,color-mix(in srgb,var(--dsw-alias-bg-layer-2,#fff) 28%,transparent))!important;backdrop-filter:blur(26px) saturate(1.45)!important;-webkit-backdrop-filter:blur(26px) saturate(1.45)!important;color:var(--dshp-ink)!important;border:1px solid color-mix(in srgb,var(--dsw-alias-brand-primary,#6d8f78) 36%,transparent)!important;box-shadow:inset 0 1px 0 color-mix(in srgb,#fff 42%,transparent),0 18px 44px color-mix(in srgb,#000 18%,transparent)!important} .dshp-dock[data-theme="dusk"]{--dshp-ink:var(--dsw-alias-label-primary,#f4f1ea);--dshp-mute:color-mix(in srgb,var(--dsw-alias-label-primary,#f4f1ea) 84%,var(--dsw-alias-label-secondary,#c9c3b8))} @@ -1104,13 +1104,25 @@ body:not([data-ds-dark-theme]) .dshp-auth-ops button.primary{background:var(--ds } const LAYER_GROUP = { - "提示词": "prompt", - "代码": "code", - "工具": "tools", - "0.1.5 兼容": "compat", - "0.2.0 兼容": "dsh20", + "Prompt": "prompt", + "Code": "code", + "Tools": "tools", + "0.1.5 compat": "compat", + "0.2.0 compat": "dsh20", }; const GROUP_ORDER = ["prompt", "code", "tools", "compat", "dsh20"]; + /* The host may report patch layer names in the host locale. The zh dictionary + * still keeps those labels, so map them at runtime instead of hardcoding CJK + * literals in this file. */ + for (const key of GROUP_ORDER) { + const label = zh["group." + key]; + if (label && !LAYER_GROUP[label]) LAYER_GROUP[label] = key; + } + function layerGroupOf(layer) { + if (LAYER_GROUP[layer]) return LAYER_GROUP[layer]; + /* zh labels the 0.2.0 layer as "0.2.0" while the host may append a suffix. */ + return String(layer || "").startsWith(zh["group.dsh20"]) ? "dsh20" : "code"; + } function patchRowsOf(state) { if (!state || !state.ai_base) return []; @@ -1169,7 +1181,7 @@ body:not([data-ds-dark-theme]) .dshp-auth-ops button.primary{background:var(--ds if (!located) return null; const grouped = new Map(); for (const row of patchRowsOf(state)) { - const key = LAYER_GROUP[row.layer] || "code"; + const key = layerGroupOf(row.layer); if (!grouped.has(key)) grouped.set(key, []); grouped.get(key).push(row); } @@ -3134,7 +3146,7 @@ body[data-ds-dark-theme] .dshp-rewind-item span{color:var(--dsw-alias-label-tert } else if (typeof sessions?.open === "function") { sessions.open(sessionId); } else { - throw new Error("无法打开回退后的会话"); + throw new Error("Cannot open the rewound session"); } const selected = workspace?.selection?.getSnapshot?.()?.sessionId; if (!workspace || selected === sessionId) { @@ -3148,7 +3160,7 @@ body[data-ds-dark-theme] .dshp-rewind-item span{color:var(--dsw-alias-label-tert } await waitMs(120); } - throw new Error((lastError && lastError.message) || "回退后的会话没有打开"); + throw new Error((lastError && lastError.message) || "The rewound session did not open"); } class RewindSafe extends Component { @@ -3170,7 +3182,7 @@ body[data-ds-dark-theme] .dshp-rewind-item span{color:var(--dsw-alias-label-tert return h("button", { type: "button", className: "dshp-continue", - title: rewindText(translate, "continue.label", "继续"), + title: rewindText(translate, "continue.label", "Continue"), onMouseDown: (e) => e.preventDefault(), onClick: async () => { const sessionId = currentSessionId(rewindSessions); @@ -3183,10 +3195,10 @@ body[data-ds-dark-theme] .dshp-rewind-item span{color:var(--dsw-alias-label-tert }); if (!data || !data.ok) throw new Error((data && data.error) || "continue"); } catch (e) { - window.alert(rewindText(translate, "continue.fail", "继续失败: {error}").replace("{error}", String((e && e.message) || e))); + window.alert(rewindText(translate, "continue.fail", "Continue failed: {error}").replace("{error}", String((e && e.message) || e))); } }, - }, rewindText(translate, "continue.label", "继续")); + }, rewindText(translate, "continue.label", "Continue")); } return h(ContinueButton, this.props); } @@ -3234,26 +3246,26 @@ body[data-ds-dark-theme] .dshp-rewind-item span{color:var(--dsw-alias-label-tert if (!data || !data.ok) throw new Error((data && data.error) || "continue"); setInfo((prev) => prev ? { ...prev, ...data, canContinue: false, continueUsed: data.used } : data); } catch (e) { - setNotice(rewindText(t, "continue.fail", "继续失败: {error}").replace("{error}", String((e && e.message) || e))); + setNotice(rewindText(t, "continue.fail", "Continue failed: {error}").replace("{error}", String((e && e.message) || e))); } finally { setBusy(false); } }; const label = busy - ? rewindText(t, "continue.busy", "继续中…") - : rewindText(t, "continue.label", "继续"); + ? rewindText(t, "continue.busy", "Continuing…") + : rewindText(t, "continue.label", "Continue"); const title = notice || (canContinue - ? rewindText(t, "continue.ready", "继续(还可 {left} 次)").replace("{left}", String(left)) + ? rewindText(t, "continue.ready", "Continue ({left} left)").replace("{left}", String(left)) : (info && info.reason && left <= 0 - ? rewindText(t, "continue.limit", "已达继续上限") - : rewindText(t, "continue.aria", "异常停止后继续"))); + ? rewindText(t, "continue.limit", "Continue limit reached") + : rewindText(t, "continue.aria", "Continue after an abnormal stop"))); return h("button", { type: "button", className: "dshp-continue" + (canContinue ? " is-ready" : ""), title, - "aria-label": rewindText(t, "continue.aria", "异常停止后继续"), + "aria-label": rewindText(t, "continue.aria", "Continue after an abnormal stop"), disabled: busy || !sessionId || !canContinue, onMouseDown: (e) => e.preventDefault(), onClick: (e) => { @@ -3282,8 +3294,8 @@ body[data-ds-dark-theme] .dshp-rewind-item span{color:var(--dsw-alias-label-tert onMouseDown: (e) => { e.preventDefault(); e.stopPropagation(); }, onClick: (e) => { e.preventDefault(); e.stopPropagation(); runRewind("once"); }, }, - h("b", null, rewindText(t, "rewind.once", "回退上一步")), - h("span", null, rewindText(t, "rewind.once.hint", "撤回最后一步已进行的对话,新会话接上之前的上下文;那句回到输入框再发送")), + h("b", null, rewindText(t, "rewind.once", "Undo last step")), + h("span", null, rewindText(t, "rewind.once.hint", "Withdraw the last step into a new session that keeps earlier context; the line returns to the box")), ), h("button", { type: "button", @@ -3291,8 +3303,8 @@ body[data-ds-dark-theme] .dshp-rewind-item span{color:var(--dsw-alias-label-tert onMouseDown: (e) => { e.preventDefault(); e.stopPropagation(); }, onClick: (e) => { e.preventDefault(); e.stopPropagation(); runRewind("round"); }, }, - h("b", null, rewindText(t, "rewind.round", "回退上一轮")), - h("span", null, rewindText(t, "rewind.round.hint", "撤回上一整轮(含子代理)已进行的对话,新会话接上之前的上下文;那句回到输入框再发送")), + h("b", null, rewindText(t, "rewind.round", "Undo last turn")), + h("span", null, rewindText(t, "rewind.round.hint", "Withdraw the last turn (and its subagents) into a new session that keeps earlier context; the line returns to the box")), ), ); try { @@ -3332,7 +3344,7 @@ body[data-ds-dark-theme] .dshp-rewind-item span{color:var(--dsw-alias-label-tert body: JSON.stringify({ sessionId, mode }), }).then(async (data) => { if (!data || !data.ok || !data.sessionId || data.cleared === false) { - throw new Error((data && data.error) || "没有清掉之前发送的内容"); + throw new Error((data && data.error) || "The previously sent content was not cleared"); } if (data.at) rewindSeenAt = data.at; const text = isPluginDraft(data.text) ? "" : (data.text || ""); @@ -3343,7 +3355,7 @@ body[data-ds-dark-theme] .dshp-rewind-item span{color:var(--dsw-alias-label-tert }).catch((e) => { this.setState({ busy: false, - notice: "回退失败: " + String((e && e.message) || e), + notice: "Undo failed: " + String((e && e.message) || e), }); }); } @@ -3358,7 +3370,7 @@ body[data-ds-dark-theme] .dshp-rewind-item span{color:var(--dsw-alias-label-tert render() { const sessionId = this.props.sessionId || currentSessionId(rewindSessions); const t = this.props.t || translate; - const label = this.state.busy ? "回退中…" : (this.state.notice ? this.state.notice.slice(0, 18) : "回退"); + const label = this.state.busy ? "Undoing…" : (this.state.notice ? this.state.notice.slice(0, 18) : "Undo"); return h("div", { className: "dshp-rewind-wrap", ref: (node) => { this.wrap = node; } }, h("style", null, REWIND_CSS), h("button", { @@ -3418,7 +3430,7 @@ body[data-ds-dark-theme] .dshp-rewind-item span{color:var(--dsw-alias-label-tert body: JSON.stringify({ sessionId, mode }), }); if (!data || !data.ok || !data.sessionId || data.cleared === false) { - throw new Error((data && data.error) || "没有清掉之前发送的内容"); + throw new Error((data && data.error) || "The previously sent content was not cleared"); } if (data.at) rewindSeenAt = data.at; const text = isPluginDraft(data.text) ? "" : (data.text || ""); @@ -3426,7 +3438,7 @@ body[data-ds-dark-theme] .dshp-rewind-item span{color:var(--dsw-alias-label-tert await openRewoundSession(sessions, data.sessionId); scheduleComposerFill(data.sessionId, text); } catch (e) { - const message = rewindText(t, "rewind.fail", "回退失败: {error}").replace("{error}", String((e && e.message) || e)); + const message = rewindText(t, "rewind.fail", "Undo failed: {error}").replace("{error}", String((e && e.message) || e)); setNotice(message); } finally { setBusy(false); @@ -3456,16 +3468,16 @@ body[data-ds-dark-theme] .dshp-rewind-item span{color:var(--dsw-alias-label-tert ? (notice.length > 18 ? notice.slice(0, 18) + "…" : notice) : ""; const label = busy - ? rewindText(t, "rewind.busy", "回退中…") - : (failLabel || rewindText(t, "rewind.label", "回退")); - const title = notice || rewindText(t, "rewind.aria", "回退"); + ? rewindText(t, "rewind.busy", "Undoing…") + : (failLabel || rewindText(t, "rewind.label", "Undo")); + const title = notice || rewindText(t, "rewind.aria", "Undo"); return h("div", { className: "dshp-rewind-wrap", ref: wrapRef }, h("style", null, REWIND_CSS), h("button", { type: "button", className: "dshp-rewind", title, - "aria-label": rewindText(t, "rewind.aria", "回退"), + "aria-label": rewindText(t, "rewind.aria", "Undo"), "aria-expanded": menu ? "true" : "false", disabled: busy || !sessionId, onMouseDown: (e) => e.preventDefault(), @@ -4069,20 +4081,7 @@ body[data-ds-dark-theme] .dshp-rewind-item span{color:var(--dsw-alias-label-tert method: 'POST', headers: { 'content-type': 'application/json' }, body: JSON.stringify(req), - }).then(async (res) => { - const text = await res.text().catch(() => '') - let data = null - try { data = text ? JSON.parse(text) : null } catch { - return { ok: false, error: res.status + ' non-json: ' + String(text).slice(0, 120) } - } - if (!res.ok) { - return Object.assign({}, data || {}, { - ok: false, - error: (data && (data.error || data.message)) || (res.status + ' ' + res.statusText), - }) - } - return data - }) + }).then((res) => res.json()) let ui = { open: true, tab: 'assets' } const subs = new Set() @@ -4109,17 +4108,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: '远程命令执行', deserialization: '反序列化', 'file-upload': '文件上传 getshell', - sqli: 'SQL 注入', unauthorized: '未授权访问', 'auth-bypass': '认证绕过 / 越权', - 'weak-password': '弱口令 / 爆破', ssrf: 'SSRF', xxe: 'XXE', - 'path-traversal': '目录穿越 / 任意文件读', 'info-leak': '信息泄露', - privesc: '提权 / 横向', tunnel: '隧道 / 代理', other: '其它', + 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", } const POC_CAT_ORDER = Object.keys(POC_CAT_NAME) /* 角色 code → 中文(报告/知识库都要标"谁发现的") */ const ROLE_LABEL = { - plan: '主会话(指挥)', recon: '信息收集', assess: '资产梳理', - 'vuln-scan': '漏洞发现', exploit: '漏洞利用', internal: '内网渗透', + plan: "Main session (command)", recon: "Recon", assess: "Asset inventory", + 'vuln-scan': "Vulnerability discovery", exploit: "Exploitation", internal: "Internal pentest", } const fmt = (s) => (s ? String(s).replace('T', ' ').slice(0, 16) : '—') @@ -4139,7 +4138,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: '现场截图', card: '记录生成的证据摘录' } + const SHOT_KIND = { screenshot: "Live screenshot", card: "Evidence excerpt from records" } const ShotImage = ({ eng, shot, height }) => { const [zoom, setZoom] = React.useState(false) const src = shotSrc(eng, shot.id) @@ -4147,25 +4146,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' } }, '载入中…') + ? h('div', { className: 'rt-shot-thumb rt-shot-loading', style: { height: (height || 96) + 'px' } }, "Loading…") : h('img', { - className: 'rt-shot-thumb', src: src, alt: shot.label || ('证据 ' + shot.id), + className: 'rt-shot-thumb', src: src, alt: shot.label || ("Evidence " + 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 - ? '由当日记录生成的证据摘录,不是现场截图 —— 报告里同样会标注' - : '现场截图' }, SHOT_KIND[shot.kind] || shot.kind || '证据'), + ? "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"), 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 ? ' · 由当日记录生成(非现场截图)' : '') - + (shot.captured_at ? ' · ' + fmt(shot.captured_at) : '') - + ' · 点击任意处关闭')) + + (card ? " · Generated from records (not a live screenshot)" : '') + + (shot.captured_at ? " · " + fmt(shot.captured_at) : '') + + " · Click anywhere to close")) : null) } const ShotStrip = ({ eng, shots, total, title }) => { @@ -4173,9 +4172,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 || '证据截图'), - h('span', { className: 'rt-shots-n' }, '显示 ' + list.length + ' 张' - + (total && total > list.length ? '(该得分点共 ' + total + ' 张,取代表图)' : ''))), + 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('div', { className: 'rt-shot-row' }, list.map((sh) => h(ShotImage, { key: 'sh' + sh.id, eng: eng, shot: sh })))) } /** 发现时间在列表里只留「月-日 时:分」:整行宽度紧张,完整时间进悬浮提示 */ @@ -4183,7 +4182,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' ? '被动' : p === 'active' ? '主动' : '未知') + const provLabel = (p) => (p === 'passive' ? "Passive" : p === 'active' ? "Active" : "Unknown") /** * 给「可点击但不是