From 520b7db8f96417bfba72d204cfdf22fcc6b8ea1b Mon Sep 17 00:00:00 2001 From: huiyadanli Date: Thu, 2 Jan 2020 23:52:16 +0800 Subject: [PATCH] =?UTF-8?q?[+]=20=E4=BC=98=E5=8C=96=E7=89=B9=E5=BE=81?= =?UTF-8?q?=E7=A0=81=E6=92=A4=E5=9B=9E=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- RevokeMsgPatcher/FormMain.cs | 21 ++--- RevokeMsgPatcher/Matcher/FuzzyMatcher.cs | 2 +- RevokeMsgPatcher/Matcher/ModifyFinder.cs | 92 +++++++++++++++++++ RevokeMsgPatcher/Model/Enum/PatchType.cs | 18 ---- RevokeMsgPatcher/Modifier/AppModifier.cs | 88 +++++++++++------- RevokeMsgPatcher/Modifier/FileHexEditor.cs | 90 +++--------------- .../Properties/Resources.Designer.cs | 2 +- RevokeMsgPatcher/Properties/Resources.resx | 2 +- RevokeMsgPatcher/RevokeMsgPatcher.csproj | 2 +- 9 files changed, 170 insertions(+), 147 deletions(-) create mode 100644 RevokeMsgPatcher/Matcher/ModifyFinder.cs delete mode 100644 RevokeMsgPatcher/Model/Enum/PatchType.cs diff --git a/RevokeMsgPatcher/FormMain.cs b/RevokeMsgPatcher/FormMain.cs index 26bf354..545ce12 100644 --- a/RevokeMsgPatcher/FormMain.cs +++ b/RevokeMsgPatcher/FormMain.cs @@ -93,7 +93,6 @@ namespace RevokeMsgPatcher ga.RequestPageView($"{enName}/{version}/patch", "点击防撤回"); EnableAllButton(false); - PatchType type = PatchType.Accurate; // 两种打补丁的方式:精准(指定位置替换)、通用(特征码替换) // a.重新初始化编辑器 modifier.InitEditors(txtPath.Text); // b.计算SHA1,验证文件完整性,寻找对应的补丁信息(精确版本、通用特征码两种补丁信息) @@ -103,19 +102,11 @@ namespace RevokeMsgPatcher } catch (BusinessException ex) { - if ((ex.ErrorCode == "not_support" || ex.ErrorCode == "maybe_modified") && modifier.EditorsHasCommonModifyInfos()) - { - // 存在特征码修改替换信息的情况下,尝试使用特征码替换 - type = PatchType.Common; - } - else - { - ga.RequestPageView($"{enName}/{version}/patch/sha1/ex/{ex.ErrorCode}", ex.Message); - MessageBox.Show(ex.Message); - EnableAllButton(true); - btnRestore.Enabled = modifier.BackupExists(); - return; - } + ga.RequestPageView($"{enName}/{version}/patch/sha1/ex/{ex.ErrorCode}", ex.Message); + MessageBox.Show(ex.Message); + EnableAllButton(true); + btnRestore.Enabled = modifier.BackupExists(); + return; } catch (IOException ex) { @@ -137,7 +128,7 @@ namespace RevokeMsgPatcher // c.打补丁 try { - modifier.Patch(type); + modifier.Patch(); ga.RequestPageView($"{enName}/{version}/patch/succ", "防撤回成功"); MessageBox.Show("补丁安装成功!"); } diff --git a/RevokeMsgPatcher/Matcher/FuzzyMatcher.cs b/RevokeMsgPatcher/Matcher/FuzzyMatcher.cs index bdae586..5e46bb3 100644 --- a/RevokeMsgPatcher/Matcher/FuzzyMatcher.cs +++ b/RevokeMsgPatcher/Matcher/FuzzyMatcher.cs @@ -106,7 +106,7 @@ namespace RevokeMsgPatcher.Matcher /// 头串匹配位置 /// 完整查找串 /// - private static bool IsEqual(byte[] content, int start, byte[] whole) + public static bool IsEqual(byte[] content, int start, byte[] whole) { int i = 0; for (i = 0; i < whole.Length; i++) diff --git a/RevokeMsgPatcher/Matcher/ModifyFinder.cs b/RevokeMsgPatcher/Matcher/ModifyFinder.cs new file mode 100644 index 0000000..29ffc27 --- /dev/null +++ b/RevokeMsgPatcher/Matcher/ModifyFinder.cs @@ -0,0 +1,92 @@ +using RevokeMsgPatcher.Model; +using System.Collections.Generic; +using System.IO; + +namespace RevokeMsgPatcher.Matcher +{ + public class ModifyFinder + { + public static List FindChanges(string path, List replacePatterns) + { + // 读取整个文件(dll) + byte[] fileByteArray = File.ReadAllBytes(path); + + List changes = new List(); + + // 查找所有替换点 + int matchNum = 0; + foreach (ReplacePattern pattern in replacePatterns) + { + // 所有的匹配点位 + int[] matchIndexs = FuzzyMatcher.MatchAll(fileByteArray, pattern.Search); + if (matchIndexs.Length == 1) + { + matchNum++; + // 与要替换的串不一样才需要替换(当前的特征肯定不一样) + if (!FuzzyMatcher.IsEqual(fileByteArray, matchIndexs[0], pattern.Replace)) + { + changes.Add(new Change(matchIndexs[0], pattern.Replace)); + } + } + } + + // 匹配数和期望的匹配数不一致时报错(当前一个特征只会出现一次) + if (matchNum != replacePatterns.Count) + { + if (IsAllReplaced(fileByteArray, replacePatterns)) + { + throw new BusinessException("match_already_replace", "特征比对:当前应用已经安装了防撤回补丁!"); + } + else + { + throw new BusinessException("match_inconformity", $"特征比对:当前特征码匹配数[{matchNum}]和期望的匹配数[{replacePatterns.Count}]不一致,如果当前版本为新版本,特征码可能出现变化,请联系作者处理!"); + } + } + else + { + // 匹配数和需要替换的数量不一致时,可能时部分/所有特征已经被替换 + if (matchNum != changes.Count) + { + // 此逻辑在当前特征配置下不会进入,因为查找串和替换串当前全部都是不相同的 + if (changes.Count == 0) + { + throw new BusinessException("match_already_replace", "特征比对:当前应用已经安装了防撤回补丁!"); + } + else + { + throw new BusinessException("match_part_replace", "特征比对:部分特征已经被替换,请确认是否有使用过其他防撤回补丁!"); + } + + } + else + { + // 匹配数和需要替换的数量一致时才是正常状态 + return changes; + } + } + return null; + } + + private static bool IsAllReplaced(byte[] fileByteArray, List replacePatterns) + { + int matchNum = 0; + foreach (ReplacePattern pattern in replacePatterns) + { + // 所有的匹配点位 + int[] matchIndexs = FuzzyMatcher.MatchAll(fileByteArray, pattern.Replace); + if (matchIndexs.Length == 1) + { + matchNum++; + } + } + if (matchNum == replacePatterns.Count) + { + return true; + } + else + { + return false; + } + } + } +} diff --git a/RevokeMsgPatcher/Model/Enum/PatchType.cs b/RevokeMsgPatcher/Model/Enum/PatchType.cs deleted file mode 100644 index 4b9a211..0000000 --- a/RevokeMsgPatcher/Model/Enum/PatchType.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace RevokeMsgPatcher.Model.Enum -{ - /// - /// 两种打补丁的方式 - /// 精准(指定位置替换)、通用(特征码替换) - /// - public enum PatchType - { - Accurate, // 精准(指定位置替换) - Common // 通用(特征码替换) - } -} diff --git a/RevokeMsgPatcher/Modifier/AppModifier.cs b/RevokeMsgPatcher/Modifier/AppModifier.cs index a58bc27..9290403 100644 --- a/RevokeMsgPatcher/Modifier/AppModifier.cs +++ b/RevokeMsgPatcher/Modifier/AppModifier.cs @@ -1,4 +1,5 @@ -using RevokeMsgPatcher.Model; +using RevokeMsgPatcher.Matcher; +using RevokeMsgPatcher.Model; using RevokeMsgPatcher.Model.Enum; using System; using System.Collections.Generic; @@ -168,10 +169,28 @@ namespace RevokeMsgPatcher.Modifier return false; } + /// + /// 寻找版本对应的特征码信息 + /// + /// 文件编辑器 + private CommonModifyInfo FindCommonModifyInfo(FileHexEditor editor) + { + foreach (CommonModifyInfo commonModifyInfo in config.FileCommonModifyInfos[editor.FileName]) + { + // editor.FileVersion 在 StartVersion 和 EndVersion 之间 + if (IsInVersionRange(editor.FileVersion, commonModifyInfo.StartVersion, commonModifyInfo.EndVersion)) + { + return commonModifyInfo; + } + } + return null; + } + /// /// 文件修改器是否已经有对应的特征码修改替换信息 /// /// + [Obsolete] public bool EditorsHasCommonModifyInfos() { int i = 0; @@ -238,24 +257,11 @@ namespace RevokeMsgPatcher.Modifier } } - // 多个版本范围,匹配出对应版本可以使用的特征 - if (config.FileCommonModifyInfos != null) - { - foreach (CommonModifyInfo commonModifyInfo in config.FileCommonModifyInfos[editor.FileName]) - { - // editor.FileVersion 在 StartVersion 和 EndVersion 之间 - if (IsInVersionRange(editor.FileVersion, commonModifyInfo.StartVersion, commonModifyInfo.EndVersion)) - { - editor.FileCommonModifyInfo = commonModifyInfo; - break; - } - } - } - // 补丁前SHA1匹配上,肯定是正确的dll if (matchingSHA1Before != null) { editor.FileModifyInfo = matchingSHA1Before; + editor.TargetChanges = matchingSHA1Before.Changes; continue; } // 补丁后SHA1匹配上,肯定已经打过补丁 @@ -263,15 +269,36 @@ namespace RevokeMsgPatcher.Modifier { throw new BusinessException("installed", $"你已经安装过此补丁!"); } - // 全部不匹配,说明不支持 - if (matchingSHA1Before == null && matchingSHA1After == null && matchingVersion == null) + + // SHA1不匹配说明精准替换肯定不支持 + if (matchingSHA1Before == null && matchingSHA1After == null) { - throw new BusinessException("not_support", $"不支持此版本:{editor.FileVersion}!"); - } - // SHA1不匹配,版本匹配,可能dll已经被其他补丁程序修改过 - if ((matchingSHA1Before == null && matchingSHA1After == null) && matchingVersion != null) - { - throw new BusinessException("maybe_modified", $"程序支持此版本:{editor.FileVersion}。但是文件校验不通过,请确认是否使用过其他补丁程序!"); + // 多个版本范围,匹配出对应版本可以使用的特征 + if (config.FileCommonModifyInfos != null) + { + editor.FileCommonModifyInfo = FindCommonModifyInfo(editor); + } + + // 存在对应的特征时不报错 + if (editor.FileCommonModifyInfo != null && editor.FileCommonModifyInfo.ReplacePatterns != null) + { + // 如果能顺利得到 TargetChanges 不报错则可以使用特征替换方式 + editor.TargetChanges = ModifyFinder.FindChanges(editor.FilePath, editor.FileCommonModifyInfo.ReplacePatterns); + continue; + } + else + { + // SHA1不匹配,连版本也不匹配,说明完全不支持 + if (matchingVersion == null) + { + throw new BusinessException("not_support", $"不支持此版本:{editor.FileVersion}!"); + } + // SHA1不匹配,但是版本匹配,可能dll已经被其他补丁程序修改过 + if (matchingVersion != null) + { + throw new BusinessException("maybe_modified", $"程序支持此版本:{editor.FileVersion}。但是文件校验不通过,请确认是否使用过其他补丁程序!"); + } + } } } } @@ -280,21 +307,16 @@ namespace RevokeMsgPatcher.Modifier /// c.根据补丁信息,安装补丁 /// 两种打补丁的方式:精准(指定位置替换)、通用(特征码替换) /// - /// 两种打补丁的方式:精准(指定位置替换)、通用(特征码替换) /// - public bool Patch(PatchType type = PatchType.Accurate) + public bool Patch() { // 首先验证文件修改器是否没问题 foreach (FileHexEditor editor in editors) { - if (type == PatchType.Accurate && editor.FileModifyInfo == null) + if(editor == null) { throw new Exception("补丁安装失败,原因:文件修改器初始化失败!"); } - if (type == PatchType.Common && editor.FileCommonModifyInfo == null) - { - throw new Exception("补丁安装失败,原因:特征码修改器初始化失败!"); - } } // 再备份所有文件 foreach (FileHexEditor editor in editors) @@ -307,7 +329,7 @@ namespace RevokeMsgPatcher.Modifier { foreach (FileHexEditor editor in editors) { - bool success = editor.Patch(type); + bool success = editor.Patch(); if (!success) { editor.Restore(); @@ -366,6 +388,10 @@ namespace RevokeMsgPatcher.Modifier return false; } } + else + { + editor.Restore(); + } } return true; } diff --git a/RevokeMsgPatcher/Modifier/FileHexEditor.cs b/RevokeMsgPatcher/Modifier/FileHexEditor.cs index 8bc9942..2d7c915 100644 --- a/RevokeMsgPatcher/Modifier/FileHexEditor.cs +++ b/RevokeMsgPatcher/Modifier/FileHexEditor.cs @@ -35,7 +35,7 @@ namespace RevokeMsgPatcher.Modifier { get { - return FileUtil.GetFileVersion(FileBakPath); + return FileUtil.GetFileVersion(FileBakPath); } } @@ -64,6 +64,11 @@ namespace RevokeMsgPatcher.Modifier /// public CommonModifyInfo FileCommonModifyInfo { get; set; } + /// + /// 将要执行的修改 + /// + public List TargetChanges { get; set; } + public FileHexEditor(string installPath, TargetInfo target) { FileTargetInfo = target.Clone(); @@ -84,91 +89,18 @@ namespace RevokeMsgPatcher.Modifier /// /// 打补丁 /// - /// 两种打补丁的方式:精准(指定位置替换)、通用(特征码替换) /// - public bool Patch(PatchType type) + public bool Patch() { - if (type == PatchType.Accurate) + if (TargetChanges == null) { - AccuratePatch(); + throw new BusinessException("change_null", "在安装补丁时,变更的内容为空!"); + } - } - else - { - CommonPatch(); - } + FileUtil.EditMultiHex(FilePath, TargetChanges); return true; } - /// - /// 精准(指定位置替换) - /// - public void AccuratePatch() - { - FileUtil.EditMultiHex(FilePath, FileModifyInfo.Changes); - } - - /// - /// 通用(特征码替换) - /// - public void CommonPatch() - { - if (FileCommonModifyInfo == null) - { - throw new Exception("特征码替换:缺失对应特征码信息"); - } - // 1. 拷贝一份临时文件 - File.Copy(FilePath, fileReplacedPath, true); - // 2. 读取整个临时文件 - byte[] fileByteArray = File.ReadAllBytes(fileReplacedPath); - // 3. 循环查找所有未替换的替换点 - int needReplaceNum = 0; - List changes = new List(); - foreach (ReplacePattern pattern in FileCommonModifyInfo.ReplacePatterns) - { - int[] indexs = FuzzyMatcher.MatchNotReplaced(fileByteArray, pattern.Search, pattern.Replace); - if (indexs.Length == 1) - { - needReplaceNum++; - changes.Add(new Change(indexs[0], pattern.Replace)); - } - } - // 判断是否可以使用特征码替换的方式 - if (needReplaceNum == 0) - { - // 查找所有替换点 - int matchNum = 0; - foreach (ReplacePattern pattern in FileCommonModifyInfo.ReplacePatterns) - { - int[] indexs = FuzzyMatcher.MatchAll(fileByteArray, pattern.Search); - if (indexs.Length == 1) - { - matchNum++; - } - } - if (matchNum == FileCommonModifyInfo.ReplacePatterns.Count) - { - throw new BusinessException("already_replace", "特征码替换:当前应用已经防撤回"); - } - else - { - throw new BusinessException("not_found_to_replace", "特征码替换:没有搜索到撤回的相关特征"); - } - } - else if (needReplaceNum == FileCommonModifyInfo.ReplacePatterns.Count) - { - // 正常情况下每个替换点都能找到 - // 3. 替换所有未替换的替换点 - FileUtil.EditMultiHex(fileReplacedPath, changes); - // 4. 覆盖特征码替换后的文件 - File.Copy(fileReplacedPath, FilePath, true); - } - else - { - throw new BusinessException("found_num_err", "特征码替换:可替换的特征数不正确"); - } - } - /// /// 还原 /// diff --git a/RevokeMsgPatcher/Properties/Resources.Designer.cs b/RevokeMsgPatcher/Properties/Resources.Designer.cs index 23c3ae0..368f3d4 100644 --- a/RevokeMsgPatcher/Properties/Resources.Designer.cs +++ b/RevokeMsgPatcher/Properties/Resources.Designer.cs @@ -61,7 +61,7 @@ namespace RevokeMsgPatcher.Properties { } /// - /// 查找类似 {"Apps":{"Wechat":{"Name":"Wechat","FileTargetInfos":{"WeChatWin.dll":{"Name":"WeChatWin.dll","RelativePath":"WeChatWin.dll","Memo":null}},"FileModifyInfos":{"WeChatWin.dll":[{"Name":"WeChatWin.dll","Version":"2.7.1.88","SHA1Before":"034059bad50dd793140952391bfa7936133e69b4","SHA1After":"dd6d80c30ca9e0ea9f7d2f1add498fc9aa4bc7a0","Changes":[{"Position":2499465,"Content":[235]},{"Position":7952304,"Content":[195]}]},{"Name":"WeChatWin.dll","Version":"2.7.1.85","SHA1Before":"de0df4e138b72460450f66c029e33f4510f [字符串的其余部分被截断]"; 的本地化字符串。 + /// 查找类似 {"Apps":{"Wechat":{"Name":"Wechat","FileTargetInfos":{"WeChatWin.dll":{"Name":"WeChatWin.dll","RelativePath":"WeChatWin.dll","Memo":null}},"FileModifyInfos":{"WeChatWin.dll":[{"Name":"WeChatWin.dll","Version":"2.8.0.82","SHA1Before":"c359cc1a391441d261753f2844f9156638df8631","SHA1After":"d1b4dee8f7f91e34d68501987fd0675b33fe85da","Changes":[{"Position":2645961,"Content":[235]},{"Position":8263344,"Content":[195]}]},{"Name":"WeChatWin.dll","Version":"2.7.2.78","SHA1Before":"26a5c5503f1e176676da5657c12812da8aa [字符串的其余部分被截断]"; 的本地化字符串。 /// internal static string PatchJson { get { diff --git a/RevokeMsgPatcher/Properties/Resources.resx b/RevokeMsgPatcher/Properties/Resources.resx index 84120cf..98f27b4 100644 --- a/RevokeMsgPatcher/Properties/Resources.resx +++ b/RevokeMsgPatcher/Properties/Resources.resx @@ -118,6 +118,6 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - {"Apps":{"Wechat":{"Name":"Wechat","FileTargetInfos":{"WeChatWin.dll":{"Name":"WeChatWin.dll","RelativePath":"WeChatWin.dll","Memo":null}},"FileModifyInfos":{"WeChatWin.dll":[{"Name":"WeChatWin.dll","Version":"2.7.1.88","SHA1Before":"034059bad50dd793140952391bfa7936133e69b4","SHA1After":"dd6d80c30ca9e0ea9f7d2f1add498fc9aa4bc7a0","Changes":[{"Position":2499465,"Content":[235]},{"Position":7952304,"Content":[195]}]},{"Name":"WeChatWin.dll","Version":"2.7.1.85","SHA1Before":"de0df4e138b72460450f66c029e33f4510f5e2df","SHA1After":"fbd35720aaff3cdcfd3ff18ea503dc06450e5c99","Changes":[{"Position":2499465,"Content":[235]},{"Position":7952000,"Content":[195]}]},{"Name":"WeChatWin.dll","Version":"2.7.1.82","SHA1Before":"20e111a18872bf6c7148a897c11da26c1ec95520","SHA1After":"1e0741d325ca6b1cd2402b829a3d13a2524af617","Changes":[{"Position":2499465,"Content":[235]},{"Position":7951952,"Content":[195]}]},{"Name":"WeChatWin.dll","Version":"2.7.1.74","SHA1Before":"b1eaf7edc074a88be5d0f89230436cc2084d24d2","SHA1After":"eb3d74ccd87a09059a005f4972861898fc3de463","Changes":[{"Position":2499465,"Content":[235]},{"Position":7951696,"Content":[195]}]},{"Name":"WeChatWin.dll","Version":"2.7.1.65","SHA1Before":"8346b97d264725da924d240c6eb77df3e693385e","SHA1After":"42bab2c9c79ef4f2088c00ea6d817973e14a5e6e","Changes":[{"Position":2495545,"Content":[235]}]},{"Name":"WeChatWin.dll","Version":"2.7.1.59","SHA1Before":"df954d403edaca89cd5394927a325a0023e93281","SHA1After":"6aa22460c91bb5c5e2f0ec1af99b8a5f6d4318c0","Changes":[{"Position":2496073,"Content":[235]}]},{"Name":"WeChatWin.dll","Version":"2.7.1.43","SHA1Before":"39cd9e09e1a3eac09e6808749bff525c9e3216ce","SHA1After":"7b829f1ff0217e346a80f9510fdd7634ddd49445","Changes":[{"Position":2494169,"Content":[235]}]},{"Name":"WeChatWin.dll","Version":"2.7.0.70","SHA1Before":"3b0601864aff3c1d792f812ad1ca05f02aa761e3","SHA1After":"1e8734d32b0a8c12758e30f99c77f729991fb071","Changes":[{"Position":2475657,"Content":[235]}]},{"Name":"WeChatWin.dll","Version":"2.7.0.65","SHA1Before":"063c2e05a0df1bdb8987c2d978d93499bd2052ba","SHA1After":"5ed4c09a4f18643b967f063a824d7e65d0567f8a","Changes":[{"Position":2475449,"Content":[117]}]},{"Name":"WeChatWin.dll","Version":"2.6.8.68","SHA1Before":"2e9417f4276b12fe32ca7b4fee49272a4a2af334","SHA1After":"699602ee3cbb9ae5714f6e6ebc658c875a6c66e6","Changes":[{"Position":2454006,"Content":[116]}]},{"Name":"WeChatWin.dll","Version":"2.6.8.65","SHA1Before":"e01f6855a96c12c30808960903ed199a33e4952c","SHA1After":"d9120569cfd0433aebea107d7b90805cbbac7518","Changes":[{"Position":2454265,"Content":[117]}]},{"Name":"WeChatWin.dll","Version":"2.6.8.52","SHA1Before":"88131302f664df6a657c9ca49d152da536fe5729","SHA1After":"8d1454b73831644181e962c1fa0ea4e2da4124a3","Changes":[{"Position":2453049,"Content":[117]}]},{"Name":"WeChatWin.dll","Version":"2.6.8.51","SHA1Before":"d0a5517b1292a751501b00b4b1f0702db2d9fc30","SHA1After":"53e7b1525d49bf2c3250a8131ff0ba2510779b78","Changes":[{"Position":2452614,"Content":[116]}]},{"Name":"WeChatWin.dll","Version":"2.6.8.37","SHA1Before":"7e01f8b04a158a4a50bc5a6e67c2fb8b02233170","SHA1After":"a1895004415fe9bcd7e690bd6e482b833b515599","Changes":[{"Position":2452614,"Content":[116]}]},{"Name":"WeChatWin.dll","Version":"2.6.7.57","SHA1Before":"80a91aaf941bcb1c24a7d672838ac73e9ebb2e40","SHA1After":"a0d3f9a45a835f97aef7fe0872387d8cfb5c25a4","Changes":[{"Position":2433413,"Content":[116]}]},{"Name":"WeChatWin.dll","Version":"2.6.7.40","SHA1Before":"04bd0cb28df6630b518f42a3f9c2caa4a9359fbc","SHA1After":"13c91cf1d4609959771fd137b9a86a5ca365e1b6","Changes":[{"Position":2432934,"Content":[116]}]},{"Name":"WeChatWin.dll","Version":"2.6.7.32","SHA1Before":"a02519c1007ee6723947c262c720d63c619f633e","SHA1After":"f3007471ca8734c29783c25f0bb49949a783a44","Changes":[{"Position":2432806,"Content":[116]}]},{"Name":"WeChatWin.dll","Version":"2.6.6.28","SHA1Before":"0b19cb17a62c3ea0efce0fb675a1d3b17845cba3","SHA1After":"260948656725446b818ea668273ceff02ddfb44d","Changes":[{"Position":2401678,"Content":[116]}]}]}},"QQ":{"Name":"QQ","FileTargetInfos":{"IM.dll":{"Name":"IM.dll","RelativePath":"Bin\\IM.dll","Memo":null}},"FileModifyInfos":{"IM.dll":[{"Name":"IM.dll","Version":"9.2.2.26569","SHA1Before":"434254e76c520789558e075af677821258536311","SHA1After":"237c9e489a97858a175f0f7c72ade4ebcbac7a69","Changes":[{"Position":371146,"Content":[235,9,144,144,144]},{"Position":371687,"Content":[235,9,144,144,144]},{"Position":372117,"Content":[235,8,144,144,144,144]}]},{"Name":"IM.dll","Version":"9.2.1.26546","SHA1Before":"8d8ea2c2cbf43f5acf8d684b153e90035352d5f5","SHA1After":"7d194dd5be03982b533d7375c93d9a72587fe28d","Changes":[{"Position":369545,"Content":[235,9,144,144,144]},{"Position":370086,"Content":[235,9,144,144,144]},{"Position":370516,"Content":[235,8,144,144,144,144]}]},{"Name":"IM.dll","Version":"9.2.0.26453","SHA1Before":"c1935ca6347b0c2a7e6108a7f8ee0643d39deb66","SHA1After":"42811188a7e7b346a6a3c1066936b98c747acaf6","Changes":[{"Position":353794,"Content":[235,9,144,144,144]},{"Position":354335,"Content":[235,9,144,144,144]},{"Position":354767,"Content":[235,8,144,144,144,144]}]},{"Name":"IM.dll","Version":"9.2.0.26389","SHA1Before":"6f8855fb80acfa456f8f69989fe949308fe4d154","SHA1After":"f6b8e05a178b9b10ba17c597fa0a44b7a2a966a8","Changes":[{"Position":356808,"Content":[235,9,144,144,144]},{"Position":357349,"Content":[235,9,144,144,144]},{"Position":357781,"Content":[235,8,144,144,144,144]}]},{"Name":"IM.dll","Version":"9.1.9.26361","SHA1Before":"022d3433d13d07a354c38816f61cb0b7ac60d3fd","SHA1After":"873a57c1fb51cdd099c8cb7108b5ab5cb4459557","Changes":[{"Position":354270,"Content":[235,9,144,144,144]},{"Position":354811,"Content":[235,9,144,144,144]},{"Position":355243,"Content":[235,8,144,144,144,144]}]},{"Name":"IM.dll","Version":"9.1.9.26346","SHA1Before":"895eb70f707b8222e6460c91492b1281e525059b","SHA1After":"0bb83990e2b5b5f23b7b43249941ff638201af54","Changes":[{"Position":354270,"Content":[235,9,144,144,144]},{"Position":354811,"Content":[235,9,144,144,144]},{"Position":355243,"Content":[235,8,144,144,144,144]}]},{"Name":"IM.dll","Version":"9.1.8.26211","SHA1Before":"a950d3cf5e8925f7775624271105ef78d9c5cb57","SHA1After":"dffc1cb87b91e6467e13c935611f2f7fd76b9a8d","Changes":[{"Position":337135,"Content":[235,9,144,144,144]},{"Position":337676,"Content":[235,9,144,144,144]},{"Position":338108,"Content":[235,8,144,144,144,144]}]},{"Name":"IM.dll","Version":"9.1.7.25980","SHA1Before":"c6632339fbe675312a70ae4620e70699c258cd36","SHA1After":"e9ddc5cc681950796fc8fe4c55f580428c890b51","Changes":[{"Position":327839,"Content":[235,9,144,144,144]},{"Position":328380,"Content":[235,9,144,144,144]},{"Position":328812,"Content":[235,8,144,144,144,144]}]},{"Name":"IM.dll","Version":"9.0.4.23786","SHA1Before":"69a714f4eadb09f1453f6f022d4adbcd801cfab8","SHA1After":"b48e77a924076b3ebdffc4af514c868c551d2bca","Changes":[{"Position":318321,"Content":[235,7,144,144,144]},{"Position":318862,"Content":[235,7,144,144,144]},{"Position":319379,"Content":[235,7,144,144,144]}]}]}},"TIM":{"Name":"TIM","FileTargetInfos":{"IM.dll":{"Name":"IM.dll","RelativePath":"Bin\\IM.dll","Memo":null}},"FileModifyInfos":{"IM.dll":[{"Name":"IM.dll","Version":"2.3.2.21173","SHA1Before":"ecf3e69f3fb100ffe2fee095ffded591b9781024","SHA1After":"0514d1304e7ac46b4d33386ec3313888f5ae7171","Changes":[{"Position":317322,"Content":[235,9,144,144,144]},{"Position":317863,"Content":[235,9,144,144,144]},{"Position":318295,"Content":[235,8,144,144,144,144]}]}]}},"QQLite":{"Name":"QQLite","FileTargetInfos":{"IM.dll":{"Name":"IM.dll","RelativePath":"Bin\\IM.dll","Memo":null}},"FileModifyInfos":{"IM.dll":[{"Name":"IM.dll","Version":"7.9.14314.0","SHA1Before":"2e97d7671963fa148a1beeda6ce4964314310593","SHA1After":"723c008fb53435ead20fa6f2e951c9a4a8ff46da","Changes":[{"Position":148741,"Content":[235,2,144,144]},{"Position":149689,"Content":[235,2,144,144]}]},{"Name":"IM.dll","Version":"7.9.14308.0","SHA1Before":"b8a7a873178706b97be11c25f13bcf09e9e578a2","SHA1After":"c5bf533c7af6996b42d1fb2a0fb3f26dfd52f8bf","Changes":[{"Position":148741,"Content":[235,2,144,144]},{"Position":149689,"Content":[235,2,144,144]}]}]}}},"LatestVersion":"0.6","Notice":""} + {"Apps":{"Wechat":{"Name":"Wechat","FileTargetInfos":{"WeChatWin.dll":{"Name":"WeChatWin.dll","RelativePath":"WeChatWin.dll","Memo":null}},"FileModifyInfos":{"WeChatWin.dll":[{"Name":"WeChatWin.dll","Version":"2.8.0.82","SHA1Before":"c359cc1a391441d261753f2844f9156638df8631","SHA1After":"d1b4dee8f7f91e34d68501987fd0675b33fe85da","Changes":[{"Position":2645961,"Content":[235]},{"Position":8263344,"Content":[195]}]},{"Name":"WeChatWin.dll","Version":"2.7.2.78","SHA1Before":"26a5c5503f1e176676da5657c12812da8aaa0243","SHA1After":"d338215a815c09755c04949995ec3e4eab8dce60","Changes":[{"Position":2645673,"Content":[235]},{"Position":8262528,"Content":[195]}]},{"Name":"WeChatWin.dll","Version":"2.7.2.76","SHA1Before":"0003c7b2c0136a0eb2a6cfc2c694cb57b04b5517","SHA1After":"88af6055a0f4d3bdaa6f717ec8b263d4418487b6","Changes":[{"Position":2644905,"Content":[235]},{"Position":8261024,"Content":[195]}]},{"Name":"WeChatWin.dll","Version":"2.7.1.88","SHA1Before":"034059bad50dd793140952391bfa7936133e69b4","SHA1After":"dd6d80c30ca9e0ea9f7d2f1add498fc9aa4bc7a0","Changes":[{"Position":2499465,"Content":[235]},{"Position":7952304,"Content":[195]}]},{"Name":"WeChatWin.dll","Version":"2.7.1.85","SHA1Before":"de0df4e138b72460450f66c029e33f4510f5e2df","SHA1After":"fbd35720aaff3cdcfd3ff18ea503dc06450e5c99","Changes":[{"Position":2499465,"Content":[235]},{"Position":7952000,"Content":[195]}]},{"Name":"WeChatWin.dll","Version":"2.7.1.82","SHA1Before":"20e111a18872bf6c7148a897c11da26c1ec95520","SHA1After":"1e0741d325ca6b1cd2402b829a3d13a2524af617","Changes":[{"Position":2499465,"Content":[235]},{"Position":7951952,"Content":[195]}]},{"Name":"WeChatWin.dll","Version":"2.7.1.74","SHA1Before":"b1eaf7edc074a88be5d0f89230436cc2084d24d2","SHA1After":"eb3d74ccd87a09059a005f4972861898fc3de463","Changes":[{"Position":2499465,"Content":[235]},{"Position":7951696,"Content":[195]}]},{"Name":"WeChatWin.dll","Version":"2.7.1.65","SHA1Before":"8346b97d264725da924d240c6eb77df3e693385e","SHA1After":"42bab2c9c79ef4f2088c00ea6d817973e14a5e6e","Changes":[{"Position":2495545,"Content":[235]}]},{"Name":"WeChatWin.dll","Version":"2.7.1.59","SHA1Before":"df954d403edaca89cd5394927a325a0023e93281","SHA1After":"6aa22460c91bb5c5e2f0ec1af99b8a5f6d4318c0","Changes":[{"Position":2496073,"Content":[235]}]},{"Name":"WeChatWin.dll","Version":"2.7.1.43","SHA1Before":"39cd9e09e1a3eac09e6808749bff525c9e3216ce","SHA1After":"7b829f1ff0217e346a80f9510fdd7634ddd49445","Changes":[{"Position":2494169,"Content":[235]}]},{"Name":"WeChatWin.dll","Version":"2.7.0.70","SHA1Before":"3b0601864aff3c1d792f812ad1ca05f02aa761e3","SHA1After":"1e8734d32b0a8c12758e30f99c77f729991fb071","Changes":[{"Position":2475657,"Content":[235]}]},{"Name":"WeChatWin.dll","Version":"2.7.0.65","SHA1Before":"063c2e05a0df1bdb8987c2d978d93499bd2052ba","SHA1After":"5ed4c09a4f18643b967f063a824d7e65d0567f8a","Changes":[{"Position":2475449,"Content":[117]}]},{"Name":"WeChatWin.dll","Version":"2.6.8.68","SHA1Before":"2e9417f4276b12fe32ca7b4fee49272a4a2af334","SHA1After":"699602ee3cbb9ae5714f6e6ebc658c875a6c66e6","Changes":[{"Position":2454006,"Content":[116]}]},{"Name":"WeChatWin.dll","Version":"2.6.8.65","SHA1Before":"e01f6855a96c12c30808960903ed199a33e4952c","SHA1After":"d9120569cfd0433aebea107d7b90805cbbac7518","Changes":[{"Position":2454265,"Content":[117]}]},{"Name":"WeChatWin.dll","Version":"2.6.8.52","SHA1Before":"88131302f664df6a657c9ca49d152da536fe5729","SHA1After":"8d1454b73831644181e962c1fa0ea4e2da4124a3","Changes":[{"Position":2453049,"Content":[117]}]},{"Name":"WeChatWin.dll","Version":"2.6.8.51","SHA1Before":"d0a5517b1292a751501b00b4b1f0702db2d9fc30","SHA1After":"53e7b1525d49bf2c3250a8131ff0ba2510779b78","Changes":[{"Position":2452614,"Content":[116]}]},{"Name":"WeChatWin.dll","Version":"2.6.8.37","SHA1Before":"7e01f8b04a158a4a50bc5a6e67c2fb8b02233170","SHA1After":"a1895004415fe9bcd7e690bd6e482b833b515599","Changes":[{"Position":2452614,"Content":[116]}]},{"Name":"WeChatWin.dll","Version":"2.6.7.57","SHA1Before":"80a91aaf941bcb1c24a7d672838ac73e9ebb2e40","SHA1After":"a0d3f9a45a835f97aef7fe0872387d8cfb5c25a4","Changes":[{"Position":2433413,"Content":[116]}]},{"Name":"WeChatWin.dll","Version":"2.6.7.40","SHA1Before":"04bd0cb28df6630b518f42a3f9c2caa4a9359fbc","SHA1After":"13c91cf1d4609959771fd137b9a86a5ca365e1b6","Changes":[{"Position":2432934,"Content":[116]}]},{"Name":"WeChatWin.dll","Version":"2.6.7.32","SHA1Before":"a02519c1007ee6723947c262c720d63c619f633e","SHA1After":"f3007471ca8734c29783c25f0bb49949a783a44","Changes":[{"Position":2432806,"Content":[116]}]},{"Name":"WeChatWin.dll","Version":"2.6.6.28","SHA1Before":"0b19cb17a62c3ea0efce0fb675a1d3b17845cba3","SHA1After":"260948656725446b818ea668273ceff02ddfb44d","Changes":[{"Position":2401678,"Content":[116]}]}]},"FileCommonModifyInfos":{"WeChatWin.dll":[{"Name":"WeChatWin.dll","StartVersion":"2.7.0.0","EndVersion":"","ReplacePatterns":[{"Search":[0,133,192,116,50,185],"Replace":[0,133,192,235,50,185]},{"Search":[192,195,204,204,204,204,204,204,204,204,204,204,204,204,204,204,85,139,236,131,236,20,83,86,87,106,255,15,87,192,199],"Replace":[192,195,204,204,204,204,204,204,204,204,204,204,204,204,204,204,195,139,236,131,236,20,83,86,87,106,255,15,87,192,199]}]}]}},"QQ":{"Name":"QQ","FileTargetInfos":{"IM.dll":{"Name":"IM.dll","RelativePath":"Bin\\IM.dll","Memo":null}},"FileModifyInfos":{"IM.dll":[{"Name":"IM.dll","Version":"9.2.2.26569","SHA1Before":"434254e76c520789558e075af677821258536311","SHA1After":"237c9e489a97858a175f0f7c72ade4ebcbac7a69","Changes":[{"Position":371146,"Content":[235,9,144,144,144]},{"Position":371687,"Content":[235,9,144,144,144]},{"Position":372117,"Content":[235,8,144,144,144,144]}]},{"Name":"IM.dll","Version":"9.2.1.26546","SHA1Before":"8d8ea2c2cbf43f5acf8d684b153e90035352d5f5","SHA1After":"7d194dd5be03982b533d7375c93d9a72587fe28d","Changes":[{"Position":369545,"Content":[235,9,144,144,144]},{"Position":370086,"Content":[235,9,144,144,144]},{"Position":370516,"Content":[235,8,144,144,144,144]}]},{"Name":"IM.dll","Version":"9.2.0.26453","SHA1Before":"c1935ca6347b0c2a7e6108a7f8ee0643d39deb66","SHA1After":"42811188a7e7b346a6a3c1066936b98c747acaf6","Changes":[{"Position":353794,"Content":[235,9,144,144,144]},{"Position":354335,"Content":[235,9,144,144,144]},{"Position":354767,"Content":[235,8,144,144,144,144]}]},{"Name":"IM.dll","Version":"9.2.0.26389","SHA1Before":"6f8855fb80acfa456f8f69989fe949308fe4d154","SHA1After":"f6b8e05a178b9b10ba17c597fa0a44b7a2a966a8","Changes":[{"Position":356808,"Content":[235,9,144,144,144]},{"Position":357349,"Content":[235,9,144,144,144]},{"Position":357781,"Content":[235,8,144,144,144,144]}]},{"Name":"IM.dll","Version":"9.1.9.26361","SHA1Before":"022d3433d13d07a354c38816f61cb0b7ac60d3fd","SHA1After":"873a57c1fb51cdd099c8cb7108b5ab5cb4459557","Changes":[{"Position":354270,"Content":[235,9,144,144,144]},{"Position":354811,"Content":[235,9,144,144,144]},{"Position":355243,"Content":[235,8,144,144,144,144]}]},{"Name":"IM.dll","Version":"9.1.9.26346","SHA1Before":"895eb70f707b8222e6460c91492b1281e525059b","SHA1After":"0bb83990e2b5b5f23b7b43249941ff638201af54","Changes":[{"Position":354270,"Content":[235,9,144,144,144]},{"Position":354811,"Content":[235,9,144,144,144]},{"Position":355243,"Content":[235,8,144,144,144,144]}]},{"Name":"IM.dll","Version":"9.1.8.26211","SHA1Before":"a950d3cf5e8925f7775624271105ef78d9c5cb57","SHA1After":"dffc1cb87b91e6467e13c935611f2f7fd76b9a8d","Changes":[{"Position":337135,"Content":[235,9,144,144,144]},{"Position":337676,"Content":[235,9,144,144,144]},{"Position":338108,"Content":[235,8,144,144,144,144]}]},{"Name":"IM.dll","Version":"9.1.7.25980","SHA1Before":"c6632339fbe675312a70ae4620e70699c258cd36","SHA1After":"e9ddc5cc681950796fc8fe4c55f580428c890b51","Changes":[{"Position":327839,"Content":[235,9,144,144,144]},{"Position":328380,"Content":[235,9,144,144,144]},{"Position":328812,"Content":[235,8,144,144,144,144]}]},{"Name":"IM.dll","Version":"9.0.4.23786","SHA1Before":"69a714f4eadb09f1453f6f022d4adbcd801cfab8","SHA1After":"b48e77a924076b3ebdffc4af514c868c551d2bca","Changes":[{"Position":318321,"Content":[235,7,144,144,144]},{"Position":318862,"Content":[235,7,144,144,144]},{"Position":319379,"Content":[235,7,144,144,144]}]}]},"FileCommonModifyInfos":{"IM.dll":[{"Name":"IM.dll","StartVersion":"9.1.7.00000","EndVersion":"","ReplacePatterns":[{"Search":[28,233,157,0,0,0,139,69,232,141,85,236,82,137,93,236,104,63,63,63,84,139,8,80,255,81,120,133,192,121,45,141,69,12,199,69,12],"Replace":[28,233,157,0,0,0,139,69,232,141,85,236,82,137,93,236,235,9,144,144,144,139,8,80,255,81,120,133,192,121,45,141,69,12,199,69,12]},{"Search":[28,233,157,0,0,0,139,69,240,141,85,236,82,137,93,236,104,63,63,63,84,139,8,80,255,81,120,133,192,121,45,141,69,12,199,69,12],"Replace":[28,233,157,0,0,0,139,69,240,141,85,236,82,137,93,236,235,9,144,144,144,139,8,80,255,81,120,133,192,121,45,141,69,12,199,69,12]},{"Search":[139,117,20,141,77,244,131,196,32,51,255,137,125,244,139,6,81,104,63,63,63,84,86,255,80,120,133,192,121,57,141,69,12,199,69,12],"Replace":[139,117,20,141,77,244,131,196,32,51,255,137,125,244,139,6,235,8,144,144,144,144,86,255,80,120,133,192,121,57,141,69,12,199,69,12]}]}]}},"TIM":{"Name":"TIM","FileTargetInfos":{"IM.dll":{"Name":"IM.dll","RelativePath":"Bin\\IM.dll","Memo":null}},"FileModifyInfos":{"IM.dll":[{"Name":"IM.dll","Version":"2.3.2.21173","SHA1Before":"ecf3e69f3fb100ffe2fee095ffded591b9781024","SHA1After":"0514d1304e7ac46b4d33386ec3313888f5ae7171","Changes":[{"Position":317322,"Content":[235,9,144,144,144]},{"Position":317863,"Content":[235,9,144,144,144]},{"Position":318295,"Content":[235,8,144,144,144,144]}]}]},"FileCommonModifyInfos":null},"QQLite":{"Name":"QQLite","FileTargetInfos":{"IM.dll":{"Name":"IM.dll","RelativePath":"Bin\\IM.dll","Memo":null}},"FileModifyInfos":{"IM.dll":[{"Name":"IM.dll","Version":"7.9.14314.0","SHA1Before":"2e97d7671963fa148a1beeda6ce4964314310593","SHA1After":"723c008fb53435ead20fa6f2e951c9a4a8ff46da","Changes":[{"Position":148741,"Content":[235,2,144,144]},{"Position":149689,"Content":[235,2,144,144]}]},{"Name":"IM.dll","Version":"7.9.14308.0","SHA1Before":"b8a7a873178706b97be11c25f13bcf09e9e578a2","SHA1After":"c5bf533c7af6996b42d1fb2a0fb3f26dfd52f8bf","Changes":[{"Position":148741,"Content":[235,2,144,144]},{"Position":149689,"Content":[235,2,144,144]}]}]},"FileCommonModifyInfos":null}},"LatestVersion":"0.6","Notice":""} \ No newline at end of file diff --git a/RevokeMsgPatcher/RevokeMsgPatcher.csproj b/RevokeMsgPatcher/RevokeMsgPatcher.csproj index e8b911c..dac9c81 100644 --- a/RevokeMsgPatcher/RevokeMsgPatcher.csproj +++ b/RevokeMsgPatcher/RevokeMsgPatcher.csproj @@ -59,11 +59,11 @@ + -