Author SHA1 Message Date
admin 7515565660 feat(i18n): 界面文案「加壳/加固」统一改为「云端加密」(中英双语 + 路由标题 + 后端提示) 2026-11-23 19:26:50 +08:00
admin 24e3f7b811 merge feat/doglic:自签授权验签 + 双重加壳兼容 + 壳源码入库
Docker Build / Build and Push Docker Image (push) Successful in 31s
Docker Build / Deploy to Server (push) Successful in 3s
2026-11-23 19:18:32 +08:00
admin 77e59f021c feat(protect): 加 cmd/packthemed,按 shell_theme 出各套验证界面产物(拍照/回归用) 2026-11-23 19:16:56 +08:00
11 changed files with 80 additions and 41 deletions
+39
View File
@@ -0,0 +1,39 @@
// 按主题打壳:packtest 固定用 classic 壳,这个工具多了 theme 参数,用来出各套验证界面
// 用法: packthemed <src.exe> <out.exe> <cfg.json> <theme>
package main
import (
"fmt"
"os"
"path/filepath"
"verification-platform-backend/internal/protect"
)
func main() {
if len(os.Args) != 5 {
fmt.Fprintln(os.Stderr, "用法: packthemed <src.exe> <out.exe> <cfg.json> <theme>")
os.Exit(2)
}
src, err := os.ReadFile(os.Args[1])
must(err)
cfg, err := os.ReadFile(os.Args[3])
must(err)
arch, err := protect.DetectArch(src)
must(err)
theme := protect.NormalizeTheme(os.Args[4])
out, info, err := protect.PatchSignedThemed(src, cfg, arch, false, theme)
must(err)
must(os.WriteFile(os.Args[2], out, 0o644))
fmt.Printf("%-10s 架构=%s 产物=%s %d 字节 .vfy size=%d\n",
theme, arch, filepath.Base(os.Args[2]), info.OutSize, info.SecSize)
}
func must(err error) {
if err != nil {
fmt.Fprintln(os.Stderr, "error:", err)
os.Exit(1)
}
}
+1 -1
View File
@@ -335,7 +335,7 @@ func ParsePFX(data []byte, password string) (PFXInfo, error) {
case info.KeyCount == 1 && info.CertCount > 1:
info.Note = fmt.Sprintf("含 %d 张证书(1 套私钥 + %d 张链上证书),签名会带完整证书链", info.CertCount, info.LooseCerts)
case info.KeyCount > 1:
info.Note = fmt.Sprintf("含 %d 套可签名身份(私钥 %d 把),加壳时可任选其中一套",
info.Note = fmt.Sprintf("含 %d 套可签名身份(私钥 %d 把),云端加密时可任选其中一套",
len(matched), info.KeyCount)
}
return info, nil
+1 -1
View File
@@ -404,7 +404,7 @@ func (r *Runner) RunWithTask(task *model.ProtectTask, srcPath, outPath string, c
// 内核驱动(.sys / 子系统 NATIVE):绝不能塞用户态验证壳,注进去驱动直接加载失败。
// 驱动要的是 Authenticode 签名,所以这里只签名、不注入。
if task.SignProfileID == nil {
return info, fmt.Errorf("内核驱动只能签名、不能加壳;请选择一张支持驱动签名用途的证书")
return info, fmt.Errorf("内核驱动只能签名、不能加密;请选择一张支持驱动签名用途的证书")
}
mat, merr := LoadMaterial(*task.SignProfileID, task.CertIdentity)
if merr != nil {
+1 -1
View File
@@ -32,7 +32,7 @@ type PublishOptions struct {
func PublishAsVersion(taskID uint, opts PublishOptions) (*model.Version, error) {
var task model.ProtectTask
if err := database.DB.First(&task, taskID).Error; err != nil {
return nil, fmt.Errorf("加壳任务不存在")
return nil, fmt.Errorf("云端加密任务不存在")
}
if task.Status != "done" || task.OutputPath == "" {
return nil, fmt.Errorf("任务尚未完成,无法生成版本")
+1 -1
View File
@@ -34,7 +34,7 @@ func createTask(app *model.Application, userID uint, srcName string, data []byte
return nil, "", err
}
if det.Kind == KindPE && HasVfy(data) {
return nil, "", fmt.Errorf("这个文件已经是加壳后的产物(带 .vfy 节),请上传未加壳的原始程序")
return nil, "", fmt.Errorf("这个文件已经是云端加密后的产物(带 .vfy 节),请上传未加密的原始程序")
}
// 签名证书必须在建任务时就落库:execute 是 go 协程,事后 UPDATE 有窗口
// 被它读到 NULL,导致证书被静默忽略(任务照样成功,只是没重签)。
@@ -200,7 +200,7 @@ func HandleCreateSignProfile(c *gin.Context) {
msg := "证书已加密保存"
if pfx.KeyCount > 1 {
msg = fmt.Sprintf("证书已保存:文件里含 %d 套可签名身份,加壳时可任选其中一套", pfx.KeyCount)
msg = fmt.Sprintf("证书已保存:文件里含 %d 套可签名身份,云端加密时可任选其中一套", pfx.KeyCount)
}
response.SuccessWithMessage(c, msg, gin.H{
"id": made.ID,
+3 -3
View File
@@ -58,7 +58,7 @@ const statusFilter = ref<string>('')
// 按文件类型决定需要哪种证书:PE→windows,IPA→ios,APK/ELF 不吃证书
const fileKind = computed(() => {
const n = (chosenFile.value?.name || '').toLowerCase()
// 内核驱动:.sys 只能签名、不能加壳(用户态壳注进内核模块会直接加载失败)
// 内核驱动:.sys 只能签名、不能加密(用户态壳注进内核模块会直接加载失败)
if (n.endsWith('.sys')) return 'driver'
if (n.endsWith('.exe') || n.endsWith('.dll')) return 'pe'
if (n.endsWith('.ipa')) return 'ipa'
@@ -247,7 +247,7 @@ function schedulePoll() {
function pickFile(file: File | null | undefined) {
if (!file)
return
// 驱动 .sys 也走这条路(驱动只签名、不加壳)
// 驱动 .sys 也走这条路(驱动只签名、不加密)
if (!/\.(exe|dll|sys|efi|apk|ipa)$/i.test(file.name)) {
toast.error(t('admin.protect.onlyExe'))
return
@@ -535,7 +535,7 @@ onBeforeUnmount(() => {
{{ certOptionsForFile.length ? t('admin.protect.signProfileHint') : t('admin.protect.signProfileEmpty') }}
</p>
<!-- 验证界面皮肤:加壳时选择,产物里的壳按此渲染 -->
<!-- 验证界面皮肤:云端加密时选择,产物里的壳按此渲染 -->
<div class="flex flex-col gap-3 sm:flex-row sm:items-center">
<UiLabel class="shrink-0 text-sm font-medium">
{{ t('admin.protect.themeLabel') }}
+1 -1
View File
@@ -437,7 +437,7 @@ onMounted(() => {
</div>
<div v-else class="space-y-6">
<!-- 加壳来源提示 -->
<!-- 云端加密来源提示 -->
<div
v-if="protectInfo.protected"
class="flex flex-wrap items-center gap-3 rounded-lg border border-emerald-500/30 bg-emerald-500/5 px-4 py-3 text-sm"
+14 -14
View File
@@ -1550,13 +1550,13 @@
"fetchFailed": "Failed to fetch version information",
"fetchAppsFailed": "Failed to fetch application list"
},
"protectedBadge": "Protected",
"protectedHint": "This version is a protected artifact with the verification shell",
"protectedBanner": "This version was generated by the protect tool",
"protectedBadge": "Encrypted",
"protectedHint": "This version is a cloud-encrypted artifact with the verification shell",
"protectedBanner": "This version was generated by cloud encryption",
"derivedFrom": "derived from",
"sourceUnknown": "source version removed",
"viewProtectTask": "View protect task #{id}",
"sourceDirect": "uploaded & protected"
"viewProtectTask": "View cloud-encryption task #{id}",
"sourceDirect": "uploaded & cloud-encrypted"
},
"cardTypes": {
"title": "Card Type Management",
@@ -2577,7 +2577,7 @@
}
},
"protect": {
"title": "Protection",
"title": "Cloud Encryption",
"description": "Inject a verification shell into your program: entry rewrite + in-memory DLL + dual CRC32, single-file output",
"totalTasks": "Total tasks",
"inProgress": "In progress",
@@ -2591,11 +2591,11 @@
"tooLarge": "File too large (max 200MB)",
"pickApp": "Choose an application first",
"pickFile": "Choose a program first",
"queued": "Submitted, protecting…",
"queued": "Submitted, encrypting…",
"uploading": "Uploading",
"start": "Start",
"clear": "Clear",
"tasks": "Protection tasks",
"tasks": "Cloud Encryption tasks",
"source": "Source / output",
"arch": "Arch",
"status": "Status",
@@ -2604,10 +2604,10 @@
"download": "Download",
"refresh": "Refresh",
"loading": "Loading…",
"empty": "No protection tasks yet",
"empty": "No cloud-encryption tasks yet",
"allStatus": "All status",
"statusPending": "Queued",
"statusRunning": "Protecting",
"statusRunning": "Encrypting",
"statusDone": "Completed",
"statusFailed": "Failed",
"busy": "Task is running, try later",
@@ -2616,7 +2616,7 @@
"loadFailed": "Failed to load tasks",
"loadAppsFailed": "Failed to load applications",
"makeVersion": "Create version",
"makeVersionHint": "Write the protected artifact as a new version record: clients decide updates by increasing version-record id, so replacing an already-published file in place never propagates.",
"makeVersionHint": "Write the cloud-encrypted artifact as a new version record: clients decide updates by increasing version-record id, so replacing an already-published file in place never propagates.",
"versionLabel": "Version",
"versionPlaceholder": "Leave empty to auto-bump the source version",
"strategy": "Update strategy",
@@ -2673,7 +2673,7 @@
},
"signProfiles": {
"title": "Signing certificates",
"description": "Upload Windows pfx / iOS p12+provision; protected artifacts are re-signed with them. Certs and passwords are encrypted at rest and never sent back",
"description": "Upload Windows pfx / iOS p12+provision; cloud-encrypted artifacts are re-signed with them. Certs and passwords are encrypted at rest and never sent back",
"uploadTitle": "Upload certificate",
"uploadHint": "Windows uses .pfx/.p12; iOS needs both .p12 and .mobileprovision",
"platform": "Platform",
@@ -2717,7 +2717,7 @@
"expired": "Expired",
"daysLeft": "days left",
"colCerts": "Certificates",
"uploadedSplit": "Parsed {n} identities from this file; {n} records created. Pick any one when protecting.",
"uploadedSplit": "Parsed {n} identities from this file; {n} records created. Pick any one when cloud-encrypting.",
"colSubject": "Certificate name (CN)",
"identities": "Identities",
"identitiesTitle": "Certificate identities",
@@ -3415,7 +3415,7 @@
"storage": "Storage",
"admin": "Admin",
"agent": "Agent",
"protect": "Protection",
"protect": "Cloud Encryption",
"signProfiles": "Certificates"
},
"footer": {
+17 -17
View File
@@ -1546,13 +1546,13 @@
"fetchFailed": "获取版本信息失败",
"fetchAppsFailed": "获取应用列表失败"
},
"protectedBadge": "已加固",
"protectedHint": "此版本是加壳产物,入口文件带验证壳",
"protectedBanner": "此版本由加壳工具生成",
"protectedBadge": "已加密",
"protectedHint": "此版本是云端加密产物,入口文件带验证壳",
"protectedBanner": "此版本由云端加密服务生成",
"derivedFrom": "派生自",
"sourceUnknown": "来源版本已删除",
"viewProtectTask": "查看加壳任务 #{id}",
"sourceDirect": "直接上传加壳"
"viewProtectTask": "查看云端加密任务 #{id}",
"sourceDirect": "直接上传云端加密"
},
"cardTypes": {
"title": "卡类管理",
@@ -2596,7 +2596,7 @@
}
},
"protect": {
"title": "加壳加固",
"title": "云端加密",
"description": "给程序注入验证壳:改入口 + 内存加载壳 DLL + 双层 CRC32,产物单文件、免安装依赖",
"totalTasks": "任务总数",
"inProgress": "进行中",
@@ -2609,12 +2609,12 @@
"onlyExe": "支持 .exe / .dll / .apk / .ipa / Linux ELF",
"tooLarge": "文件过大(上限 200MB)",
"pickApp": "请先选择应用",
"pickFile": "请先选择要加壳的程序",
"queued": "已提交,正在加壳",
"pickFile": "请先选择要加密的程序",
"queued": "已提交,正在云端加密",
"uploading": "上传中",
"start": "开始加壳",
"start": "开始云端加密",
"clear": "清除",
"tasks": "加壳任务",
"tasks": "云端加密任务",
"source": "源文件 / 产物",
"arch": "架构",
"status": "状态",
@@ -2623,10 +2623,10 @@
"download": "下载",
"refresh": "刷新",
"loading": "加载中…",
"empty": "还没有加壳任务",
"empty": "还没有云端加密任务",
"allStatus": "全部状态",
"statusPending": "排队中",
"statusRunning": "加壳中",
"statusRunning": "加密中",
"statusDone": "已完成",
"statusFailed": "失败",
"busy": "任务执行中,稍后再删",
@@ -2635,7 +2635,7 @@
"loadFailed": "加载任务失败",
"loadAppsFailed": "加载应用失败",
"makeVersion": "生成版本",
"makeVersionHint": "把加壳产物写成一条新的版本记录:客户端按版本记录 ID 递增判定更新,原地换包推不下去。其余资源文件沿用来源版本。",
"makeVersionHint": "把云端加密产物写成一条新的版本记录:客户端按版本记录 ID 递增判定更新,原地换包推不下去。其余资源文件沿用来源版本。",
"versionLabel": "版本号",
"versionPlaceholder": "留空则按来源版本末段 +1",
"strategy": "更新策略",
@@ -2681,7 +2681,7 @@
"themeDark": "深色 · 卡密登录",
"themeLight": "浅色 · 办公风",
"themeIndustrial": "工业蓝 · 设备授权",
"themeHint": "DuiLib 皮肤目前 64 位生效;32 位程序仍用经典壳。选好皮肤后加壳,产物弹窗就按该皮肤渲染。",
"themeHint": "DuiLib 皮肤目前 64 位生效;32 位程序仍用经典壳。选好皮肤后云端加密,产物弹窗就按该皮肤渲染。",
"themeCompact": "极简横幅 · 单行激活",
"themeSplit": "左右分栏 · 品牌竖栏",
"themeCard": "宽扁卡片 · 双列说明",
@@ -2692,7 +2692,7 @@
},
"signProfiles": {
"title": "签名证书",
"description": "上传 Windows pfx / iOS p12+描述文件,加壳产物用它们重签;证书与口令一律加密存储,永不下发前端",
"description": "上传 Windows pfx / iOS p12+描述文件,云端加密产物用它们重签;证书与口令一律加密存储,永不下发前端",
"uploadTitle": "上传证书",
"uploadHint": "Windows 用 .pfx/.p12;iOS 需要 .p12 + .mobileprovision 两件套",
"platform": "平台",
@@ -2736,7 +2736,7 @@
"expired": "已过期",
"daysLeft": "天后过期",
"colCerts": "证书数",
"uploadedSplit": "已从该文件解析出 {n} 套证书,分别建了 {n} 条记录,加壳时可任选一套",
"uploadedSplit": "已从该文件解析出 {n} 套证书,分别建了 {n} 条记录,云端加密时可任选一套",
"colSubject": "证书名称(CN)",
"identities": "身份列表",
"identitiesTitle": "证书身份",
@@ -3434,7 +3434,7 @@
"storage": "存储",
"admin": "管理员",
"agent": "代理商",
"protect": "加壳加固",
"protect": "云端加密",
"signProfiles": "签名证书"
},
"footer": {
+1 -1
View File
@@ -111,7 +111,7 @@ const routes: RouteRecordRaw[] = [
path: 'protect',
name: 'AdminProtect',
component: () => import('@/pages/admin/protect/index.vue'),
meta: { title: '加壳加固 - 管理后台' },
meta: { title: '云端加密 - 管理后台' },
},
{
path: 'sign-profiles',