mirror of
https://github.com/huiyadanli/RevokeMsgPatcher.git
synced 2025-05-24 22:46:06 +08:00
[+] 针对微信、QQ特定版本范围的特征码
This commit is contained in:
parent
818a7e1dbd
commit
000dfa969e
File diff suppressed because one or more lines are too long
|
@ -1,4 +1,5 @@
|
||||||
using RevokeMsgPatcher.Model;
|
using RevokeMsgPatcher.Model;
|
||||||
|
using RevokeMsgPatcher.Utils;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Web.Script.Serialization;
|
using System.Web.Script.Serialization;
|
||||||
|
|
||||||
|
@ -59,6 +60,34 @@ namespace RevokeMsgPatcher
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
FileCommonModifyInfos = new Dictionary<string, List<CommonModifyInfo>>
|
||||||
|
{
|
||||||
|
{
|
||||||
|
"WeChatWin.dll",
|
||||||
|
new List<CommonModifyInfo>
|
||||||
|
{
|
||||||
|
new CommonModifyInfo
|
||||||
|
{
|
||||||
|
Name="WeChatWin.dll",
|
||||||
|
StartVersion="2.7.0.0",
|
||||||
|
EndVersion="",
|
||||||
|
ReplacePatterns = new List<ReplacePattern>
|
||||||
|
{
|
||||||
|
new ReplacePattern
|
||||||
|
{
|
||||||
|
Search = ByteUtil.HexStringToByteArray("00 85 C0 74 32 B9"),
|
||||||
|
Replace = ByteUtil.HexStringToByteArray("00 85 C0 EB 32 B9")
|
||||||
|
},
|
||||||
|
new ReplacePattern
|
||||||
|
{
|
||||||
|
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"),
|
||||||
|
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")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
FileModifyInfos = new Dictionary<string, List<ModifyInfo>>
|
FileModifyInfos = new Dictionary<string, List<ModifyInfo>>
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
|
@ -84,6 +113,25 @@ namespace RevokeMsgPatcher
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
new ModifyInfo {
|
||||||
|
Name="WeChatWin.dll",
|
||||||
|
Version="2.7.2.78",
|
||||||
|
SHA1Before="26a5c5503f1e176676da5657c12812da8aaa0243",
|
||||||
|
SHA1After="d338215a815c09755c04949995ec3e4eab8dce60",
|
||||||
|
Changes = new List<Change>
|
||||||
|
{
|
||||||
|
new Change
|
||||||
|
{
|
||||||
|
Position =0x00285EA9,
|
||||||
|
Content =new byte[] { 0xEB }
|
||||||
|
},
|
||||||
|
new Change
|
||||||
|
{
|
||||||
|
Position =0x007E1380,
|
||||||
|
Content =new byte[] { 0xC3 }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
new ModifyInfo {
|
new ModifyInfo {
|
||||||
Name="WeChatWin.dll",
|
Name="WeChatWin.dll",
|
||||||
Version="2.7.2.76",
|
Version="2.7.2.76",
|
||||||
|
@ -216,6 +264,39 @@ namespace RevokeMsgPatcher
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
FileCommonModifyInfos = new Dictionary<string, List<CommonModifyInfo>>
|
||||||
|
{
|
||||||
|
{
|
||||||
|
"IM.dll",
|
||||||
|
new List<CommonModifyInfo>
|
||||||
|
{
|
||||||
|
new CommonModifyInfo
|
||||||
|
{
|
||||||
|
Name="IM.dll",
|
||||||
|
StartVersion="9.1.7.00000",
|
||||||
|
EndVersion="",
|
||||||
|
ReplacePatterns = new List<ReplacePattern>
|
||||||
|
{
|
||||||
|
new ReplacePattern
|
||||||
|
{
|
||||||
|
Search = ByteUtil.HexStringToByteArray("1C E9 9D 00 00 00 8B 45 E8 8D 55 EC 52 89 5D EC 68 3F 3F 3F 54 8B 08 50 FF 51 78 85 C0 79 2D 8D 45 0C C7 45 0C"),
|
||||||
|
Replace = ByteUtil.HexStringToByteArray("1C E9 9D 00 00 00 8B 45 E8 8D 55 EC 52 89 5D EC EB 09 90 90 90 8B 08 50 FF 51 78 85 C0 79 2D 8D 45 0C C7 45 0C")
|
||||||
|
},
|
||||||
|
new ReplacePattern
|
||||||
|
{
|
||||||
|
Search = ByteUtil.HexStringToByteArray("1C E9 9D 00 00 00 8B 45 F0 8D 55 EC 52 89 5D EC 68 3F 3F 3F 54 8B 08 50 FF 51 78 85 C0 79 2D 8D 45 0C C7 45 0C"),
|
||||||
|
Replace = ByteUtil.HexStringToByteArray("1C E9 9D 00 00 00 8B 45 F0 8D 55 EC 52 89 5D EC EB 09 90 90 90 8B 08 50 FF 51 78 85 C0 79 2D 8D 45 0C C7 45 0C")
|
||||||
|
},
|
||||||
|
new ReplacePattern
|
||||||
|
{
|
||||||
|
Search = ByteUtil.HexStringToByteArray("8B 75 14 8D 4D F4 83 C4 20 33 FF 89 7D F4 8B 06 51 68 3F 3F 3F 54 56 FF 50 78 85 C0 79 39 8D 45 0C C7 45 0C"),
|
||||||
|
Replace = ByteUtil.HexStringToByteArray("8B 75 14 8D 4D F4 83 C4 20 33 FF 89 7D F4 8B 06 EB 08 90 90 90 90 56 FF 50 78 85 C0 79 39 8D 45 0C C7 45 0C")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
FileModifyInfos = new Dictionary<string, List<ModifyInfo>>
|
FileModifyInfos = new Dictionary<string, List<ModifyInfo>>
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
|
|
|
@ -17,7 +17,7 @@ namespace RevokeMsgPatcher.Model
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 通用的修改特征
|
/// 通用的修改特征
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Dictionary<string, List<ModifyInfo>> FileCommonModifyInfos { get; set; }
|
public Dictionary<string, List<CommonModifyInfo>> FileCommonModifyInfos { get; set; }
|
||||||
|
|
||||||
public HashSet<string> GetSupportVersions()
|
public HashSet<string> GetSupportVersions()
|
||||||
{
|
{
|
||||||
|
|
|
@ -15,7 +15,7 @@ namespace RevokeMsgPatcher.Model
|
||||||
|
|
||||||
public string EndVersion { get; set; }
|
public string EndVersion { get; set; }
|
||||||
|
|
||||||
public List<Change> Changes { get; set; }
|
public List<ReplacePattern> ReplacePatterns { get; set; }
|
||||||
|
|
||||||
public CommonModifyInfo Clone()
|
public CommonModifyInfo Clone()
|
||||||
{
|
{
|
||||||
|
@ -23,12 +23,12 @@ namespace RevokeMsgPatcher.Model
|
||||||
o.Name = Name;
|
o.Name = Name;
|
||||||
o.StartVersion = StartVersion;
|
o.StartVersion = StartVersion;
|
||||||
o.EndVersion = EndVersion;
|
o.EndVersion = EndVersion;
|
||||||
List<Change> cs = new List<Change>();
|
List<ReplacePattern> cs = new List<ReplacePattern>();
|
||||||
foreach(Change c in Changes)
|
foreach(ReplacePattern c in ReplacePatterns)
|
||||||
{
|
{
|
||||||
cs.Add(c.Clone());
|
cs.Add(c.Clone());
|
||||||
}
|
}
|
||||||
o.Changes = cs;
|
o.ReplacePatterns = cs;
|
||||||
return o;
|
return o;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
19
RevokeMsgPatcher/Model/ReplacePattern.cs
Normal file
19
RevokeMsgPatcher/Model/ReplacePattern.cs
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace RevokeMsgPatcher.Model
|
||||||
|
{
|
||||||
|
public class ReplacePattern
|
||||||
|
{
|
||||||
|
public byte[] Search { get; set; }
|
||||||
|
|
||||||
|
public byte[] Replace { get; set; }
|
||||||
|
|
||||||
|
public ReplacePattern Clone()
|
||||||
|
{
|
||||||
|
ReplacePattern o = new ReplacePattern();
|
||||||
|
o.Search = Search;
|
||||||
|
o.Replace = Replace;
|
||||||
|
return o;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -62,6 +62,7 @@
|
||||||
<Compile Include="Model\Change.cs" />
|
<Compile Include="Model\Change.cs" />
|
||||||
<Compile Include="Model\CommonModifyInfo.cs" />
|
<Compile Include="Model\CommonModifyInfo.cs" />
|
||||||
<Compile Include="Model\ModifyInfo.cs" />
|
<Compile Include="Model\ModifyInfo.cs" />
|
||||||
|
<Compile Include="Model\ReplacePattern.cs" />
|
||||||
<Compile Include="Model\TargetInfo.cs" />
|
<Compile Include="Model\TargetInfo.cs" />
|
||||||
<Compile Include="Modifier\AppModifier.cs" />
|
<Compile Include="Modifier\AppModifier.cs" />
|
||||||
<Compile Include="Modifier\FileHexEditor.cs" />
|
<Compile Include="Modifier\FileHexEditor.cs" />
|
||||||
|
@ -69,6 +70,7 @@
|
||||||
<Compile Include="Modifier\QQModifier.cs" />
|
<Compile Include="Modifier\QQModifier.cs" />
|
||||||
<Compile Include="Modifier\TIMModifier.cs" />
|
<Compile Include="Modifier\TIMModifier.cs" />
|
||||||
<Compile Include="Modifier\WechatModifier.cs" />
|
<Compile Include="Modifier\WechatModifier.cs" />
|
||||||
|
<Compile Include="Utils\ByteUtil.cs" />
|
||||||
<Compile Include="Utils\Device.cs" />
|
<Compile Include="Utils\Device.cs" />
|
||||||
<Compile Include="Utils\FileUtil.cs" />
|
<Compile Include="Utils\FileUtil.cs" />
|
||||||
<Compile Include="Utils\GAHelper.cs" />
|
<Compile Include="Utils\GAHelper.cs" />
|
||||||
|
|
31
RevokeMsgPatcher/Utils/ByteUtil.cs
Normal file
31
RevokeMsgPatcher/Utils/ByteUtil.cs
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace RevokeMsgPatcher.Utils
|
||||||
|
{
|
||||||
|
public class ByteUtil
|
||||||
|
{
|
||||||
|
public static byte[] HexStringToByteArray(string hex)
|
||||||
|
{
|
||||||
|
hex = hex.Replace(" ", "");
|
||||||
|
return Enumerable.Range(0, hex.Length)
|
||||||
|
.Where(x => x % 2 == 0)
|
||||||
|
.Select(x => Convert.ToByte(hex.Substring(x, 2), 16))
|
||||||
|
.ToArray();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static string ByteArrayToHexString(byte[] data)
|
||||||
|
{
|
||||||
|
StringBuilder sb = new StringBuilder(data.Length * 3);
|
||||||
|
foreach (byte b in data)
|
||||||
|
{
|
||||||
|
sb.Append(Convert.ToString(b, 16).PadLeft(2, '0').PadRight(3, ' '));
|
||||||
|
}
|
||||||
|
return sb.ToString().ToUpper();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user