2 Commits
v0.2 ... v0.2.1

Author SHA1 Message Date
Suxue
77d3d3628d 忘了更新md了 2023-09-08 14:32:47 +08:00
Suxue
b0d4210c04 版本支持拆分 2023-09-08 14:26:43 +08:00
5 changed files with 39 additions and 5 deletions

View File

@@ -1,10 +1,16 @@
using System;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Text.Json.Serialization;
using System.Threading.Tasks;
using WechatPCMsgBakTool.Model;
namespace WechatPCMsgBakTool.Helpers
{
public class DecryptionHelper
@@ -33,8 +39,20 @@ namespace WechatPCMsgBakTool.Helpers
{
return null;
}
string json = File.ReadAllText("version.json");
List<VersionInfo>? info = JsonConvert.DeserializeObject<List<VersionInfo>?>(json);
if (info == null)
return null;
if (info.Count == 0)
return null;
VersionInfo? cur = info.Find(x => x.Version == version);
if (cur == null)
return null;
//这里加的是版本偏移量,兼容不同版本把这个加给改了
long baseAddress = (long)module.BaseAddress + 62031872;
long baseAddress = (long)module.BaseAddress + cur.BaseAddr;
byte[]? bytes = ProcessHelper.ReadMemoryDate(process.Handle, (IntPtr)baseAddress, 8);
if (bytes != null)
{

View File

@@ -19,4 +19,10 @@ namespace WechatPCMsgBakTool.Model
public string UserName { get; set; } = "";
public string NickName { get; set; } = "";
}
public class VersionInfo
{
public string Version { get; set; } = "";
public int BaseAddr { get; set; }
}
}

View File

@@ -1,7 +1,7 @@
# WechatPCMsgBakTool
微信PC聊天记录备份工具仅支持Windows
- 当前仅支持3.9.6.33版本,后续将版本文件拆分出来
- 当前仅支持3.9.6.33版本,若版本更新可在version.json添加版本号和地址即可完成新版本支持
- 导出图片、视频、音频
- 导出Html文件

View File

@@ -6,11 +6,12 @@
<Nullable>enable</Nullable>
<UseWPF>true</UseWPF>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<AssemblyVersion>0.2.0.0</AssemblyVersion>
<FileVersion>0.2.0.0</FileVersion>
<AssemblyVersion>0.2.1.0</AssemblyVersion>
<FileVersion>0.2.1.0</FileVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="sqlite-net-pcl" Version="1.8.116" />
</ItemGroup>
@@ -27,6 +28,9 @@
<None Update="Tools\silk_v3_decoder.exe">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="version.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>

6
version.json Normal file
View File

@@ -0,0 +1,6 @@
[
{
"Version": "3.9.6.33",
"BaseAddr": 62031872
}
]