Commit c6e04f4
feat: 补丁包生成前增加加密文件扫描 (Encryption file scan before packaging) (#82)
* feat: add encryption file scanning before patch packaging
- Add EncryptionDetectionService with multi-layered detection:
- Extension blacklist matching (40+ known encrypted extensions)
- PE file deep analysis (section name fingerprinting for 50+ protectors
like .NET Reactor, ConfuserEx, VMProtect, Themida, UPX, etc.)
- PE CLR/COR20 header integrity check for .NET assemblies
- ELF file section analysis (, )
- JAR/Class CAFEBABE magic number validation
- Python .pyc magic number range check
- Full-file Shannon entropy analysis (threshold 7.8, auto-skip
compressed/media formats like .zip, .png, .mp4)
- Risk level classification: High / Medium / Low
- Toggle switch in PatchView UI, enabled by default
- Dialog prompt with grouped results when suspicious files found
(Skip / Include All / Cancel)
- Full i18n support (zh-CN / en-US)
Closes #TBD
* fix: address Copilot review suggestions
- Fix dialog hang when user closes window via X button
(set TCS result before Close, register Closed event as fallback)
- Replace hardcoded 'cancelled by user' with localized string
- Add ConfigureAwait(false) in scan loop to avoid UI thread
context switching on every file iteration
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>1 parent 07358a7 commit c6e04f4
6 files changed
Lines changed: 1064 additions & 2 deletions
File tree
- src
- Models
- Services
- ViewModels
- Views
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
0 commit comments