From b1b339ac6304e6726d40b81bfd9b7bf934da24b6 Mon Sep 17 00:00:00 2001 From: huiyadanli Date: Sun, 6 Oct 2019 13:18:11 +0800 Subject: [PATCH] =?UTF-8?q?[+]=20=E4=B8=80=E4=B8=AA=E8=BE=85=E5=8A=A9?= =?UTF-8?q?=E4=B8=BB=E7=A8=8B=E5=BA=8F=E7=BC=96=E5=86=99=E7=9A=84=E7=A8=8B?= =?UTF-8?q?=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- RevokeMsgPatcher.Assistant/App.config | 6 + .../FormAssisant.Designer.cs | 48 +++++ RevokeMsgPatcher.Assistant/FormAssisant.cs | 25 +++ RevokeMsgPatcher.Assistant/FormAssisant.resx | 120 +++++++++++ RevokeMsgPatcher.Assistant/JsonData.cs | 194 ++++++++++++++++++ RevokeMsgPatcher.Assistant/Program.cs | 22 ++ .../Properties/AssemblyInfo.cs | 36 ++++ .../Properties/Resources.Designer.cs | 71 +++++++ .../Properties/Resources.resx | 117 +++++++++++ .../Properties/Settings.Designer.cs | 30 +++ .../Properties/Settings.settings | 7 + .../RevokeMsgPatcher.Assistant.csproj | 112 ++++++++++ 12 files changed, 788 insertions(+) create mode 100644 RevokeMsgPatcher.Assistant/App.config create mode 100644 RevokeMsgPatcher.Assistant/FormAssisant.Designer.cs create mode 100644 RevokeMsgPatcher.Assistant/FormAssisant.cs create mode 100644 RevokeMsgPatcher.Assistant/FormAssisant.resx create mode 100644 RevokeMsgPatcher.Assistant/JsonData.cs create mode 100644 RevokeMsgPatcher.Assistant/Program.cs create mode 100644 RevokeMsgPatcher.Assistant/Properties/AssemblyInfo.cs create mode 100644 RevokeMsgPatcher.Assistant/Properties/Resources.Designer.cs create mode 100644 RevokeMsgPatcher.Assistant/Properties/Resources.resx create mode 100644 RevokeMsgPatcher.Assistant/Properties/Settings.Designer.cs create mode 100644 RevokeMsgPatcher.Assistant/Properties/Settings.settings create mode 100644 RevokeMsgPatcher.Assistant/RevokeMsgPatcher.Assistant.csproj diff --git a/RevokeMsgPatcher.Assistant/App.config b/RevokeMsgPatcher.Assistant/App.config new file mode 100644 index 0000000..8e15646 --- /dev/null +++ b/RevokeMsgPatcher.Assistant/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/RevokeMsgPatcher.Assistant/FormAssisant.Designer.cs b/RevokeMsgPatcher.Assistant/FormAssisant.Designer.cs new file mode 100644 index 0000000..c8b1bb3 --- /dev/null +++ b/RevokeMsgPatcher.Assistant/FormAssisant.Designer.cs @@ -0,0 +1,48 @@ +namespace RevokeMsgPatcher.Assistant +{ + partial class FormAssisant + { + /// + /// 必需的设计器变量。 + /// + private System.ComponentModel.IContainer components = null; + + /// + /// 清理所有正在使用的资源。 + /// + /// 如果应释放托管资源,为 true;否则为 false。 + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows 窗体设计器生成的代码 + + /// + /// 设计器支持所需的方法 - 不要修改 + /// 使用代码编辑器修改此方法的内容。 + /// + private void InitializeComponent() + { + this.SuspendLayout(); + // + // FormMain + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(508, 262); + this.Name = "FormMain"; + this.Text = "冷血无情的助手界面"; + this.Load += new System.EventHandler(this.FormMain_Load); + this.ResumeLayout(false); + + } + + #endregion + } +} + diff --git a/RevokeMsgPatcher.Assistant/FormAssisant.cs b/RevokeMsgPatcher.Assistant/FormAssisant.cs new file mode 100644 index 0000000..372c33a --- /dev/null +++ b/RevokeMsgPatcher.Assistant/FormAssisant.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace RevokeMsgPatcher.Assistant +{ + public partial class FormAssisant : Form + { + public FormAssisant() + { + InitializeComponent(); + } + + private void FormMain_Load(object sender, EventArgs e) + { + Console.WriteLine(new JsonData().BagJson()); + } + } +} diff --git a/RevokeMsgPatcher.Assistant/FormAssisant.resx b/RevokeMsgPatcher.Assistant/FormAssisant.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/RevokeMsgPatcher.Assistant/FormAssisant.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/RevokeMsgPatcher.Assistant/JsonData.cs b/RevokeMsgPatcher.Assistant/JsonData.cs new file mode 100644 index 0000000..cb05a1b --- /dev/null +++ b/RevokeMsgPatcher.Assistant/JsonData.cs @@ -0,0 +1,194 @@ +using RevokeMsgPatcher.Model; +using System.Collections.Generic; +using System.Web.Script.Serialization; + +namespace RevokeMsgPatcher +{ + /// + /// 补丁信息 + /// + public class JsonData + { + + public Bag Bag() + { + return new Bag + { + Apps = AppConfig(), + LatestVersion = "0.5", + Notice = "公告" + }; + } + + public string BagJson() + { + JavaScriptSerializer serializer = new JavaScriptSerializer(); + return serializer.Serialize(Bag()); + } + + public Dictionary AppConfig() + { + return new Dictionary + { + { "Wechat" , Wechat() }, + { "QQ" , QQ() }, + { "TIM" , TIM() } + }; + } + + public string AppConfigJson() + { + JavaScriptSerializer serializer = new JavaScriptSerializer(); + return serializer.Serialize(AppConfig()); + } + + public App Wechat() + { + return new App + { + Name = "Wechat", + FileTargetInfos = new Dictionary + { + { + "WeChatWin.dll", + new TargetInfo + { + Name = "WeChatWin.dll", + RelativePath = "WeChatWin.dll" + } + } + }, + FileModifyInfos = new Dictionary> + { + { + "WeChatWin.dll", + new List + { + new ModifyInfo { + Name="WeChatWin.dll", + Version="2.7.1.65", + SHA1Before="8346b97d264725da924d240c6eb77df3e693385e", + SHA1After="42bab2c9c79ef4f2088c00ea6d817973e14a5e6e", + Changes = new List + { + new Change + { + Position =2495545, + Content =new byte[] { 235} + } + } + }, + new ModifyInfo {Name="WeChatWin.dll",Version="2.7.1.59",SHA1Before="df954d403edaca89cd5394927a325a0023e93281",SHA1After="6aa22460c91bb5c5e2f0ec1af99b8a5f6d4318c0",Changes = new List { new Change {Position=2496073,Content=new byte[] { 235} } } },new ModifyInfo {Name="WeChatWin.dll",Version="2.7.1.43",SHA1Before="39cd9e09e1a3eac09e6808749bff525c9e3216ce",SHA1After="7b829f1ff0217e346a80f9510fdd7634ddd49445",Changes = new List { new Change {Position=2494169,Content=new byte[] { 235} } } },new ModifyInfo {Name="WeChatWin.dll",Version="2.7.0.70",SHA1Before="3b0601864aff3c1d792f812ad1ca05f02aa761e3",SHA1After="1e8734d32b0a8c12758e30f99c77f729991fb071",Changes = new List { new Change {Position=2475657,Content=new byte[] { 235} } } },new ModifyInfo {Name="WeChatWin.dll",Version="2.7.0.65",SHA1Before="063c2e05a0df1bdb8987c2d978d93499bd2052ba",SHA1After="5ed4c09a4f18643b967f063a824d7e65d0567f8a",Changes = new List { new Change {Position=2475449,Content=new byte[] { 117} } } },new ModifyInfo {Name="WeChatWin.dll",Version="2.6.8.68",SHA1Before="2e9417f4276b12fe32ca7b4fee49272a4a2af334",SHA1After="699602ee3cbb9ae5714f6e6ebc658c875a6c66e6",Changes = new List { new Change {Position=2454006,Content=new byte[] { 116} } } },new ModifyInfo {Name="WeChatWin.dll",Version="2.6.8.65",SHA1Before="e01f6855a96c12c30808960903ed199a33e4952c",SHA1After="d9120569cfd0433aebea107d7b90805cbbac7518",Changes = new List { new Change {Position=2454265,Content=new byte[] { 117} } } },new ModifyInfo {Name="WeChatWin.dll",Version="2.6.8.52",SHA1Before="88131302f664df6a657c9ca49d152da536fe5729",SHA1After="8d1454b73831644181e962c1fa0ea4e2da4124a3",Changes = new List { new Change {Position=2453049,Content=new byte[] { 117} } } },new ModifyInfo {Name="WeChatWin.dll",Version="2.6.8.51",SHA1Before="d0a5517b1292a751501b00b4b1f0702db2d9fc30",SHA1After="53e7b1525d49bf2c3250a8131ff0ba2510779b78",Changes = new List { new Change {Position=2452614,Content=new byte[] { 116} } } },new ModifyInfo {Name="WeChatWin.dll",Version="2.6.8.37",SHA1Before="7e01f8b04a158a4a50bc5a6e67c2fb8b02233170",SHA1After="a1895004415fe9bcd7e690bd6e482b833b515599",Changes = new List { new Change {Position=2452614,Content=new byte[] { 116} } } },new ModifyInfo {Name="WeChatWin.dll",Version="2.6.7.57",SHA1Before="80a91aaf941bcb1c24a7d672838ac73e9ebb2e40",SHA1After="a0d3f9a45a835f97aef7fe0872387d8cfb5c25a4",Changes = new List { new Change {Position=2433413,Content=new byte[] { 116} } } },new ModifyInfo {Name="WeChatWin.dll",Version="2.6.7.40",SHA1Before="04bd0cb28df6630b518f42a3f9c2caa4a9359fbc",SHA1After="13c91cf1d4609959771fd137b9a86a5ca365e1b6",Changes = new List { new Change {Position=2432934,Content=new byte[] { 116} } } },new ModifyInfo {Name="WeChatWin.dll",Version="2.6.7.32",SHA1Before="a02519c1007ee6723947c262c720d63c619f633e",SHA1After="f3007471ca8734c29783c25f0bb49949a783a44",Changes = new List { new Change {Position=2432806,Content=new byte[] { 116} } } },new ModifyInfo {Name="WeChatWin.dll",Version="2.6.6.28",SHA1Before="0b19cb17a62c3ea0efce0fb675a1d3b17845cba3",SHA1After="260948656725446b818ea668273ceff02ddfb44d",Changes = new List { new Change {Position=2401678,Content=new byte[] { 116} } } } + } + } + } + }; + } + + public App QQ() + { + return new App + { + Name = "QQ", + FileTargetInfos = new Dictionary + { + { + "IM.dll", + new TargetInfo + { + Name = "IM.dll", + RelativePath = @"Bin\IM.dll" + } + } + }, + FileModifyInfos = new Dictionary> + { + { + "IM.dll", + new List + { + new ModifyInfo + { + Name = "IM.dll", + Version = "9.1.7.25980", + SHA1Before = "c6632339fbe675312a70ae4620e70699c258cd36", + SHA1After = "e9ddc5cc681950796fc8fe4c55f580428c890b51", + Changes = new List + { + new Change + { + Position = 0x0005009F, + Content = new byte[] { 0xEB, 0x90, 0x90, 0x90, 0x90 } + }, + new Change + { + Position = 0x000502BC, + Content = new byte[] { 0xEB, 0x90, 0x90, 0x90, 0x90 } + }, + new Change + { + Position = 0x0005046C, + Content = new byte[] { 0xEB, 0x08, 0x90, 0x90, 0x90, 0x90 } + } + } + } + } + } + } + }; + } + + public App TIM() + { + return new App + { + Name = "TIM", + FileTargetInfos = new Dictionary + { + { + "IM.dll", + new TargetInfo + { + Name = "IM.dll", + RelativePath = @"Bin\IM.dll" + } + } + }, + FileModifyInfos = new Dictionary> + { + { + "IM.dll", + new List + { + new ModifyInfo + { + Name = "IM.dll", + Version = "2.3.2.21173", + SHA1Before = "ecf3e69f3fb100ffe2fee095ffded591b9781024", + SHA1After = "0514d1304e7ac46b4d33386ec3313888f5ae7171", + Changes = new List + { + new Change + { + Position = 0x0004D78A, + Content = new byte[] { 0xEB, 0x90, 0x90, 0x90, 0x90 } + }, + new Change + { + Position = 0x0004D9A7, + Content = new byte[] { 0xEB, 0x90, 0x90, 0x90, 0x90 } + }, + new Change + { + Position = 0x0004DB57, + Content = new byte[] { 0xEB, 0x08, 0x90, 0x90, 0x90, 0x90 } + } + } + } + } + } + } + }; + } + } +} diff --git a/RevokeMsgPatcher.Assistant/Program.cs b/RevokeMsgPatcher.Assistant/Program.cs new file mode 100644 index 0000000..7509010 --- /dev/null +++ b/RevokeMsgPatcher.Assistant/Program.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace RevokeMsgPatcher.Assistant +{ + static class Program + { + /// + /// 应用程序的主入口点。 + /// + [STAThread] + static void Main() + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new FormAssisant()); + } + } +} diff --git a/RevokeMsgPatcher.Assistant/Properties/AssemblyInfo.cs b/RevokeMsgPatcher.Assistant/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..b3a3ffb --- /dev/null +++ b/RevokeMsgPatcher.Assistant/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 有关程序集的一般信息由以下 +// 控制。更改这些特性值可修改 +// 与程序集关联的信息。 +[assembly: AssemblyTitle("RevokeMsgPatcher.Assistant")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("RevokeMsgPatcher.Assistant")] +[assembly: AssemblyCopyright("Copyright © 2019")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// 将 ComVisible 设置为 false 会使此程序集中的类型 +//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 +//请将此类型的 ComVisible 特性设置为 true。 +[assembly: ComVisible(false)] + +// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID +[assembly: Guid("6992004f-17e6-45bf-8d72-180a31e9c23c")] + +// 程序集的版本信息由下列四个值组成: +// +// 主版本 +// 次版本 +// 生成号 +// 修订号 +// +// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号 +// 方法是按如下所示使用“*”: : +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/RevokeMsgPatcher.Assistant/Properties/Resources.Designer.cs b/RevokeMsgPatcher.Assistant/Properties/Resources.Designer.cs new file mode 100644 index 0000000..92146a4 --- /dev/null +++ b/RevokeMsgPatcher.Assistant/Properties/Resources.Designer.cs @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// +// 此代码由工具生成。 +// 运行时版本: 4.0.30319.42000 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace RevokeMsgPatcher.Assistant.Properties +{ + + + /// + /// 强类型资源类,用于查找本地化字符串等。 + /// + // 此类是由 StronglyTypedResourceBuilder + // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。 + // 若要添加或删除成员,请编辑 .ResX 文件,然后重新运行 ResGen + // (以 /str 作为命令选项),或重新生成 VS 项目。 + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources + { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() + { + } + + /// + /// 返回此类使用的缓存 ResourceManager 实例。 + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager + { + get + { + if ((resourceMan == null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("RevokeMsgPatcher.Assistant.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// 覆盖当前线程的 CurrentUICulture 属性 + /// 使用此强类型的资源类的资源查找。 + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture + { + get + { + return resourceCulture; + } + set + { + resourceCulture = value; + } + } + } +} diff --git a/RevokeMsgPatcher.Assistant/Properties/Resources.resx b/RevokeMsgPatcher.Assistant/Properties/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/RevokeMsgPatcher.Assistant/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/RevokeMsgPatcher.Assistant/Properties/Settings.Designer.cs b/RevokeMsgPatcher.Assistant/Properties/Settings.Designer.cs new file mode 100644 index 0000000..50ea233 --- /dev/null +++ b/RevokeMsgPatcher.Assistant/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace RevokeMsgPatcher.Assistant.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase + { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default + { + get + { + return defaultInstance; + } + } + } +} diff --git a/RevokeMsgPatcher.Assistant/Properties/Settings.settings b/RevokeMsgPatcher.Assistant/Properties/Settings.settings new file mode 100644 index 0000000..3964565 --- /dev/null +++ b/RevokeMsgPatcher.Assistant/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/RevokeMsgPatcher.Assistant/RevokeMsgPatcher.Assistant.csproj b/RevokeMsgPatcher.Assistant/RevokeMsgPatcher.Assistant.csproj new file mode 100644 index 0000000..77adbd5 --- /dev/null +++ b/RevokeMsgPatcher.Assistant/RevokeMsgPatcher.Assistant.csproj @@ -0,0 +1,112 @@ + + + + + Debug + AnyCPU + {6992004F-17E6-45BF-8D72-180A31E9C23C} + WinExe + RevokeMsgPatcher.Assistant + RevokeMsgPatcher.Assistant + v4.5 + 512 + true + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + Form + + + FormAssisant.cs + + + + + + FormAssisant.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + + + + {977bf781-ced8-4389-9404-0fa08fdf21df} + RevokeMsgPatcher + + + + + False + .NET Framework 3.5 SP1 + false + + + + \ No newline at end of file