Feature: add build_client MCP tool and improve build dialog linkage

Add a service-local MCP tool, build_client, that patches a client template
with this master's connect settings and writes the binary on the server.
It covers ghost/TestRun/ServerDll/TinyRun plus Linux, macOS and Android,
reusing the same byte path as CBuildDlg::OnBnClickedOk (CONNECT_ADDRESS
overwrite, build-date check, embedded TLS anchor before UPX/padding).
ShellCode AES and payload impersonation stay dialog-only.

The tool is gated by a new McpBuild switch (default 0) and McpReadonly=0.
It refuses to overwrite an existing file unless overwrite=true, protects
the server binaries/settings.ini/upx.exe, validates names strictly and
uses a unique UPX temp file so it cannot race the dialog. Results report
the path, size, target, TLS-anchor status and follow-up tips.

In the build dialog, Linux/macOS/Android targets now also grey out the
install-location combo/label and run mode, save and restore the Windows
compress choice, hide payload/download rows, grey the random-name and
run-as-admin menu items, and fix the TLS-anchor label for posix targets.
OnBnClickedOk is untouched; generated output is unchanged for every target.

New UI strings were added to the en_US, zh_TW and de_DE language packs.
McpBuild is off by default and changes require a server restart.
Verified on a Debug x64 instance: MCP generation for Linux is patched
correctly, Android and ghost anchor/error paths behave, and dialog-driven
Linux/TestRun/SC_AES generation still succeeds. mcp/tools.json regenerated
(55 tools); check_platform_table.py passes.

Co-Authored-By: deepseek-flash
This commit is contained in:
yuanyuanxianganddeepseek-flash committed 2026-11-15 20:43:28 +01:00
1 parent 1401ff0a4c
commit 7172ab376d
20 files changed
+1619 -36

No files matched your search

+3
View File
@@ -2058,6 +2058,8 @@ MCPԶ
远程交谈开关的改动需重启程序生效。=Aenderungen am Fernchat-Schalter werden nach einem Neustart wirksam.
启用键盘记录(AI 采集击键)=Keylogger aktivieren (KI-Tastenaufzeichnung)
键盘记录开关的改动需重启程序生效。=Aenderungen am Keylogger-Schalter werden erst nach einem Neustart wirksam.
启用客户端生成(AI 生成客户端文件,要求只读关)=Client-Erstellung aktivieren (KI erzeugt Clientdateien; Nur-Lesen aus)
客户端生成开关的改动需重启程序生效;它还会写出带主控凭据的客户端文件,请谨慎开启。=Aenderungen am Client-Erstellungs-Schalter werden nach einem Neustart wirksam; er schreibt Clientdateien mit Master-Anmeldedaten, daher bitte vorsichtig aktivieren.
主机管理的写操作需只读模式关闭;冻结/解冻进程、停止/重启服务还需启用危险主机操作。=Schreiboperationen der Maschinenverwaltung erfordern deaktivierten Nur-Lesen-Modus; Einfrieren/Auftauen von Prozessen und Stoppen/Neustarten von Diensten erfordern zusaetzlich gefaehrliche Maschinenoperationen.
第 %d 个钱包地址不合法!=Wallet-Adresse #%d ist ungueltig!
%d 新连接\r\n=%d Neue Verbindung\r\n
@@ -2225,6 +2227,7 @@ HTTPS
内嵌TLS信任锚(首连即加密)=TLS-Vertrauensanker einbetten (TLS von Anfang an)
内嵌TLS信任锚(锚在ServerDll.dll里)=TLS-Vertrauensanker einbetten (in ServerDll.dll)
内嵌TLS信任锚(该目标不含客户端)=TLS-Vertrauensanker einbetten (Ziel ohne Client)
内嵌TLS信任锚(仅Windows客户端模板支持)=TLS-Vertrauensanker einbetten (nur Windows-Clientvorlagen)
内嵌TLS信任锚(该协议不走TLS)=TLS-Vertrauensanker einbetten (Protokoll ohne TLS)
内嵌TLS信任锚(服务端未启用TLS)=TLS-Vertrauensanker einbetten (Server-TLS aus)
内嵌 TLS 信任锚失败,已取消生成:=TLS-Vertrauensanker konnte nicht eingebettet werden, Generierung abgebrochen:
+3
View File
@@ -2059,6 +2059,8 @@ MCPԶ
远程交谈开关的改动需重启程序生效。=Changes to the remote chat switch take effect after restart.
启用键盘记录(AI 采集击键)=Enable keylogger (AI keystroke capture)
键盘记录开关的改动需重启程序生效。=Changes to the keylogger switch take effect after restart.
启用客户端生成(AI 生成客户端文件,要求只读关)=Enable client build (AI generates client files; requires read-only mode off)
客户端生成开关的改动需重启程序生效;它还会写出带主控凭据的客户端文件,请谨慎开启。=Changes to the client build switch take effect after restart; it also writes client files containing master credentials, so enable it with care.
启用 HTTPS(本端口同时接受 TLS 连接)=Enable HTTPS (this port also accepts TLS connections)
HTTPS 开关与证书路径的改动需重启程序生效。=Changes to the HTTPS switch and certificate paths take effect after restart.
证书或私钥文件不存在,请检查路径。=Certificate or private key file not found; check the path.
@@ -2237,6 +2239,7 @@ MCP:
内嵌TLS信任锚(首连即加密)=Embed TLS trust anchor (TLS on first connect)
内嵌TLS信任锚(锚在ServerDll.dll里)=Embed TLS trust anchor (use ServerDll.dll)
内嵌TLS信任锚(该目标不含客户端)=Embed TLS trust anchor (no client code here)
内嵌TLS信任锚(仅Windows客户端模板支持)=Embed TLS trust anchor (Windows client templates only)
内嵌TLS信任锚(该协议不走TLS)=Embed TLS trust anchor (protocol is not TLS)
内嵌TLS信任锚(服务端未启用TLS)=Embed TLS trust anchor (server TLS is off)
内嵌 TLS 信任锚失败,已取消生成:=Failed to embed the TLS trust anchor, generation cancelled:
+3
View File
@@ -2052,6 +2052,8 @@ MCPԶ
远程交谈开关的改动需重启程序生效。=遠端交談開關的變更需重新啟動程式後生效。
启用键盘记录(AI 采集击键)=啟用鍵盤記錄(AI 擷取按鍵)
键盘记录开关的改动需重启程序生效。=鍵盤記錄開關的改動需重新啟動程式方可生效。
启用客户端生成(AI 生成客户端文件,要求只读关)=啟用客戶端生成(AI 生成客戶端檔案,要求唯讀關閉)
客户端生成开关的改动需重启程序生效;它还会写出带主控凭据的客户端文件,请谨慎开启。=客戶端生成開關的變更需重新啟動程式生效;它還會寫出帶主控憑證的客戶端檔案,請謹慎開啟。
启用 HTTPS(本端口同时接受 TLS 连接)=啟用 HTTPS(本連接埠同時接受 TLS 連線)
HTTPS 开关与证书路径的改动需重启程序生效。=HTTPS 開關與憑證路徑的改動需重啟程式生效。
证书或私钥文件不存在,请检查路径。=憑證或私鑰檔案不存在,請檢查路徑。
@@ -2230,6 +2232,7 @@ MCP:
内嵌TLS信任锚(首连即加密)=內嵌TLS信任錨(首連即加密)
内嵌TLS信任锚(锚在ServerDll.dll里)=內嵌TLS信任錨(錨在ServerDll.dll裡)
内嵌TLS信任锚(该目标不含客户端)=內嵌TLS信任錨(該目標不含客戶端)
内嵌TLS信任锚(仅Windows客户端模板支持)=內嵌TLS信任錨(僅Windows客戶端模板支援)
内嵌TLS信任锚(该协议不走TLS)=內嵌TLS信任錨(該協議不走TLS)
内嵌TLS信任锚(服务端未启用TLS)=內嵌TLS信任錨(服務端未啟用TLS)
内嵌 TLS 信任锚失败,已取消生成:=內嵌 TLS 信任錨失敗,已取消生成: