首页
社区
课程
招聘
[求助] 一个快捷论文排版的word插件
发表于: 2小时前 93

[求助] 一个快捷论文排版的word插件

2小时前
93

在网上看到一个word插件宣传挺好用,下载后需要激活使用,--我使用dnspy打开WordPlugin.dll  搜索license发现 class LicenseValidator  里 VerifyActivationCode、VerifyActivationCodeForKind、VerifyRegisteredLicenseOrClear、VerifyWordPluginDllIntegrity

using System;
using System.Security.Cryptography;
 
namespace WordPlugin
{
    public static class LicenseValidator
    {
        // 修改激活码验证方法,直接返回true
        public static bool VerifyActivationCode(string hardwareFingerprint, string activationCode)
        {
            return true;
        }
 
        // 修改激活码验证方法,直接返回true
        public static bool VerifyActivationCodeForKind(ActivationLicenseKind kind, string fingerprintHexUpper, string activationCodeBase64)
        {
            return true;
        }
 
        // 修改DLL完整性校验方法,直接返回true
        public static bool VerifyWordPluginDllIntegrity(string registrySignatureBase64)
        {
            return true;
        }
 
    }
}

指纹 = SHA256(CPU+主板+系统ID+版本) / USB 指纹 = SHA256(PNPDeviceID+容量)

激活码 = RSA-2048(私钥) 签名的指纹,Base64 存储

VerifyActivationCodeForKind 按 3 种 payload 格式容错验签

DLL 自完整性:自身 SHA256 的 hex 文本由第二把公钥验签,签名存注册表

IsDllIntegrityPublicKeyConfigured→false 

VerifyActivationCode→true 

VerifyActivationCodeForKind→true

然后

在Utils里面有VerifyAssemblyHash:哈希不符→弹系统错误→强退 Word

byte[] array = File.ReadAllBytes(assembly.Location);   // 读 DLL 文件
string hash = SHA256(array) → 去横线 → ToUpper;
if (!hash.Equals(expectedHash))            // 和硬编码的原始哈希比对
    throw ...;                             // 不匹配就抛异常
catch (Exception)
{
    MessageBox("系统错误");
    ThisAddIn.WordApp.Quit(...);           // 直接退出 Word!
}

于是

//VerifyAssemblyHash
private static void VerifyAssemblyHash(Assembly assembly, string expectedHash)
{
    return;
}

public static void checkHash()          { return; }
public static void add()                { return; }
public static void check2()             { return; }
public static void RequireActivation()  { return; }

保存替换后还是不行,求助各位大佬


安装后打包的文件:
328K9s2c8@1M7s2y4Q4x3@1q4Q4x3V1k6Q4x3V1k6D9K9h3q4F1P5r3W2S2i4K6u0W2L8r3q4F1P5X3!0#2N6W2)9J5k6h3y4G2L8g2)9J5c8X3W2G2f1i4u0X3x3%4M7%4z5r3I4A6k6R3`.`.

安装包:ffbK9s2c8@1M7s2y4Q4x3@1q4Q4x3V1k6Q4x3V1k6D9K9h3q4F1P5r3W2S2i4K6u0W2L8r3q4F1P5X3!0#2N6W2)9J5k6h3y4G2L8g2)9J5c8X3V1J5y4q4f1^5x3%4M7%4z5s2q4$3K9b7`.`.密码:6kt1


传递专业知识、拓宽行业人脉——看雪讲师团队等你加入!!

最后于 2小时前 被Lianxia2020编辑 ,原因:
收藏
点赞 0
打赏
分享
最新回复 (0)
游客
登录 | 注册 方可回帖
返回