diff --git a/Block-List.en-US.md b/Block-List.en-US.md
new file mode 100644
index 0000000..8b9f72d
--- /dev/null
+++ b/Block-List.en-US.md
@@ -0,0 +1,59 @@
+# Block List
+The sub items stand for products that may be affected by this tool.
+- 360
+ - 360 Safe
+ - 360 Antivirus
+ - 360 Browser
+ - 360 Safe Suite (Safe + Antivirus + Browser)
+- 2345
+ - 2345 Browser
+ - 2345 Safeguard
+- 6789
+ - 6789 Zip
+- Baidu
+ - Baidu Safeguard
+ - Baidu AntiVirus
+ - Baidu Browser
+ - Baidu NetDisk
+- Baofeng Video
+- Toutiao Video
+- Driver Life
+- Funshion Video
+- Format Factory
+- Kuai Zip
+- Kingsoft
+ - Kingsoft Antivirus
+ - Liebao Browser
+ - WPS Office
+- Kugou
+- Kuwo
+- LeTV
+- PPTV
+- iQIYI
+- Rising
+ - Rising Antivirus
+- Adware
+- Ruanmei
+- Sogou
+ - Sogou Pinyin IME
+ - Sogou Browser
+- Sohu
+ - Sohu Video
+- Taobao/UC
+ - Ali Wangwang
+ - UC Browser
+- Tencent
+ - Tencent QQ
+ - TIM
+ - Tencent PC Manager
+ - QQ Browser
+- Thunder
+ - Thunder X
+ - Thunder 9
+ - Thunder Video Player
+ - Thunder Game Accelerator
+ - Thunder Game Box
+- Youku
+- YY
+ - YY VoIP
+ - YY Browser
\ No newline at end of file
diff --git a/Block-List.en.md b/Block-List.en.md
deleted file mode 100644
index 60d1921..0000000
--- a/Block-List.en.md
+++ /dev/null
@@ -1,27 +0,0 @@
-# Block List
-- 360
-- 2345
-- Baidu
-- Baofeng Video
-- Toutiao Video
-- Driver Life
-- Funshion
-- Format Factory
-- Kuai Zip
-- Kingsoft
-- Kugou
-- Kuwo
-- LeTV
-- NetEase
-- PPTV
-- iQIYI
-- Rising
-- Adware
-- Ruanmei
-- Sogou
-- Sohu
-- Taobao/UC
-- Tencent
-- Thunder
-- Youku
-- YY
\ No newline at end of file
diff --git a/Block-List.zh-CN.md b/Block-List.zh-CN.md
index a002299..45a290b 100644
--- a/Block-List.zh-CN.md
+++ b/Block-List.zh-CN.md
@@ -1,7 +1,20 @@
# 屏蔽列表
+子项目表示可能会受屏蔽影响的产品, 也可能有未在此列表的产品受影响.
- 360
+ - 360安全卫士
+ - 360杀毒
+ - 360浏览器
+ - 360安全套装(卫士+杀毒+浏览器)
- 2345
+ - 2345浏览器
+ - 2345卫士
+- 6789
+ - 6789压缩
- 百度
+ - 百度卫士
+ - 百度杀毒
+ - 百度浏览器
+ - 百度网盘
- 暴风影音
- 头条视频
- 驱动人生
@@ -9,19 +22,38 @@
- 格式工厂
- 快压
- 金山
+ - 金山毒霸
+ - 猎豹浏览器
+ - WPS Office
- 酷狗
- 酷我
- 乐视
-- 网易
- PPTV
- 爱奇艺
- 瑞星
+ - 瑞星杀毒
- 广告下载器
- 软媒
- 搜狗
+ - 搜狗拼音
+ - 搜狗浏览器
- 搜狐
+ - 搜狐影音
- 淘宝/UC
+ - 阿里旺旺
+ - UC浏览器
- 腾讯
+ - 腾讯QQ
+ - TIM
+ - 腾讯电脑管家
+ - QQ浏览器
- 迅雷
+ - 迅雷X
+ - 迅雷9
+ - 迅雷影音
+ - 网游加速器
+ - 迅雷游戏盒子
- 优酷
-- YY语音/浏览器
\ No newline at end of file
+- YY
+ - YY语音
+ - YY浏览器
\ No newline at end of file
diff --git a/README.en-US.md b/README.en-US.md
new file mode 100644
index 0000000..4bbdebc
--- /dev/null
+++ b/README.en-US.md
@@ -0,0 +1,44 @@
+# Malware Patch
+[中文版](README.md)
+
+Prevent UAC authorization of Chinese malware, no need to run in background.
+
+Project inspired by [Windows apps that amaze us](https://amazing-apps.gitbooks.io/windows-apps-that-amaze-us/content/en/blacklist.html).
+
+## CLI Usage
+- No parameter : Open GUI.
+- `--silent-update` : Silently check and download update.
+- `--disallow-all` : Disallow all UAC authorizations of malwares.
+- `--allow-all` : Allow all UAC authorizations of malwares.
+- `--remove` : Clean up temp files used for update.
+- `--allow` : Select a program (from "Open File" dialog) and allow UAC authorization of it.
+> The selected program must be signed because this app uses its digital signature to identify the program, the same below
+- `--disallow` : Select a program and disallow UAC authorization of it.
+- `--allow=file`: Allow UAC authorization of `file`.
+- `--disallow=file`: Disallow UAC authorization of `file`.
+
+## System Support
+- Windows 10
+- Windows 8.1
+- *Windows 7* (**Not tested yet**)
+
+## Language Support
+- English
+- 简体中文
+
+## Block Lists
+- [English](Block-List.en-US.md)
+- [简体中文](Block-List.zh-CN.md)
+
+## Example
+### Before
+
+
+
+### Disallow it and save
+
+
+
+### After
+
+
diff --git a/README.md b/README.md
index 053ea59..059abd8 100644
--- a/README.md
+++ b/README.md
@@ -1,42 +1,44 @@
-# Malware Patch
-[中文版](README.zh-CN.md)
+# 软件屏蔽器
+[English version](README.en-US.md)
+
+阻止指定软件的管理员授权, 无需后台运行.
+
+项目灵感来源:[Windows apps that amaze us](https://amazing-apps.gitbooks.io/windows-apps-that-amaze-us/zh-CN/blacklist.html).
+
+## 命令行参数
+- 无参数 : 启动图形界面.
+- `--silent-update` : 在后台进行更新.
+- `--disallow-all` : 屏蔽所有支持的软件.
+- `--allow-all` : 允许所有支持的软件.
+- `--remove` : 清理更新的缓存文件.
+- `--allow`: (从"打开文件"对话框)选择并允许程序.
+> 程序必须拥有数字签名,因为本功能使用其数字签名实现,下同
+- `--disallow`: 选择并屏蔽程序.
+- `--allow=file`: 允许传入的`file`.
+- `--disallow=file`: 屏蔽传入的`file`.
+
+## 系统支持
+- Windows 10
+- Windows 8.1
+- *Windows 7* (**尚未测试**)
-Prevent UAC authorization of Chinese malwares, **no** need to run in background.
+## 语言支持
+- 简体中文
+- English
-Project inspired by [Windows apps that amaze us](https://amazing-apps.gitbooks.io/windows-apps-that-amaze-us/content/en/blacklist.html).
+## 屏蔽列表
+- [简体中文](Block-List.zh-CN.md)
+- [English](Block-List.en-US.md)
-*This repository contains only version info and binary.*
+## 例子
+### 屏蔽前
-## CLI Usage
-- No parameter : Open GUI.
-- `--silent-update` : Silently check and download update.
-- `--disallow-all` : Disallow all UAC authorizations of malwares.
-- `--allow-all` : Allow all UAC authorizations of malwares.
-- `--proxy=127.0.0.1:8000` : Set proxy for `--silent-update`.
-- `--remove` : Clean up temp files used for update.
-- `--allow=file`: Allow UAC authorization of `file`. (The `file` must be signed because app uses its digital signature to identify the program, same for disallow)
-- `--disallow=file`: Disallow UAC authorization of `file`.
+
-## About Temp Files
-Currently this app only store new version file as `__mwp.exe` in the same directory. You can delete it manually after update.
+### 屏蔽并保存
-## System Support
-- Windows 10
-- Windows 8/8.1
-- *Windows 7* (**Not tested yet**)
+
-## Language Support
-- English
-- 简体中文
-
-## Block Lists
-- [English](Block-List.en.md)
-- [简体中文](Block-List.zh-CN.md)
+### 屏蔽后
-## Example
-### Before
-
-### Disallow it and save
-
-### After
-
+
\ No newline at end of file
diff --git a/README.zh-CN.md b/README.zh-CN.md
deleted file mode 100644
index 055fc05..0000000
--- a/README.zh-CN.md
+++ /dev/null
@@ -1,42 +0,0 @@
-# 软件屏蔽器
-[English version](README.md)
-
-阻止指定软件的管理员授权,**无需**后台运行.
-
-项目灵感来源:[Windows apps that amaze us](https://amazing-apps.gitbooks.io/windows-apps-that-amaze-us/zh-CN/blacklist.html).
-
-*此仓库仅包含版本信息和可执行程序.*
-
-## 命令行参数
-- 无参数 : 启动图形界面.
-- `--silent-update` : 在后台进行更新.
-- `--disallow-all` : 屏蔽所有支持的软件.
-- `--allow-all` : 允许所有支持的软件.
-- `--proxy=127.0.0.1:8000` : 为`--silent-update`指定代理.
-- `--remove` : 清理更新的缓存文件.
-- `--allow=file`: 允许传入的`file`. (`file`必须拥有数字签名,因为本功能使用其数字签名实现,下同)
-- `--disallow=file`: 屏蔽传入的`file`.
-
-## 关于缓存文件
-目前此应用只会在同目录中产生更新文件`__mwp.exe`. 更新完成后你可以用手动删除它.
-
-## 系统支持
-- Windows 10
-- Windows 8/8.1
-- *Windows 7* (**尚未测试**)
-
-## 语言支持
-- 简体中文
-- English
-
-## 屏蔽列表
-- [简体中文](Block-List.zh-CN.md)
-- [English](Block-List.en.md)
-
-## 例子
-### 屏蔽前
-
-### 屏蔽并保存
-
-### 屏蔽后
-
\ No newline at end of file
diff --git a/mwp-ver.txt b/mwp-ver.txt
index a2a9ac2..93580fb 100644
--- a/mwp-ver.txt
+++ b/mwp-ver.txt
@@ -1 +1 @@
-2.6.0.0
\ No newline at end of file
+2.9.1.0
\ No newline at end of file
diff --git a/mwp.exe b/mwp.exe
index 0c42488..d45f813 100644
Binary files a/mwp.exe and b/mwp.exe differ
diff --git a/src/MalwarePatch.sln b/src/MalwarePatch.sln
new file mode 100644
index 0000000..0c99abe
--- /dev/null
+++ b/src/MalwarePatch.sln
@@ -0,0 +1,22 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 15
+VisualStudioVersion = 15.0.26430.16
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MalwarePatch", "MalwarePatch\MalwarePatch.csproj", "{769D2F79-D71B-4F5F-A61F-B1EF3A4C7414}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {769D2F79-D71B-4F5F-A61F-B1EF3A4C7414}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {769D2F79-D71B-4F5F-A61F-B1EF3A4C7414}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {769D2F79-D71B-4F5F-A61F-B1EF3A4C7414}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {769D2F79-D71B-4F5F-A61F-B1EF3A4C7414}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/src/MalwarePatch/Ace.dll b/src/MalwarePatch/Ace.dll
new file mode 100644
index 0000000..929bde4
Binary files /dev/null and b/src/MalwarePatch/Ace.dll differ
diff --git a/src/MalwarePatch/App.config b/src/MalwarePatch/App.config
new file mode 100644
index 0000000..ecdcf8a
--- /dev/null
+++ b/src/MalwarePatch/App.config
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/src/MalwarePatch/App.xaml b/src/MalwarePatch/App.xaml
new file mode 100644
index 0000000..c0918c5
--- /dev/null
+++ b/src/MalwarePatch/App.xaml
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/MalwarePatch/App.xaml.cs b/src/MalwarePatch/App.xaml.cs
new file mode 100644
index 0000000..0635216
--- /dev/null
+++ b/src/MalwarePatch/App.xaml.cs
@@ -0,0 +1,60 @@
+using MalwarePatch.CliTools;
+using MalwarePatch.Languages;
+using MalwarePatch.Models;
+using System;
+using System.Collections.Generic;
+using System.Configuration;
+using System.Data;
+using System.Diagnostics;
+using System.Globalization;
+using System.IO;
+using System.Linq;
+using System.Reflection;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Shell;
+
+namespace MalwarePatch
+{
+ public partial class App : Application
+ {
+ protected override void OnStartup(StartupEventArgs e)
+ {
+ AppDomain.CurrentDomain.AssemblyResolve += assemblyResolveHandler;
+ //StartupUri = new Uri("MainWindow.xaml", UriKind.RelativeOrAbsolute);
+ base.OnStartup(e);
+ // CultureInfo.CurrentUICulture = new CultureInfo("en-US");
+ AppJumpList.CreateJumpList();
+#if DEBUG
+ File.AppendAllText($"args.txt", string.Join(" ", e.Args));
+#endif
+ if (SilentUpdater.TryParse(e.Args) ||
+ UserCertificateCli.TryParse(e.Args) ||
+ MalwareChecker.TryParse(e.Args))
+ {
+ Shutdown();
+ }
+ else
+ {
+ Updater.InstallUpdateAndRun(this, e.Args);
+ }
+ }
+ static Assembly assemblyResolveHandler(object s, ResolveEventArgs e)
+ {
+ var dllName = new AssemblyName(e.Name).Name + ".dll";
+ var assembly = Assembly.GetExecutingAssembly();
+ var resourceName = assembly.GetManifestResourceNames().FirstOrDefault(name => name.EndsWith(dllName));
+ if (resourceName == null)
+ {
+ return null;
+ }
+ using (var stream = assembly.GetManifestResourceStream(resourceName))
+ {
+ var assemblyData = new byte[stream.Length];
+ stream.Read(assemblyData, 0, assemblyData.Length);
+ return Assembly.Load(assemblyData);
+ }
+ }
+ }
+}
diff --git a/src/MalwarePatch/AppIcons/01-disallow-small.ico b/src/MalwarePatch/AppIcons/01-disallow-small.ico
new file mode 100644
index 0000000..a402d9b
Binary files /dev/null and b/src/MalwarePatch/AppIcons/01-disallow-small.ico differ
diff --git a/src/MalwarePatch/AppIcons/02-allow-small.ico b/src/MalwarePatch/AppIcons/02-allow-small.ico
new file mode 100644
index 0000000..17ed99b
Binary files /dev/null and b/src/MalwarePatch/AppIcons/02-allow-small.ico differ
diff --git a/src/MalwarePatch/AppJumpList.cs b/src/MalwarePatch/AppJumpList.cs
new file mode 100644
index 0000000..a924f76
--- /dev/null
+++ b/src/MalwarePatch/AppJumpList.cs
@@ -0,0 +1,37 @@
+using MalwarePatch.Languages;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Shell;
+
+namespace MalwarePatch
+{
+ static class AppJumpList
+ {
+ public static void CreateJumpList()
+ {
+ var jumpList = new JumpList();
+ var language = new MainLanguage();
+ jumpList.JumpItems.Add(new JumpTask
+ {
+ Title = language[MainLanguage.Keys.DisallowProgram],
+ Arguments = "--disallow",
+ Description = language[MainLanguage.Keys.DisallowProgramDescription],
+ IconResourceIndex = 1,
+ });
+ jumpList.JumpItems.Add(new JumpTask
+ {
+ Title = language[MainLanguage.Keys.AllowProgram],
+ Arguments = "--allow",
+ Description = language[MainLanguage.Keys.AllowProgramDescription],
+ IconResourceIndex = 2,
+ });
+ jumpList.ShowFrequentCategory = false;
+ jumpList.ShowRecentCategory = false;
+ JumpList.SetJumpList(Application.Current, jumpList);
+ }
+ }
+}
diff --git a/src/MalwarePatch/Assets/Icons.UserCertificates.xaml b/src/MalwarePatch/Assets/Icons.UserCertificates.xaml
new file mode 100644
index 0000000..2bd0e51
--- /dev/null
+++ b/src/MalwarePatch/Assets/Icons.UserCertificates.xaml
@@ -0,0 +1,71 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/MalwarePatch/Assets/Icons.xaml b/src/MalwarePatch/Assets/Icons.xaml
new file mode 100644
index 0000000..4b81a1f
--- /dev/null
+++ b/src/MalwarePatch/Assets/Icons.xaml
@@ -0,0 +1,148 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/MalwarePatch/Assets/certificate-map.json b/src/MalwarePatch/Assets/certificate-map.json
new file mode 100644
index 0000000..9084f55
--- /dev/null
+++ b/src/MalwarePatch/Assets/certificate-map.json
@@ -0,0 +1,175 @@
+{
+ "360": [
+ "360.cer",
+ "360 256.cer",
+ "360 sd.cer",
+ "360 browser 2018.11.cer",
+ "360 browser 256.2018.11.cer"
+ ],
+ "2345": [
+ "2345.cer",
+ "2345 256.cer",
+ "2345 browser.cer",
+ "2345 browser 256.cer",
+ "2345 2019.6.cer",
+ "2345 256.2019.6.cer"
+ ],
+ "6789": [
+ "6789.cer",
+ "6789 256.cer",
+ "6789 256.2019.4.cer"
+ ],
+ "Baidu": [
+ "baidu.cer",
+ "baidusp.cer",
+ "baidu browser.cer",
+ "baidu download.cer",
+ "baidu browser.2018.7.8.cer",
+ "baidu browser 256.2018.7.8.cer",
+ "baidu netdisk.cer",
+ "baidu netdisk 256.cer"
+ ],
+ "Baofeng": [
+ "baofeng.cer",
+ "baofeng 256.cer"
+ ],
+ "DongfangToutiao": [
+ "donfang toutiao.cer",
+ "donfang toutiao 256.cer",
+ "donfang toutiao 2020.1.cer",
+ "donfang toutiao 256.2020.1.cer"
+ ],
+ "DriverLife": [
+ "driveTheLife.cer",
+ "driveTheLife 256.cer",
+ "driveTheLife 2019.6.cer",
+ "driveTheLife 256.2019.6.cer"
+ ],
+ "Funshion": [
+ "funshion.cer"
+ ],
+ "FormatFactory": [
+ "grid verse (format factory).cer",
+ "grid verse (format factory) 256.cer",
+ "grid verse (format factory) 2018.12.cer"
+ ],
+ "HeiNote": [
+ "7654 note.cer",
+ "7654 note 256.cer",
+ "7654 note 2019.10.cer",
+ "7654 note 256.2019.10.cer"
+ ],
+ "KuaiZip": [
+ "kuaizip.cer",
+ "kuaizip 256.cer"
+ ],
+ "Kingsoft": [
+ "kingsoft.cer",
+ "kingsoft 256.cer",
+ "kingsoft ws.cer",
+ "kingsoft browser.cer",
+ "kingsoft browser 256.cer",
+ "kingsoft wps.cer",
+ "kingsoft wps 256.cer",
+ "kingsoft 2019.6.cer",
+ "kingsoft 256.2019.6.cer"
+ ],
+ "Kugou": [
+ "kugou.cer"
+ ],
+ "Kuwo": [
+ "kuwo.cer"
+ ],
+ "LeTV": [
+ "leshi.cer",
+ "leshi 256.cer"
+ ],
+ "PPTV": [
+ "pptv.cer",
+ "pptv 256.cer",
+ "pptv 2019.1.cer",
+ "pptv 256.2019.1.cer",
+ "pplive.cer",
+ "pplive 256.cer"
+ ],
+ "iQIYI": [
+ "qiyi.cer",
+ "qiyi 256.cer"
+ ],
+ "Rising": [
+ "rising.cer",
+ "rising 256.cer",
+ "rising 2018.9.cer",
+ "rising 256.2018.9.cer",
+ "rising 2019.8.cer",
+ "rising 256.2019.8.cer"
+ ],
+ "Riyue": [
+ "riyue (at).cer",
+ "riyue (at) 256.cer",
+ "xingcheng (at).cer",
+ "xingcheng (at) 256.cer"
+ ],
+ "Ruanmei": [
+ "ruanmei.cer",
+ "ruanmei 256.cer",
+ "ruanmei 256.2019.1.cer"
+ ],
+ "Sogou": [
+ "sogou.cer",
+ "sogou 256.cer",
+ "sogou 2019.8.cer",
+ "sogou 256.2019.8.cer",
+ "sogou 2019.10.cer",
+ "sogou 256.2019.10.cer"
+ ],
+ "Sohu": [
+ "sohu.cer",
+ "sohu 2018.12.cer"
+ ],
+ "Taobao": [
+ "taobao.cer",
+ "taobao 256.cer",
+ "aliwangwang 2018.8.cer",
+ "aliwangwang 256.2018.8.cer"
+ ],
+ "Tencent": [
+ "tencent.cer",
+ "tencent 256.cer",
+ "tencent 2018.11.cer",
+ "tencent 256.2018.11.cer"
+ ],
+ "Thunder": [
+ "thunder.cer",
+ "thunder 256.cer",
+ "thunder 2018.9.cer",
+ "thunder 256.2018.9.cer",
+ "thunder player.cer",
+ "thunder player 256.cer",
+ "thunder game.cer",
+ "thunder game 256.cer",
+ "thunder game.2018.7.8.cer",
+ "thunder game 256.2018.7.8.cer",
+ "thunder accel.cer",
+ "thunder accel 256.cer",
+ "thunder player 2018.12.cer",
+ "thunder player 256.2018.12.cer",
+ "thunder 2020.1.cer",
+ "thunder 256.2020.1.cer"
+ ],
+ "Youku": [
+ "youku.cer",
+ "youku 256.cer",
+ "youku 2018.8.cer",
+ "youku 256.2018.8.cer"
+ ],
+ "YY": [
+ "yy.cer",
+ "yy 256.cer",
+ "yy browser.cer",
+ "yy 2018.12.cer",
+ "yy 256.2018.12.cer",
+ "yy 2020.1.cer",
+ "yy 256.2020.1.cer"
+ ]
+}
diff --git a/src/MalwarePatch/Assets/display-names.json b/src/MalwarePatch/Assets/display-names.json
new file mode 100644
index 0000000..92f4df9
--- /dev/null
+++ b/src/MalwarePatch/Assets/display-names.json
@@ -0,0 +1,61 @@
+{
+ "en-US": {
+ "360": "360",
+ "2345": "2345",
+ "6789": "6789",
+ "Baidu": "Baidu",
+ "Baofeng": "Baofeng Video",
+ "DongfangToutiao": "Toutiao Video",
+ "DriverLife": "Driver Life",
+ "Funshion": "Funshion",
+ "FormatFactory": "Format Factory",
+ "HeiNote": "Hei Note",
+ "KuaiZip": "Kuai Zip",
+ "Kingsoft": "Kingsoft",
+ "Kugou": "Kugou",
+ "Kuwo": "Kuwo",
+ "LeTV": "LeTV",
+ "PPTV": "PPTV",
+ "iQIYI": "iQIYI",
+ "Rising": "Rising",
+ "Riyue": "Adware",
+ "Ruanmei": "Ruanmei",
+ "Sogou": "Sogou",
+ "Sohu": "Sohu",
+ "Taobao": "Taobao/UC",
+ "Tencent": "Tencent",
+ "Thunder": "Thunder",
+ "Youku": "Youku",
+ "YY": "YY"
+ },
+ "zh-CN": {
+ "360": "360",
+ "2345": "2345",
+ "6789": "6789",
+ "Baidu": "百度",
+ "Baofeng": "暴风影音",
+ "DongfangToutiao": "头条视频",
+ "DriverLife": "驱动人生",
+ "Funshion": "风行",
+ "FormatFactory": "格式工厂",
+ "HackedFlash": "病毒版Flash",
+ "HeiNote": "小黑记事本",
+ "KuaiZip": "快压",
+ "Kingsoft": "金山",
+ "Kugou": "酷狗",
+ "Kuwo": "酷我",
+ "LeTV": "乐视",
+ "PPTV": "PPTV",
+ "iQIYI": "爱奇艺",
+ "Rising": "瑞星",
+ "Riyue": "广告下载器",
+ "Ruanmei": "软媒",
+ "Sogou": "搜狗",
+ "Sohu": "搜狐",
+ "Taobao": "淘宝/UC",
+ "Tencent": "腾讯",
+ "Thunder": "迅雷",
+ "Youku": "优酷",
+ "YY": "YY"
+ }
+}
diff --git a/src/MalwarePatch/Assets/malware-remote-info.json b/src/MalwarePatch/Assets/malware-remote-info.json
new file mode 100644
index 0000000..ee81984
--- /dev/null
+++ b/src/MalwarePatch/Assets/malware-remote-info.json
@@ -0,0 +1,233 @@
+{
+ "360": {
+ "fixed": [
+ "https://dl.360safe.com/inst.exe",
+ "https://dl.360safe.com/se/360se_setup.exe",
+ "https://dl.360safe.com/inst_safe_se.exe",
+ "https://dl.360safe.com/360safe_cq.exe",
+ "http://down.360safe.com/bizhi/360wallpaper_baidu.exe",
+ "http://cdn-file-ssl-bizhi.ludashi.com/pc/appstore/huanliang/360wallpaper_360se.exe",
+ "http://down.360safe.com/bizhi/360wallpaper_bird.exe"
+ ],
+ "match": [
+ {
+ "url": "http://sd.360.cn/",
+ "regex": "href=\"(http://down.360safe.com/360sd/.*?.exe)",
+ "group": 1
+ }
+ ]
+ },
+ "2345": {
+ "fixed": [],
+ "match": [
+ {
+ "url": "http://ie.2345.com/chrome/freecall/",
+ "regex": "'href'\\s*:\\s*'(.*?[^beta]\\.exe)',",
+ "group": 1
+ },
+ {
+ "url": "http://safe.2345.cc/",
+ "regex": "downl[ao][ao]dUrl\" href=\"(.*?)\"",
+ "group": 1
+ }
+ ]
+ },
+ "Baidu": {
+ "fixed": [],
+ "match": []
+ },
+ "Baofeng": {
+ "fixed": [],
+ "match": [
+ {
+ "url": "http://home.baofeng.com/",
+ "regex": "立即下载",
+ "group": 2
+ }
+ ]
+ },
+ "DongfangToutiao": {
+ "fixed": [
+ "http://kan.eastday.com/download/"
+ ],
+ "match": []
+ },
+ "DriverLife": {
+ "fixed": [],
+ "match": [
+ {
+ "url": "http://www.160.com/",
+ "regex": "href=\"(http[s]?://file1.updrv.com/soft/dtl8/.*?\.exe)",
+ "group": 1
+ }
+ ]
+ },
+ "FormatFactory": {
+ "fixed": [
+ "http://down.pcgeshi.com/FormatFactory_setup.exe"
+ ],
+ "match": []
+ },
+ "HeiNote": {
+ "fixed": [],
+ "match": [
+ {
+ "url": "http://heinote.7654.com/",
+ "regex": "href=\"(http://d\\.heinote\\.com/downloads/.*?)\"",
+ "group": 1
+ }
+ ]
+ },
+ "KuaiZip": {
+ "fixed": [],
+ "match": [
+ {
+ "url": "http://www.kuaizip.com/",
+ "regex": "href=\"(http://dl\\.kkdownload\\.com/.*.exe)",
+ "group": 1
+ }
+ ]
+ },
+ "Kingsoft": {
+ "fixed": [],
+ "match": [
+ {
+ "url": "http://www.ijinshan.com/",
+ "regex": "top_down_btn.*href=\"(.*?)\"",
+ "group": 1
+ },
+ {
+ "url": "https://www.liebao.cn/",
+ "regex": "href=\"(http[s]?://dl.liebao.cn/kb/KSbrowser.*?)\"",
+ "group": 1
+ },
+ {
+ "url": "http://www.wps.cn/",
+ "regex": "class=\"btn btn-lg\"\\s*href=\"(.*?)\"\\s*onclick.*?WPS Office 2019 PC",
+ "group": 1
+ }
+ ]
+ },
+ "Kugou": {
+ "fixed": [
+ "http://download.kugou.com/download/kugou_pc"
+ ],
+ "match": []
+ },
+ "Kuwo": {
+ "fixed": [
+ "http://down.kuwo.cn/mbox/kwmusic_web_4.exe"
+ ],
+ "match": []
+ },
+ "PPTV": {
+ "fixed": [
+ "http://app.aplus.pptv.com/minisite/download/"
+ ],
+ "match": []
+ },
+ "iQIYI": {
+ "fixed": [
+ "http://dl.static.iqiyi.com/hz/IQIYIsetup_app.exe"
+ ],
+ "match": []
+ },
+ "Rising": {
+ "fixed": [],
+ "match": [
+ {
+ "url": "http://www.rising.com.cn/service/javascript/RsDownProVer.js",
+ "regex": "var RsPcV17Url=\"(.*)\"",
+ "group": 1
+ }
+ ]
+ },
+ "Ruanmei": {
+ "fixed": [],
+ "match": [
+ {
+ "url": "http://mofang.ruanmei.com/",
+ "regex": "href=\"(http[s]?://d.ruanmei.com/pcmaster/.*?)\"",
+ "group": 1
+ }
+ ]
+ },
+ "Sogou": {
+ "fixed": [],
+ "match": [
+ {
+ "url": "https://pinyin.sogou.com/",
+ "regex": "banner0_link2.*href=\"(.*?)\"",
+ "group": 1
+ },
+ {
+ "url": "https://ie.sogou.com/",
+ "regex": "nav=\"download\".*href=\"(.*?)\"",
+ "group": 1
+ }
+ ]
+ },
+ "Sohu": {
+ "fixed": [],
+ "match": [
+ {
+ "url": "https://tv.sohu.com/app/?x=4",
+ "regex": "href=\"(.*?)\".*btn-dwn",
+ "group": 1
+ }
+ ]
+ },
+ "Taobao": {
+ "fixed": [
+ "https://alimarket.taobao.com/markets/qnww/aliww-download?wh_from=win"
+ ],
+ "match": []
+ },
+ "Tencent": {
+ "fixed": [],
+ "match": [
+ {
+ "url": "http://im.qq.com/pcqq/",
+ "regex": "href=\"(.*?)\".*class=\"download\"",
+ "group": 1
+ },
+ {
+ "url": "https://office.qq.com/download.html",
+ "regex": "href=\"(.*?)\".*tim.downloads.windows",
+ "group": 1
+ },
+ {
+ "url": "https://guanjia.qq.com/",
+ "regex": "href=\"(.*?)\".*banner_download",
+ "group": 1
+ }
+ ]
+ },
+ "Thunder": {
+ "fixed": [
+ "http://down.sandai.net/XLNetAcc/XLNetAccSetup.exe"
+ ],
+ "match": [
+ {
+ "url": "http://dl.xunlei.com",
+ "regex": "href=\"(http://down.sandai.net/thunderx/.*?.exe)",
+ "group": 1
+ },
+ {
+ "url": "http://dl.xunlei.com",
+ "regex": "href=\"(http://xmp.down.sandai.net/.*?.exe)",
+ "group": 1
+ }
+ ]
+ },
+ "YY": {
+ "fixed": [],
+ "match": [
+ {
+ "url": "http://www.yy.com/web/pcyy_download/",
+ "regex": "window\\.location\\.href=\"(.*?)\"",
+ "group": 1
+ }
+ ]
+ }
+}
diff --git a/src/MalwarePatch/BuildTools/InsertIcons.exe b/src/MalwarePatch/BuildTools/InsertIcons.exe
new file mode 100644
index 0000000..4388cf6
Binary files /dev/null and b/src/MalwarePatch/BuildTools/InsertIcons.exe differ
diff --git a/src/MalwarePatch/Certificates/2345 2019.6.cer b/src/MalwarePatch/Certificates/2345 2019.6.cer
new file mode 100644
index 0000000..258f5be
Binary files /dev/null and b/src/MalwarePatch/Certificates/2345 2019.6.cer differ
diff --git a/src/MalwarePatch/Certificates/2345 256.2019.6.cer b/src/MalwarePatch/Certificates/2345 256.2019.6.cer
new file mode 100644
index 0000000..62ac030
Binary files /dev/null and b/src/MalwarePatch/Certificates/2345 256.2019.6.cer differ
diff --git a/src/MalwarePatch/Certificates/2345 256.cer b/src/MalwarePatch/Certificates/2345 256.cer
new file mode 100644
index 0000000..6c7ac0c
Binary files /dev/null and b/src/MalwarePatch/Certificates/2345 256.cer differ
diff --git a/src/MalwarePatch/Certificates/2345 browser 256.cer b/src/MalwarePatch/Certificates/2345 browser 256.cer
new file mode 100644
index 0000000..712692d
Binary files /dev/null and b/src/MalwarePatch/Certificates/2345 browser 256.cer differ
diff --git a/src/MalwarePatch/Certificates/2345 browser.cer b/src/MalwarePatch/Certificates/2345 browser.cer
new file mode 100644
index 0000000..199fe15
Binary files /dev/null and b/src/MalwarePatch/Certificates/2345 browser.cer differ
diff --git a/src/MalwarePatch/Certificates/2345.cer b/src/MalwarePatch/Certificates/2345.cer
new file mode 100644
index 0000000..9acc9a3
Binary files /dev/null and b/src/MalwarePatch/Certificates/2345.cer differ
diff --git a/src/MalwarePatch/Certificates/360 256.cer b/src/MalwarePatch/Certificates/360 256.cer
new file mode 100644
index 0000000..2aeaa8a
Binary files /dev/null and b/src/MalwarePatch/Certificates/360 256.cer differ
diff --git a/src/MalwarePatch/Certificates/360 browser 2018.11.cer b/src/MalwarePatch/Certificates/360 browser 2018.11.cer
new file mode 100644
index 0000000..8b62f16
Binary files /dev/null and b/src/MalwarePatch/Certificates/360 browser 2018.11.cer differ
diff --git a/src/MalwarePatch/Certificates/360 browser 256.2018.11.cer b/src/MalwarePatch/Certificates/360 browser 256.2018.11.cer
new file mode 100644
index 0000000..377c094
Binary files /dev/null and b/src/MalwarePatch/Certificates/360 browser 256.2018.11.cer differ
diff --git a/src/MalwarePatch/Certificates/360 sd.cer b/src/MalwarePatch/Certificates/360 sd.cer
new file mode 100644
index 0000000..d7aed1e
Binary files /dev/null and b/src/MalwarePatch/Certificates/360 sd.cer differ
diff --git a/src/MalwarePatch/Certificates/360.cer b/src/MalwarePatch/Certificates/360.cer
new file mode 100644
index 0000000..6014bc2
Binary files /dev/null and b/src/MalwarePatch/Certificates/360.cer differ
diff --git a/src/MalwarePatch/Certificates/6789 256.2019.4.cer b/src/MalwarePatch/Certificates/6789 256.2019.4.cer
new file mode 100644
index 0000000..44e8c3d
Binary files /dev/null and b/src/MalwarePatch/Certificates/6789 256.2019.4.cer differ
diff --git a/src/MalwarePatch/Certificates/6789 256.cer b/src/MalwarePatch/Certificates/6789 256.cer
new file mode 100644
index 0000000..b9cbf11
Binary files /dev/null and b/src/MalwarePatch/Certificates/6789 256.cer differ
diff --git a/src/MalwarePatch/Certificates/6789.cer b/src/MalwarePatch/Certificates/6789.cer
new file mode 100644
index 0000000..b9cbf11
Binary files /dev/null and b/src/MalwarePatch/Certificates/6789.cer differ
diff --git a/src/MalwarePatch/Certificates/7654 note 2019.10.cer b/src/MalwarePatch/Certificates/7654 note 2019.10.cer
new file mode 100644
index 0000000..1b306bc
Binary files /dev/null and b/src/MalwarePatch/Certificates/7654 note 2019.10.cer differ
diff --git a/src/MalwarePatch/Certificates/7654 note 256.2019.10.cer b/src/MalwarePatch/Certificates/7654 note 256.2019.10.cer
new file mode 100644
index 0000000..e6c6bcb
Binary files /dev/null and b/src/MalwarePatch/Certificates/7654 note 256.2019.10.cer differ
diff --git a/src/MalwarePatch/Certificates/7654 note 256.cer b/src/MalwarePatch/Certificates/7654 note 256.cer
new file mode 100644
index 0000000..8c18aa4
Binary files /dev/null and b/src/MalwarePatch/Certificates/7654 note 256.cer differ
diff --git a/src/MalwarePatch/Certificates/7654 note.cer b/src/MalwarePatch/Certificates/7654 note.cer
new file mode 100644
index 0000000..b06b645
Binary files /dev/null and b/src/MalwarePatch/Certificates/7654 note.cer differ
diff --git a/src/MalwarePatch/Certificates/@Target.txt b/src/MalwarePatch/Certificates/@Target.txt
new file mode 100644
index 0000000..286d506
--- /dev/null
+++ b/src/MalwarePatch/Certificates/@Target.txt
@@ -0,0 +1,34 @@
+360...
+2345explorer/pcsafe
+6789zip
+aliwangwang
+BaiduSd/BaiduAn/browser/netdisk
+Baofeng
+leTV
+Donfang Video
+driveTheLife
+FormatFactory
+Funshion
+HeiNote
+iQiYi
+KuaiZip
+Kingsoft Antivirus/Browser
+Kugou
+Kuwo
+NetEase
+PCMaster
+PPTV
+QQ/QQPCMgr/TIM
+RisingSD
+SogouPinyin/Explorer
+SohuVA
+Thunder player/game
+YoukuClient
+YouDao
+YY
+
+Updated 08/13/2018
+
+// Manual
+Youku
+Riyue
diff --git a/src/MalwarePatch/Certificates/aliwangwang 2018.8.cer b/src/MalwarePatch/Certificates/aliwangwang 2018.8.cer
new file mode 100644
index 0000000..ed82e27
Binary files /dev/null and b/src/MalwarePatch/Certificates/aliwangwang 2018.8.cer differ
diff --git a/src/MalwarePatch/Certificates/aliwangwang 256.2018.8.cer b/src/MalwarePatch/Certificates/aliwangwang 256.2018.8.cer
new file mode 100644
index 0000000..6fcb921
Binary files /dev/null and b/src/MalwarePatch/Certificates/aliwangwang 256.2018.8.cer differ
diff --git a/src/MalwarePatch/Certificates/baidu browser 256.2018.7.8.cer b/src/MalwarePatch/Certificates/baidu browser 256.2018.7.8.cer
new file mode 100644
index 0000000..0b95df9
Binary files /dev/null and b/src/MalwarePatch/Certificates/baidu browser 256.2018.7.8.cer differ
diff --git a/src/MalwarePatch/Certificates/baidu browser.2018.7.8.cer b/src/MalwarePatch/Certificates/baidu browser.2018.7.8.cer
new file mode 100644
index 0000000..c74f2aa
Binary files /dev/null and b/src/MalwarePatch/Certificates/baidu browser.2018.7.8.cer differ
diff --git a/src/MalwarePatch/Certificates/baidu browser.cer b/src/MalwarePatch/Certificates/baidu browser.cer
new file mode 100644
index 0000000..4b768cc
Binary files /dev/null and b/src/MalwarePatch/Certificates/baidu browser.cer differ
diff --git a/src/MalwarePatch/Certificates/baidu download.cer b/src/MalwarePatch/Certificates/baidu download.cer
new file mode 100644
index 0000000..688ebfe
Binary files /dev/null and b/src/MalwarePatch/Certificates/baidu download.cer differ
diff --git a/src/MalwarePatch/Certificates/baidu netdisk 256.cer b/src/MalwarePatch/Certificates/baidu netdisk 256.cer
new file mode 100644
index 0000000..688ebfe
Binary files /dev/null and b/src/MalwarePatch/Certificates/baidu netdisk 256.cer differ
diff --git a/src/MalwarePatch/Certificates/baidu netdisk.cer b/src/MalwarePatch/Certificates/baidu netdisk.cer
new file mode 100644
index 0000000..6896fbf
Binary files /dev/null and b/src/MalwarePatch/Certificates/baidu netdisk.cer differ
diff --git a/src/MalwarePatch/Certificates/baidu.cer b/src/MalwarePatch/Certificates/baidu.cer
new file mode 100644
index 0000000..a3bbea3
Binary files /dev/null and b/src/MalwarePatch/Certificates/baidu.cer differ
diff --git a/src/MalwarePatch/Certificates/baidusp.cer b/src/MalwarePatch/Certificates/baidusp.cer
new file mode 100644
index 0000000..4b768cc
Binary files /dev/null and b/src/MalwarePatch/Certificates/baidusp.cer differ
diff --git a/src/MalwarePatch/Certificates/baofeng 256.cer b/src/MalwarePatch/Certificates/baofeng 256.cer
new file mode 100644
index 0000000..2d2daed
Binary files /dev/null and b/src/MalwarePatch/Certificates/baofeng 256.cer differ
diff --git a/src/MalwarePatch/Certificates/baofeng.cer b/src/MalwarePatch/Certificates/baofeng.cer
new file mode 100644
index 0000000..7a25f8d
Binary files /dev/null and b/src/MalwarePatch/Certificates/baofeng.cer differ
diff --git a/src/MalwarePatch/Certificates/donfang toutiao 2020.1.cer b/src/MalwarePatch/Certificates/donfang toutiao 2020.1.cer
new file mode 100644
index 0000000..43211ef
Binary files /dev/null and b/src/MalwarePatch/Certificates/donfang toutiao 2020.1.cer differ
diff --git a/src/MalwarePatch/Certificates/donfang toutiao 256.2020.1.cer b/src/MalwarePatch/Certificates/donfang toutiao 256.2020.1.cer
new file mode 100644
index 0000000..4a3fd64
Binary files /dev/null and b/src/MalwarePatch/Certificates/donfang toutiao 256.2020.1.cer differ
diff --git a/src/MalwarePatch/Certificates/donfang toutiao 256.cer b/src/MalwarePatch/Certificates/donfang toutiao 256.cer
new file mode 100644
index 0000000..26fbc25
Binary files /dev/null and b/src/MalwarePatch/Certificates/donfang toutiao 256.cer differ
diff --git a/src/MalwarePatch/Certificates/donfang toutiao.cer b/src/MalwarePatch/Certificates/donfang toutiao.cer
new file mode 100644
index 0000000..3f99045
Binary files /dev/null and b/src/MalwarePatch/Certificates/donfang toutiao.cer differ
diff --git a/src/MalwarePatch/Certificates/driveTheLife 2019.6.cer b/src/MalwarePatch/Certificates/driveTheLife 2019.6.cer
new file mode 100644
index 0000000..01343ea
Binary files /dev/null and b/src/MalwarePatch/Certificates/driveTheLife 2019.6.cer differ
diff --git a/src/MalwarePatch/Certificates/driveTheLife 256.2019.6.cer b/src/MalwarePatch/Certificates/driveTheLife 256.2019.6.cer
new file mode 100644
index 0000000..01343ea
Binary files /dev/null and b/src/MalwarePatch/Certificates/driveTheLife 256.2019.6.cer differ
diff --git a/src/MalwarePatch/Certificates/driveTheLife 256.cer b/src/MalwarePatch/Certificates/driveTheLife 256.cer
new file mode 100644
index 0000000..0c7181d
Binary files /dev/null and b/src/MalwarePatch/Certificates/driveTheLife 256.cer differ
diff --git a/src/MalwarePatch/Certificates/driveTheLife.cer b/src/MalwarePatch/Certificates/driveTheLife.cer
new file mode 100644
index 0000000..b05e3b9
Binary files /dev/null and b/src/MalwarePatch/Certificates/driveTheLife.cer differ
diff --git a/src/MalwarePatch/Certificates/funshion.cer b/src/MalwarePatch/Certificates/funshion.cer
new file mode 100644
index 0000000..404da98
Binary files /dev/null and b/src/MalwarePatch/Certificates/funshion.cer differ
diff --git a/src/MalwarePatch/Certificates/grid verse (format factory) 2018.12.cer b/src/MalwarePatch/Certificates/grid verse (format factory) 2018.12.cer
new file mode 100644
index 0000000..b97ea96
Binary files /dev/null and b/src/MalwarePatch/Certificates/grid verse (format factory) 2018.12.cer differ
diff --git a/src/MalwarePatch/Certificates/grid verse (format factory) 256.cer b/src/MalwarePatch/Certificates/grid verse (format factory) 256.cer
new file mode 100644
index 0000000..0035708
Binary files /dev/null and b/src/MalwarePatch/Certificates/grid verse (format factory) 256.cer differ
diff --git a/src/MalwarePatch/Certificates/grid verse (format factory).cer b/src/MalwarePatch/Certificates/grid verse (format factory).cer
new file mode 100644
index 0000000..964709d
Binary files /dev/null and b/src/MalwarePatch/Certificates/grid verse (format factory).cer differ
diff --git a/src/MalwarePatch/Certificates/kingsoft 2019.6.cer b/src/MalwarePatch/Certificates/kingsoft 2019.6.cer
new file mode 100644
index 0000000..e33a1f3
Binary files /dev/null and b/src/MalwarePatch/Certificates/kingsoft 2019.6.cer differ
diff --git a/src/MalwarePatch/Certificates/kingsoft 256.2019.6.cer b/src/MalwarePatch/Certificates/kingsoft 256.2019.6.cer
new file mode 100644
index 0000000..a9a1123
Binary files /dev/null and b/src/MalwarePatch/Certificates/kingsoft 256.2019.6.cer differ
diff --git a/src/MalwarePatch/Certificates/kingsoft 256.cer b/src/MalwarePatch/Certificates/kingsoft 256.cer
new file mode 100644
index 0000000..a9a1123
Binary files /dev/null and b/src/MalwarePatch/Certificates/kingsoft 256.cer differ
diff --git a/src/MalwarePatch/Certificates/kingsoft browser 256.cer b/src/MalwarePatch/Certificates/kingsoft browser 256.cer
new file mode 100644
index 0000000..ebe7e00
Binary files /dev/null and b/src/MalwarePatch/Certificates/kingsoft browser 256.cer differ
diff --git a/src/MalwarePatch/Certificates/kingsoft browser.cer b/src/MalwarePatch/Certificates/kingsoft browser.cer
new file mode 100644
index 0000000..6def2b9
Binary files /dev/null and b/src/MalwarePatch/Certificates/kingsoft browser.cer differ
diff --git a/src/MalwarePatch/Certificates/kingsoft wps 256.cer b/src/MalwarePatch/Certificates/kingsoft wps 256.cer
new file mode 100644
index 0000000..35a66de
Binary files /dev/null and b/src/MalwarePatch/Certificates/kingsoft wps 256.cer differ
diff --git a/src/MalwarePatch/Certificates/kingsoft wps.cer b/src/MalwarePatch/Certificates/kingsoft wps.cer
new file mode 100644
index 0000000..4f9b3de
Binary files /dev/null and b/src/MalwarePatch/Certificates/kingsoft wps.cer differ
diff --git a/src/MalwarePatch/Certificates/kingsoft ws.cer b/src/MalwarePatch/Certificates/kingsoft ws.cer
new file mode 100644
index 0000000..ebe7e00
Binary files /dev/null and b/src/MalwarePatch/Certificates/kingsoft ws.cer differ
diff --git a/src/MalwarePatch/Certificates/kingsoft.cer b/src/MalwarePatch/Certificates/kingsoft.cer
new file mode 100644
index 0000000..11264db
Binary files /dev/null and b/src/MalwarePatch/Certificates/kingsoft.cer differ
diff --git a/src/MalwarePatch/Certificates/kuaizip 256.cer b/src/MalwarePatch/Certificates/kuaizip 256.cer
new file mode 100644
index 0000000..f6a29d7
Binary files /dev/null and b/src/MalwarePatch/Certificates/kuaizip 256.cer differ
diff --git a/src/MalwarePatch/Certificates/kuaizip.cer b/src/MalwarePatch/Certificates/kuaizip.cer
new file mode 100644
index 0000000..daee517
Binary files /dev/null and b/src/MalwarePatch/Certificates/kuaizip.cer differ
diff --git a/src/MalwarePatch/Certificates/kugou.cer b/src/MalwarePatch/Certificates/kugou.cer
new file mode 100644
index 0000000..b9175f6
Binary files /dev/null and b/src/MalwarePatch/Certificates/kugou.cer differ
diff --git a/src/MalwarePatch/Certificates/kuwo.cer b/src/MalwarePatch/Certificates/kuwo.cer
new file mode 100644
index 0000000..2e88543
Binary files /dev/null and b/src/MalwarePatch/Certificates/kuwo.cer differ
diff --git a/src/MalwarePatch/Certificates/leshi 256.cer b/src/MalwarePatch/Certificates/leshi 256.cer
new file mode 100644
index 0000000..0415393
Binary files /dev/null and b/src/MalwarePatch/Certificates/leshi 256.cer differ
diff --git a/src/MalwarePatch/Certificates/leshi.cer b/src/MalwarePatch/Certificates/leshi.cer
new file mode 100644
index 0000000..0415393
Binary files /dev/null and b/src/MalwarePatch/Certificates/leshi.cer differ
diff --git a/src/MalwarePatch/Certificates/netease 256.cer b/src/MalwarePatch/Certificates/netease 256.cer
new file mode 100644
index 0000000..34bb876
Binary files /dev/null and b/src/MalwarePatch/Certificates/netease 256.cer differ
diff --git a/src/MalwarePatch/Certificates/netease youdao.cer b/src/MalwarePatch/Certificates/netease youdao.cer
new file mode 100644
index 0000000..542a81c
Binary files /dev/null and b/src/MalwarePatch/Certificates/netease youdao.cer differ
diff --git a/src/MalwarePatch/Certificates/netease.cer b/src/MalwarePatch/Certificates/netease.cer
new file mode 100644
index 0000000..34bb876
Binary files /dev/null and b/src/MalwarePatch/Certificates/netease.cer differ
diff --git a/src/MalwarePatch/Certificates/pplive 256.cer b/src/MalwarePatch/Certificates/pplive 256.cer
new file mode 100644
index 0000000..efa58c7
Binary files /dev/null and b/src/MalwarePatch/Certificates/pplive 256.cer differ
diff --git a/src/MalwarePatch/Certificates/pplive.cer b/src/MalwarePatch/Certificates/pplive.cer
new file mode 100644
index 0000000..ad0178a
Binary files /dev/null and b/src/MalwarePatch/Certificates/pplive.cer differ
diff --git a/src/MalwarePatch/Certificates/pptv 2019.1.cer b/src/MalwarePatch/Certificates/pptv 2019.1.cer
new file mode 100644
index 0000000..bede640
Binary files /dev/null and b/src/MalwarePatch/Certificates/pptv 2019.1.cer differ
diff --git a/src/MalwarePatch/Certificates/pptv 256.2019.1.cer b/src/MalwarePatch/Certificates/pptv 256.2019.1.cer
new file mode 100644
index 0000000..be20f60
Binary files /dev/null and b/src/MalwarePatch/Certificates/pptv 256.2019.1.cer differ
diff --git a/src/MalwarePatch/Certificates/pptv 256.cer b/src/MalwarePatch/Certificates/pptv 256.cer
new file mode 100644
index 0000000..2fe4a55
Binary files /dev/null and b/src/MalwarePatch/Certificates/pptv 256.cer differ
diff --git a/src/MalwarePatch/Certificates/pptv.cer b/src/MalwarePatch/Certificates/pptv.cer
new file mode 100644
index 0000000..379da62
Binary files /dev/null and b/src/MalwarePatch/Certificates/pptv.cer differ
diff --git a/src/MalwarePatch/Certificates/qiyi 256.cer b/src/MalwarePatch/Certificates/qiyi 256.cer
new file mode 100644
index 0000000..50d2c95
Binary files /dev/null and b/src/MalwarePatch/Certificates/qiyi 256.cer differ
diff --git a/src/MalwarePatch/Certificates/qiyi.cer b/src/MalwarePatch/Certificates/qiyi.cer
new file mode 100644
index 0000000..dcad515
Binary files /dev/null and b/src/MalwarePatch/Certificates/qiyi.cer differ
diff --git a/src/MalwarePatch/Certificates/rising 2018.9.cer b/src/MalwarePatch/Certificates/rising 2018.9.cer
new file mode 100644
index 0000000..4d55db4
Binary files /dev/null and b/src/MalwarePatch/Certificates/rising 2018.9.cer differ
diff --git a/src/MalwarePatch/Certificates/rising 2019.8.cer b/src/MalwarePatch/Certificates/rising 2019.8.cer
new file mode 100644
index 0000000..79cd497
Binary files /dev/null and b/src/MalwarePatch/Certificates/rising 2019.8.cer differ
diff --git a/src/MalwarePatch/Certificates/rising 256.2018.9.cer b/src/MalwarePatch/Certificates/rising 256.2018.9.cer
new file mode 100644
index 0000000..6b799cd
Binary files /dev/null and b/src/MalwarePatch/Certificates/rising 256.2018.9.cer differ
diff --git a/src/MalwarePatch/Certificates/rising 256.2019.8.cer b/src/MalwarePatch/Certificates/rising 256.2019.8.cer
new file mode 100644
index 0000000..46f09fc
Binary files /dev/null and b/src/MalwarePatch/Certificates/rising 256.2019.8.cer differ
diff --git a/src/MalwarePatch/Certificates/rising 256.cer b/src/MalwarePatch/Certificates/rising 256.cer
new file mode 100644
index 0000000..977e11b
Binary files /dev/null and b/src/MalwarePatch/Certificates/rising 256.cer differ
diff --git a/src/MalwarePatch/Certificates/rising.cer b/src/MalwarePatch/Certificates/rising.cer
new file mode 100644
index 0000000..18f2ec4
Binary files /dev/null and b/src/MalwarePatch/Certificates/rising.cer differ
diff --git a/src/MalwarePatch/Certificates/riyue (at) 256.cer b/src/MalwarePatch/Certificates/riyue (at) 256.cer
new file mode 100644
index 0000000..f74801a
Binary files /dev/null and b/src/MalwarePatch/Certificates/riyue (at) 256.cer differ
diff --git a/src/MalwarePatch/Certificates/riyue (at).cer b/src/MalwarePatch/Certificates/riyue (at).cer
new file mode 100644
index 0000000..c51fc90
Binary files /dev/null and b/src/MalwarePatch/Certificates/riyue (at).cer differ
diff --git a/src/MalwarePatch/Certificates/ruanmei 256.2019.1.cer b/src/MalwarePatch/Certificates/ruanmei 256.2019.1.cer
new file mode 100644
index 0000000..480eb64
Binary files /dev/null and b/src/MalwarePatch/Certificates/ruanmei 256.2019.1.cer differ
diff --git a/src/MalwarePatch/Certificates/ruanmei 256.cer b/src/MalwarePatch/Certificates/ruanmei 256.cer
new file mode 100644
index 0000000..81f35cb
Binary files /dev/null and b/src/MalwarePatch/Certificates/ruanmei 256.cer differ
diff --git a/src/MalwarePatch/Certificates/ruanmei.cer b/src/MalwarePatch/Certificates/ruanmei.cer
new file mode 100644
index 0000000..1cf3b0c
Binary files /dev/null and b/src/MalwarePatch/Certificates/ruanmei.cer differ
diff --git a/src/MalwarePatch/Certificates/sogou 2019.10.cer b/src/MalwarePatch/Certificates/sogou 2019.10.cer
new file mode 100644
index 0000000..89ca877
Binary files /dev/null and b/src/MalwarePatch/Certificates/sogou 2019.10.cer differ
diff --git a/src/MalwarePatch/Certificates/sogou 2019.8.cer b/src/MalwarePatch/Certificates/sogou 2019.8.cer
new file mode 100644
index 0000000..c8a2227
Binary files /dev/null and b/src/MalwarePatch/Certificates/sogou 2019.8.cer differ
diff --git a/src/MalwarePatch/Certificates/sogou 256.2019.10.cer b/src/MalwarePatch/Certificates/sogou 256.2019.10.cer
new file mode 100644
index 0000000..132dc53
Binary files /dev/null and b/src/MalwarePatch/Certificates/sogou 256.2019.10.cer differ
diff --git a/src/MalwarePatch/Certificates/sogou 256.2019.8.cer b/src/MalwarePatch/Certificates/sogou 256.2019.8.cer
new file mode 100644
index 0000000..132dc53
Binary files /dev/null and b/src/MalwarePatch/Certificates/sogou 256.2019.8.cer differ
diff --git a/src/MalwarePatch/Certificates/sogou 256.cer b/src/MalwarePatch/Certificates/sogou 256.cer
new file mode 100644
index 0000000..12f672a
Binary files /dev/null and b/src/MalwarePatch/Certificates/sogou 256.cer differ
diff --git a/src/MalwarePatch/Certificates/sogou.cer b/src/MalwarePatch/Certificates/sogou.cer
new file mode 100644
index 0000000..9560b0f
Binary files /dev/null and b/src/MalwarePatch/Certificates/sogou.cer differ
diff --git a/src/MalwarePatch/Certificates/sohu 2018.12.cer b/src/MalwarePatch/Certificates/sohu 2018.12.cer
new file mode 100644
index 0000000..293b17c
Binary files /dev/null and b/src/MalwarePatch/Certificates/sohu 2018.12.cer differ
diff --git a/src/MalwarePatch/Certificates/sohu.cer b/src/MalwarePatch/Certificates/sohu.cer
new file mode 100644
index 0000000..0015e1c
Binary files /dev/null and b/src/MalwarePatch/Certificates/sohu.cer differ
diff --git a/src/MalwarePatch/Certificates/taobao 256.cer b/src/MalwarePatch/Certificates/taobao 256.cer
new file mode 100644
index 0000000..a5b658a
Binary files /dev/null and b/src/MalwarePatch/Certificates/taobao 256.cer differ
diff --git a/src/MalwarePatch/Certificates/taobao.cer b/src/MalwarePatch/Certificates/taobao.cer
new file mode 100644
index 0000000..2e16c27
Binary files /dev/null and b/src/MalwarePatch/Certificates/taobao.cer differ
diff --git a/src/MalwarePatch/Certificates/tencent 2018.11.cer b/src/MalwarePatch/Certificates/tencent 2018.11.cer
new file mode 100644
index 0000000..e943e56
Binary files /dev/null and b/src/MalwarePatch/Certificates/tencent 2018.11.cer differ
diff --git a/src/MalwarePatch/Certificates/tencent 256.2018.11.cer b/src/MalwarePatch/Certificates/tencent 256.2018.11.cer
new file mode 100644
index 0000000..f8d1fb0
Binary files /dev/null and b/src/MalwarePatch/Certificates/tencent 256.2018.11.cer differ
diff --git a/src/MalwarePatch/Certificates/tencent 256.cer b/src/MalwarePatch/Certificates/tencent 256.cer
new file mode 100644
index 0000000..dc191fb
Binary files /dev/null and b/src/MalwarePatch/Certificates/tencent 256.cer differ
diff --git a/src/MalwarePatch/Certificates/tencent.cer b/src/MalwarePatch/Certificates/tencent.cer
new file mode 100644
index 0000000..d8e020c
Binary files /dev/null and b/src/MalwarePatch/Certificates/tencent.cer differ
diff --git a/src/MalwarePatch/Certificates/thunder 2018.9.cer b/src/MalwarePatch/Certificates/thunder 2018.9.cer
new file mode 100644
index 0000000..6e89acf
Binary files /dev/null and b/src/MalwarePatch/Certificates/thunder 2018.9.cer differ
diff --git a/src/MalwarePatch/Certificates/thunder 2020.1.cer b/src/MalwarePatch/Certificates/thunder 2020.1.cer
new file mode 100644
index 0000000..734157f
Binary files /dev/null and b/src/MalwarePatch/Certificates/thunder 2020.1.cer differ
diff --git a/src/MalwarePatch/Certificates/thunder 256.2018.9.cer b/src/MalwarePatch/Certificates/thunder 256.2018.9.cer
new file mode 100644
index 0000000..6e89acf
Binary files /dev/null and b/src/MalwarePatch/Certificates/thunder 256.2018.9.cer differ
diff --git a/src/MalwarePatch/Certificates/thunder 256.2020.1.cer b/src/MalwarePatch/Certificates/thunder 256.2020.1.cer
new file mode 100644
index 0000000..734157f
Binary files /dev/null and b/src/MalwarePatch/Certificates/thunder 256.2020.1.cer differ
diff --git a/src/MalwarePatch/Certificates/thunder 256.cer b/src/MalwarePatch/Certificates/thunder 256.cer
new file mode 100644
index 0000000..f5f54f6
Binary files /dev/null and b/src/MalwarePatch/Certificates/thunder 256.cer differ
diff --git a/src/MalwarePatch/Certificates/thunder accel 256.cer b/src/MalwarePatch/Certificates/thunder accel 256.cer
new file mode 100644
index 0000000..db03557
Binary files /dev/null and b/src/MalwarePatch/Certificates/thunder accel 256.cer differ
diff --git a/src/MalwarePatch/Certificates/thunder accel.cer b/src/MalwarePatch/Certificates/thunder accel.cer
new file mode 100644
index 0000000..db03557
Binary files /dev/null and b/src/MalwarePatch/Certificates/thunder accel.cer differ
diff --git a/src/MalwarePatch/Certificates/thunder game 256.2018.7.8.cer b/src/MalwarePatch/Certificates/thunder game 256.2018.7.8.cer
new file mode 100644
index 0000000..8d4e16e
Binary files /dev/null and b/src/MalwarePatch/Certificates/thunder game 256.2018.7.8.cer differ
diff --git a/src/MalwarePatch/Certificates/thunder game 256.cer b/src/MalwarePatch/Certificates/thunder game 256.cer
new file mode 100644
index 0000000..96e1937
Binary files /dev/null and b/src/MalwarePatch/Certificates/thunder game 256.cer differ
diff --git a/src/MalwarePatch/Certificates/thunder game.2018.7.8.cer b/src/MalwarePatch/Certificates/thunder game.2018.7.8.cer
new file mode 100644
index 0000000..8d4e16e
Binary files /dev/null and b/src/MalwarePatch/Certificates/thunder game.2018.7.8.cer differ
diff --git a/src/MalwarePatch/Certificates/thunder game.cer b/src/MalwarePatch/Certificates/thunder game.cer
new file mode 100644
index 0000000..96e1937
Binary files /dev/null and b/src/MalwarePatch/Certificates/thunder game.cer differ
diff --git a/src/MalwarePatch/Certificates/thunder player 2018.12.cer b/src/MalwarePatch/Certificates/thunder player 2018.12.cer
new file mode 100644
index 0000000..bb45850
Binary files /dev/null and b/src/MalwarePatch/Certificates/thunder player 2018.12.cer differ
diff --git a/src/MalwarePatch/Certificates/thunder player 256.2018.12.cer b/src/MalwarePatch/Certificates/thunder player 256.2018.12.cer
new file mode 100644
index 0000000..bb45850
Binary files /dev/null and b/src/MalwarePatch/Certificates/thunder player 256.2018.12.cer differ
diff --git a/src/MalwarePatch/Certificates/thunder player 256.cer b/src/MalwarePatch/Certificates/thunder player 256.cer
new file mode 100644
index 0000000..57e5120
Binary files /dev/null and b/src/MalwarePatch/Certificates/thunder player 256.cer differ
diff --git a/src/MalwarePatch/Certificates/thunder player.cer b/src/MalwarePatch/Certificates/thunder player.cer
new file mode 100644
index 0000000..57e5120
Binary files /dev/null and b/src/MalwarePatch/Certificates/thunder player.cer differ
diff --git a/src/MalwarePatch/Certificates/thunder.cer b/src/MalwarePatch/Certificates/thunder.cer
new file mode 100644
index 0000000..38ad98c
Binary files /dev/null and b/src/MalwarePatch/Certificates/thunder.cer differ
diff --git a/src/MalwarePatch/Certificates/xingcheng (at) 256.cer b/src/MalwarePatch/Certificates/xingcheng (at) 256.cer
new file mode 100644
index 0000000..81a8895
Binary files /dev/null and b/src/MalwarePatch/Certificates/xingcheng (at) 256.cer differ
diff --git a/src/MalwarePatch/Certificates/xingcheng (at).cer b/src/MalwarePatch/Certificates/xingcheng (at).cer
new file mode 100644
index 0000000..796de1d
Binary files /dev/null and b/src/MalwarePatch/Certificates/xingcheng (at).cer differ
diff --git a/src/MalwarePatch/Certificates/youku 2018.8.cer b/src/MalwarePatch/Certificates/youku 2018.8.cer
new file mode 100644
index 0000000..ed82e27
Binary files /dev/null and b/src/MalwarePatch/Certificates/youku 2018.8.cer differ
diff --git a/src/MalwarePatch/Certificates/youku 256.2018.8.cer b/src/MalwarePatch/Certificates/youku 256.2018.8.cer
new file mode 100644
index 0000000..6fcb921
Binary files /dev/null and b/src/MalwarePatch/Certificates/youku 256.2018.8.cer differ
diff --git a/src/MalwarePatch/Certificates/youku 256.cer b/src/MalwarePatch/Certificates/youku 256.cer
new file mode 100644
index 0000000..22fad9e
Binary files /dev/null and b/src/MalwarePatch/Certificates/youku 256.cer differ
diff --git a/src/MalwarePatch/Certificates/youku.cer b/src/MalwarePatch/Certificates/youku.cer
new file mode 100644
index 0000000..113a8c4
Binary files /dev/null and b/src/MalwarePatch/Certificates/youku.cer differ
diff --git a/src/MalwarePatch/Certificates/yy 2018.12.cer b/src/MalwarePatch/Certificates/yy 2018.12.cer
new file mode 100644
index 0000000..01d763d
Binary files /dev/null and b/src/MalwarePatch/Certificates/yy 2018.12.cer differ
diff --git a/src/MalwarePatch/Certificates/yy 2020.1.cer b/src/MalwarePatch/Certificates/yy 2020.1.cer
new file mode 100644
index 0000000..e0b21e1
Binary files /dev/null and b/src/MalwarePatch/Certificates/yy 2020.1.cer differ
diff --git a/src/MalwarePatch/Certificates/yy 256.2018.12.cer b/src/MalwarePatch/Certificates/yy 256.2018.12.cer
new file mode 100644
index 0000000..01d763d
Binary files /dev/null and b/src/MalwarePatch/Certificates/yy 256.2018.12.cer differ
diff --git a/src/MalwarePatch/Certificates/yy 256.2020.1.cer b/src/MalwarePatch/Certificates/yy 256.2020.1.cer
new file mode 100644
index 0000000..e0b21e1
Binary files /dev/null and b/src/MalwarePatch/Certificates/yy 256.2020.1.cer differ
diff --git a/src/MalwarePatch/Certificates/yy 256.cer b/src/MalwarePatch/Certificates/yy 256.cer
new file mode 100644
index 0000000..dc2dd68
Binary files /dev/null and b/src/MalwarePatch/Certificates/yy 256.cer differ
diff --git a/src/MalwarePatch/Certificates/yy browser.cer b/src/MalwarePatch/Certificates/yy browser.cer
new file mode 100644
index 0000000..e3959cd
Binary files /dev/null and b/src/MalwarePatch/Certificates/yy browser.cer differ
diff --git a/src/MalwarePatch/Certificates/yy.cer b/src/MalwarePatch/Certificates/yy.cer
new file mode 100644
index 0000000..51938d5
Binary files /dev/null and b/src/MalwarePatch/Certificates/yy.cer differ
diff --git a/src/MalwarePatch/CliTools/MalwareChecker.cs b/src/MalwarePatch/CliTools/MalwareChecker.cs
new file mode 100644
index 0000000..c1f0540
--- /dev/null
+++ b/src/MalwarePatch/CliTools/MalwareChecker.cs
@@ -0,0 +1,276 @@
+using Ace;
+using Ace.Files;
+using Ace.Files.Json;
+using Ace.Wpf.Mvvm;
+using MalwarePatch.Windows.Check;
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Net;
+using System.Net.Mime;
+using System.Security.Cryptography;
+using System.Security.Cryptography.X509Certificates;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Windows.Shell;
+
+namespace MalwarePatch.CliTools
+{
+ class MalwareCheckException : Exception
+ {
+ public MalwareCheckException(string message) : base(message) { }
+ public MalwareCheckException() : base() { }
+ }
+ class MalwareChecker
+ {
+ private const string InfoPath = @"assets/malware-remote-info.json";
+ private const string UserAgent = @"Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.81 Safari/537.36";
+ private readonly JsonObject infoObject;
+ private readonly StringBuilder stringBuilder = new StringBuilder();
+ private readonly bool clean = false;
+ private const string LogFileName = "mwp-check.log";
+ private double downloadedCount = 0;
+
+ public MalwareChecker(bool clean = false)
+ {
+ this.clean = clean;
+ infoObject = JsonObject.Parse(AppResource.GetResourceData(InfoPath).ToString(true));
+ }
+ public static bool TryParse(string[] args)
+ {
+ if (args.Length == 0)
+ {
+ return false;
+ }
+ if (args[0].EqualsIgnoreCase("--malware-check"))
+ {
+ new CheckWindow(args.Length > 1 && args[1] == "--clean").ShowDialog();
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+ }
+ public MalwareCheckerModel Model { get; } = new MalwareCheckerModel();
+ public bool Debug { get; set; } = false;
+ public Task Start()
+ {
+ stringBuilder.Clear();
+ downloadedCount = 0;
+ Model.ProgressState = TaskbarItemProgressState.Normal;
+ log("Malware checker started");
+ return Task.Run(() =>
+ {
+ Parallel.ForEach(infoObject, property => downloadCategory(property));
+ // infoObject.ForEach(property => downloadCategory(property));
+ Stop();
+ });
+ }
+ public void Stop()
+ {
+ log("Malware checker completed");
+ Model.ProgressState = TaskbarItemProgressState.None;
+ lock (stringBuilder)
+ {
+ File.WriteAllText(LogFileName, stringBuilder.ToString());
+ }
+ }
+ private void log(string message)
+ {
+ lock (stringBuilder)
+ {
+ stringBuilder
+ .Append($"[{DateTime.Now.ToString()}] ")
+ .Append(message)
+ .Append(Environment.NewLine);
+ System.Diagnostics.Debug.WriteLine(message);
+ }
+ }
+ private void error(string message)
+ {
+ lock (stringBuilder)
+ {
+ stringBuilder
+ .Append(Environment.NewLine)
+ .Append($"[{DateTime.Now.ToString()}] ")
+ .Append(message)
+ .Append(Environment.NewLine)
+ .Append(Environment.NewLine);
+ System.Diagnostics.Debug.WriteLine(message);
+ }
+ }
+ private void downloadCategory(JsonProperty category)
+ {
+ try
+ {
+ Model.Message = $"Downloading: {category.Name}";
+ downloadFixedUrl(category.ObjectValue["fixed"].ArrayValue);
+ // log($"Downloaded fixed urls of {category.Name}");
+ downloadRegexUrl(category.ObjectValue["match"].ArrayValue);
+ // log($"Downloaded regex urls of {category.Name}");
+ downloadedCount++;
+ Model.ProgressValue = downloadedCount / infoObject.Count;
+ }
+ catch (Exception ex)
+ when (ex is MalwareCheckException || ex is WebException /*|| ex is CryptographicException*/)
+ {
+ error($"Error downloading {category.Name}: {ex.Message}");
+ }
+ }
+ private void downloadUrl(string url)
+ {
+ if (!Debug)
+ {
+ using (var webClient = new WebClient())
+ {
+ if (url.StartsWith("//"))
+ {
+ url = "http:" + url;
+ }
+ webClient.Headers["user-agent"] = UserAgent;
+ var filename = url.GetHashCode().ToString() + ".exe";
+ if (!File.Exists(filename))
+ {
+ var data = webClient.DownloadData(url);
+ File.WriteAllBytes(filename, data);
+ log($"Downloaded: {url}");
+ }
+ else
+ {
+ log($"Already downloaded: {url}");
+ }
+ verifyCertificate(filename);
+ }
+ }
+ else
+ {
+ // Thread.Sleep(3000);
+ log($"Debug download: {url}");
+ }
+ }
+ private void verifyCertificate(string path)
+ {
+ var disallowed = false;
+ try
+ {
+ var certificate = new CertificateFile(new X509Certificate2(path));
+ disallowed = certificate.IsDisallowed;
+ certificate.Dispose();
+ }
+ catch (CryptographicException ex)
+ {
+ error($"Certificate error: {ex.Message}, path={path}");
+ }
+
+ if (disallowed)
+ {
+ if (clean)
+ {
+ try
+ {
+ File.Delete(path);
+ log($"Verified {path}: Disallowed and deleted.");
+ }
+ catch (Exception ex)
+ {
+ error($"Error deleting file {path}: {ex.Message}");
+ }
+ }
+ else
+ {
+ log($"Verified {path}: Disallowed.");
+ }
+ }
+ else
+ {
+ log($"Verified {path}: NOT disallowed.");
+ }
+ }
+ private void downloadFixedUrl(JsonArray array)
+ {
+ array.ToStringList().ForEach(url => downloadUrl(url));
+ }
+ private void downloadRegexUrl(JsonArray array)
+ {
+ foreach (var matchInfo in array.ToObjectList())
+ {
+ var url = matchInfo["url"].StringValue;
+ var html = "";
+ try
+ {
+ using (var webClient = new WebClient())
+ {
+ webClient.Headers["user-agent"] = UserAgent;
+ webClient.Encoding = Encoding.UTF8;
+ html = webClient.DownloadString(url);
+ }
+ var regex = matchInfo["regex"].StringValue;
+ var match = html.Match(regex);
+ var group = decimal.ToInt32(matchInfo["group"].NumberValue.Value);
+ if (match.Success)
+ {
+ if (match.Groups.Count > group - 1)
+ {
+ var matchedUrl = match.Groups[group].Value;
+ downloadUrl(matchedUrl);
+ }
+ else
+ {
+ throw new MalwareCheckException($"Regex group not found for {url}, group = {group}");
+ }
+ }
+ else
+ {
+ throw new MalwareCheckException($"Regex match for {url} failed, regex = {regex}");
+ }
+ }
+ catch (Exception ex)
+ when (ex is MalwareCheckException || ex is WebException/* || ex is CryptographicException*/)
+ {
+ error($"Error fetching {url}: {ex.Message}");
+ File.WriteAllText($"{url.GetHashCode()}.html", html);
+ }
+ }
+
+ }
+ }
+ class MalwareCheckerModel : NotificationObject
+ {
+
+ private string message = "";
+ public string Message
+ {
+ get => message;
+ set
+ {
+ message = value;
+ OnPropertyChanged(nameof(Message));
+ }
+ }
+
+ private double progressValue = 0.0;
+ public double ProgressValue
+ {
+ get => progressValue;
+ set
+ {
+ progressValue = value;
+ OnPropertyChanged(nameof(ProgressValue));
+ }
+ }
+
+ private TaskbarItemProgressState progressState = TaskbarItemProgressState.None;
+ public TaskbarItemProgressState ProgressState
+ {
+ get => progressState;
+ set
+ {
+ progressState = value;
+ OnPropertyChanged(nameof(ProgressState));
+ }
+ }
+ }
+}
diff --git a/src/MalwarePatch/CliTools/SilentUpdater.cs b/src/MalwarePatch/CliTools/SilentUpdater.cs
new file mode 100644
index 0000000..f06ff71
--- /dev/null
+++ b/src/MalwarePatch/CliTools/SilentUpdater.cs
@@ -0,0 +1,122 @@
+using Ace;
+using MalwarePatch.Models;
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.IO;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace MalwarePatch.CliTools
+{
+ internal class SilentUpdater
+ {
+ public const string
+ SilentUpdateParameter = "--silent-update",
+ DisallowAllParameter = "--disallow-all",
+ AllowAllParameter = "--allow-all",
+ ProxyParameter = "--proxy";
+
+ public static bool TryParse(string[] args)
+ {
+ var dictionary = string.Join(" ", args).SplitToDictionary(" ", "=", true);
+ var proxy = null as string;
+ //if (dictionary.ContainsKey(ProxyParameter))
+ //{
+ // proxy = dictionary[ProxyParameter];
+ //}
+
+ try
+ {
+ if (dictionary.ContainsKey(SilentUpdateParameter))
+ {
+ Update(dictionary, proxy)?.Wait();
+ }
+ else if (dictionary.ContainsKey(DisallowAllParameter))
+ {
+ DisallowAll().Wait();
+ }
+ else if (dictionary.ContainsKey(AllowAllParameter))
+ {
+ AllowAll().Wait();
+ }
+ else
+ {
+ return false;
+ }
+ }
+ catch
+ {
+ return false;
+ }
+
+ return true;
+ }
+ public static Task Update(Dictionary dictionary, string proxy = null)
+ {
+ var checker = new VersionChecker
+ {
+ Proxy = proxy
+ };
+ if (checker.HasNewVersion)
+ {
+ return Task.Run(() =>
+ {
+ var arguments = new Dictionary
+ {
+ { Updater.RestartParameter, null }
+ };
+ arguments.AddRange(dictionary);
+ arguments.Remove(SilentUpdateParameter);
+
+ var finalArguments = string.Join(" ", arguments.Select(item =>
+ {
+ if (item.Value is null)
+ {
+ return item.Key;
+ }
+ else
+ {
+ return $"{item.Key}={item.Value}";
+ }
+ }));
+ var updater = new Updater
+ {
+ Proxy = proxy,
+ RestartParameters = finalArguments == Updater.RestartParameter ? "" : finalArguments
+ };
+ updater.DownloadUpdate().Wait();
+ if (File.Exists(Updater.UpdateFileName))
+ {
+ var startInfo = new ProcessStartInfo(Updater.UpdateFileName)
+ {
+ Arguments = $"{Updater.UpdateParameter}={(Process.GetCurrentProcess().MainModule.FileName.GetFileName()).Quotes()} {updater.RestartParameters}",
+ WorkingDirectory = Environment.CurrentDirectory,
+ UseShellExecute = false,
+ };
+ Process.Start(startInfo);
+ }
+ });
+ }
+ else
+ {
+ return null;
+ }
+ }
+ public static Task DisallowAll()
+ {
+ return Task.Run(() =>
+ {
+ BuiltInCertificates.All.ForEach(c => c.Disallow());
+ });
+ }
+ public static Task AllowAll()
+ {
+ return Task.Run(() =>
+ {
+ BuiltInCertificates.All.ForEach(c => c.Allow());
+ });
+ }
+ }
+}
diff --git a/src/MalwarePatch/CliTools/UserCertificateCli.cs b/src/MalwarePatch/CliTools/UserCertificateCli.cs
new file mode 100644
index 0000000..29d72a2
--- /dev/null
+++ b/src/MalwarePatch/CliTools/UserCertificateCli.cs
@@ -0,0 +1,56 @@
+using Ace;
+using Ace.Files;
+using MalwarePatch.Commands;
+using MalwarePatch.Models;
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Security.Cryptography;
+using System.Security.Cryptography.X509Certificates;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+
+namespace MalwarePatch.CliTools
+{
+ static class UserCertificateCli
+ {
+ private const string disallowKey = "--disallow", allowKey = "--allow";
+ public static bool TryParse(string[] args)
+ {
+ if (args.Length == 0)
+ {
+ return false;
+ }
+ var dict = string.Join(",", args).ToLowerInvariant().SplitToDictionary(",", "=", true);
+ if (dict.ContainsKey(disallowKey))
+ {
+ var filename = dict[disallowKey]?.NoQuotes();
+ if (filename is null)
+ {
+ new UserCertificateCommand(allow: false, null).Execute();
+ }
+ else
+ {
+ new UserCertificate(filename).Disallow();
+ }
+ return true;
+ }
+ if (dict.ContainsKey(allowKey))
+ {
+ var filename = dict[allowKey]?.NoQuotes();
+ if (filename is null)
+ {
+ new UserCertificateCommand(allow: true, null).Execute();
+ }
+ else
+ {
+ new UserCertificate(filename).Allow();
+ }
+ return true;
+ }
+ return false;
+ }
+ }
+}
diff --git a/src/MalwarePatch/Commands/BatchCheckCommand.cs b/src/MalwarePatch/Commands/BatchCheckCommand.cs
new file mode 100644
index 0000000..aebf4ec
--- /dev/null
+++ b/src/MalwarePatch/Commands/BatchCheckCommand.cs
@@ -0,0 +1,35 @@
+using MalwarePatch.Models;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Controls;
+using System.Windows.Controls.Primitives;
+using System.Windows.Input;
+
+namespace MalwarePatch.Commands
+{
+ sealed class BatchCheckCommand : ICommand
+ {
+ private readonly bool checkValue;
+ private readonly IEnumerable certificates;
+ public BatchCheckCommand(bool checkValue, IEnumerable certificates)
+ {
+ this.checkValue = checkValue;
+ this.certificates = certificates;
+ }
+
+ public event EventHandler CanExecuteChanged;
+ private void invokeCanExecuteChanged() => CanExecuteChanged?.Invoke(this, EventArgs.Empty);
+
+ public bool CanExecute(object parameter) => certificates.Count() != 0;
+ public void Execute(object parameter)
+ {
+ foreach (var certificate in certificates)
+ {
+ certificate.IsAllowed = checkValue;
+ }
+ }
+ }
+}
diff --git a/src/MalwarePatch/Commands/DirectCommand.cs b/src/MalwarePatch/Commands/DirectCommand.cs
new file mode 100644
index 0000000..fe25fbf
--- /dev/null
+++ b/src/MalwarePatch/Commands/DirectCommand.cs
@@ -0,0 +1,19 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Input;
+
+namespace MalwarePatch.Commands
+{
+ class DirectCommand : ICommand
+ {
+ public event EventHandler CanExecuteChanged;
+ private void onCanExecuteChanged() => CanExecuteChanged?.Invoke(this, EventArgs.Empty);
+ public Func