Skip to content

Commit f80c8a2

Browse files
committed
[+] 支持微信 2.8.0.112,微信新版本带提示防撤回,修复版本判断逻辑,版本更新至0.8
1 parent 83c01ae commit f80c8a2

File tree

11 files changed

+118
-23
lines changed

11 files changed

+118
-23
lines changed

RevokeMsgPatcher.Assistant/Data/0.7/patch.json

+1-1
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"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.112","SHA1Before":"7497fc006f061799138aa33419280e41891a7981","SHA1After":"07e681be40af32738d59a9332fe966c83c05e455","Changes":[{"Position":2682233,"Content":[235]},{"Position":8289040,"Content":[195]}]},{"Name":"WeChatWin.dll","Version":"2.8.0.106","SHA1Before":"e772c81c8a1b79cac77b22dbe67b375fa340ba30","SHA1After":"bcbc491910f07cb995ef154a281450f2d052e90b","Changes":[{"Position":2658457,"Content":[235]},{"Position":8280416,"Content":[195]}]},{"Name":"WeChatWin.dll","Version":"2.8.0.88","SHA1Before":"b34c73e38cfec186890b58caac5fc9962377cd9b","SHA1After":"8c108e92de0b6b4d9e61ce38ab8dd339a27e505b","Changes":[{"Position":2655369,"Content":[235]},{"Position":8273280,"Content":[195]}]},{"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.8.0.88","EndVersion":"","ReplacePatterns":[{"Search":[0,133,192,116,123,139,200,232],"Replace":[0,133,192,235,123,139,200,232]},{"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]}]},{"Name":"WeChatWin.dll","StartVersion":"2.7.0.00","EndVersion":"2.8.0.88","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.3.26592","SHA1Before":"9114e7869572b4b868afcbc8b28eae932559ec60","SHA1After":"42e15175fd53768bb48772dc69fb07a4eac5a623","Changes":[{"Position":371605,"Content":[235,9,144,144,144]},{"Position":372146,"Content":[235,9,144,144,144]},{"Position":372576,"Content":[235,8,144,144,144,144]}]},{"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.8","Notice":""}

RevokeMsgPatcher.Assistant/JsonData.cs

+40-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public Bag Bag()
1616
return new Bag
1717
{
1818
Apps = AppConfig(),
19-
LatestVersion = "0.7",
19+
LatestVersion = "0.8",
2020
Notice = ""
2121
};
2222
}
@@ -69,9 +69,28 @@ public App Wechat()
6969
new CommonModifyInfo
7070
{
7171
Name="WeChatWin.dll",
72-
StartVersion="2.7.0.0",
72+
StartVersion="2.8.0.88",
7373
EndVersion="",
7474
ReplacePatterns = new List<ReplacePattern>
75+
{
76+
new ReplacePattern
77+
{
78+
Search = ByteUtil.HexStringToByteArray("00 85 C0 74 7B 8B C8 E8"),
79+
Replace = ByteUtil.HexStringToByteArray("00 85 C0 EB 7B 8B C8 E8")
80+
},
81+
new ReplacePattern
82+
{
83+
Search = ByteUtil.HexStringToByteArray("C0 C3 CC CC CC CC CC CC CC CC CC CC CC CC CC CC 55 8B EC 83 EC 14 53 56 57 6A FF 0F 57 C0 C7"),
84+
Replace = ByteUtil.HexStringToByteArray("C0 C3 CC CC CC CC CC CC CC CC CC CC CC CC CC CC C3 8B EC 83 EC 14 53 56 57 6A FF 0F 57 C0 C7")
85+
}
86+
}
87+
},
88+
new CommonModifyInfo
89+
{
90+
Name="WeChatWin.dll",
91+
StartVersion="2.7.0.00",
92+
EndVersion="2.8.0.88",
93+
ReplacePatterns = new List<ReplacePattern>
7594
{
7695
new ReplacePattern
7796
{
@@ -94,6 +113,25 @@ public App Wechat()
94113
"WeChatWin.dll",
95114
new List<ModifyInfo>
96115
{
116+
new ModifyInfo {
117+
Name="WeChatWin.dll",
118+
Version="2.8.0.112",
119+
SHA1Before="7497fc006f061799138aa33419280e41891a7981",
120+
SHA1After="07e681be40af32738d59a9332fe966c83c05e455",
121+
Changes = new List<Change>
122+
{
123+
new Change
124+
{
125+
Position =0x0028ED79,
126+
Content =new byte[] { 0xEB }
127+
},
128+
new Change
129+
{
130+
Position =0x007E7B10,
131+
Content =new byte[] { 0xC3 }
132+
}
133+
}
134+
},
97135
new ModifyInfo {
98136
Name="WeChatWin.dll",
99137
Version="2.8.0.106",

RevokeMsgPatcher.Assistant/RevokeMsgPatcher.Assistant.csproj

+1
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@
8383
<DependentUpon>Resources.resx</DependentUpon>
8484
</Compile>
8585
<None Include="Data\0.7\patch.json" />
86+
<None Include="Data\0.8\patch.json" />
8687
<None Include="Properties\Settings.settings">
8788
<Generator>SettingsSingleFileGenerator</Generator>
8889
<LastGenOutput>Settings.Designer.cs</LastGenOutput>

RevokeMsgPatcher/Modifier/AppModifier.cs

+4-13
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using RevokeMsgPatcher.Matcher;
22
using RevokeMsgPatcher.Model;
3+
using RevokeMsgPatcher.Utils;
34
using System;
45
using System.Collections.Generic;
56
using System.Drawing;
@@ -145,18 +146,7 @@ public bool IsInVersionRange(string version, string start, string end)
145146
{
146147
try
147148
{
148-
int v = Convert.ToInt32(version.Replace(".", ""));
149-
int s = Convert.ToInt32(start.Replace(".", ""));
150-
int e = 0;
151-
if (string.IsNullOrEmpty(end))
152-
{
153-
e = int.MaxValue;
154-
}
155-
else
156-
{
157-
e = Convert.ToInt32(end.Replace(".", ""));
158-
}
159-
if (v >= s && v <= e)
149+
if (VersionUtil.Compare(version, start) == 1 && VersionUtil.Compare(version, end) <= 0)
160150
{
161151
return true;
162152
}
@@ -179,6 +169,7 @@ private CommonModifyInfo FindCommonModifyInfo(FileHexEditor editor)
179169
// editor.FileVersion 在 StartVersion 和 EndVersion 之间
180170
if (IsInVersionRange(editor.FileVersion, commonModifyInfo.StartVersion, commonModifyInfo.EndVersion))
181171
{
172+
Console.WriteLine($"{commonModifyInfo.StartVersion}<{editor.FileVersion}<={commonModifyInfo.EndVersion}");
182173
return commonModifyInfo;
183174
}
184175
}
@@ -312,7 +303,7 @@ public bool Patch()
312303
// 首先验证文件修改器是否没问题
313304
foreach (FileHexEditor editor in editors)
314305
{
315-
if(editor == null)
306+
if (editor == null)
316307
{
317308
throw new Exception("补丁安装失败,原因:文件修改器初始化失败!");
318309
}

RevokeMsgPatcher/Properties/AssemblyInfo.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@
3232
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
3333
// 方法是按如下所示使用“*”: :
3434
//[assembly: AssemblyVersion("1.0.*")]
35-
[assembly: AssemblyVersion("0.7")]
36-
[assembly: AssemblyFileVersion("0.7")]
35+
[assembly: AssemblyVersion("0.8")]
36+
[assembly: AssemblyFileVersion("0.8")]

RevokeMsgPatcher/Properties/Resources.Designer.cs

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)