首先!本文只作交流学习记录之用 学习目的是稍深入了解.NET程序 若侵犯了您的权益 请及时联系本人 我承诺将在第一时间内删除相关内容!因此带来的损失和不便请忽略,谢谢!
为什么选Snip-It Pro下手呢?在Silverlight Firestarter的视频上看到Jesse Liberty 用的挺happy 就下来试试了 挺好!平时多用onenote摘录 可惜用起来还是稍微繁琐 Snip-It Pro可以吸附在边栏 正好一直用2显示器 不怕占空间 而且能随手snip。当然最关键的下手原因是国外软件··· 作者有提供免费获取Snip-It Pro序列号的条件(不是极度渴望money 臆测···) 软件保护机制不复杂 适合初级.NET XXX 其中license组件包括QlmLicenseLib.dll和IsLicense30.dll 但保护依旧是脆弱的 虽然有dotfuscator····
好了 开始
需要 .NET Reflector 、ILDASM.EXE 和 ILASM.EXE、文本编辑器
- 1.在Reflector 中载入SnipItPro.exe,分析下源码,可以看到类似下面这段代码:
- public LicenseMgr(string licenseKey)
- {
- this.license = new QlmLicense();
- this.license.DefineProduct(1, "Snip-It Pro", 1, 0, "SkunkyFo78!", "{24EAA3C1-3DD7-40E0-AEA3-D20AA17A6005}");
- bool flag = false;
- this.license.ValidateLicense(licenseKey);
- int num = 2;
- if ((this.IsTrue(num,
|| this.IsTrue(num, 0x10)) || ((this.IsTrue(num, 0x20) || this.IsTrue(num, 0x100)) || this.IsTrue(num, 0x80)))
- {
- flag = false;
- this.Status = LicenseStatus.Invalid;
- }
- else if (this.IsTrue(num, 4))
- {
- if (this.IsTrue(num, 0x40))
- {
- this.Status = LicenseStatus.DemoExpired;
- flag = false;
- }
- else
- {
- this.Status = LicenseStatus.Demo;
- flag = true;
- }
- }
- else if (this.IsTrue(num, 2))
- {
- this.Status = LicenseStatus.Permanent;
- flag = true;
- }
- this.Valid = flag;
- }
可以看到status=2时是LicenseStatus.Permanent,即注册状态。现在要做的当然就是要status永久是个2啦
2.用ILDASM.EXE将SnipItPro.exe 反编成IL 中间代码:
运行 输入
ildasm /source E:\test\SnipItPro.exe /out=E:\test\crack.il
得到的crack.il就是SnipItPro.exe的中间代码了 当然还有相关的resource文件
3.现在分析crack.il:
用你顺手的文本编辑器打开crack.il;找到this.license.ValidateLicense(licenseKey); 对应的IL位置在
···
IL_003e: ldarg.0
IL_003f: ldfld class [QlmLicenseLib]InteractiveStudios.QlmLicenseLib.QlmLicense SnipItPro.Infrastructure.Library.Services.LicenseMgr::license
IL_0044: callvirt instance valuetype [QlmLicenseLib]InteractiveStudios.QlmLicenseLib.ELicenseStatus [QlmLicenseLib]InteractiveStudios.QlmLicenseLib.QlmLicense::GetStatus()
IL_0049: stloc.1
····
现在将IL_003e和IL_003f的内容都nop掉,IL_0044强制status为2,加上这句ldc.i4.2,改完如下:
····
IL_003e:nop
IL_003f:nop
IL_0044:ldc.i4.2
IL_0049: stloc.1
····
保存crack.il
4.将crack.il再编回EXE文件
运行 输入 ilasm E:\test\crack.il
将得到的crack.exe改名成SnipItPro.exe 拷到Snip-It Pro安装文件夹覆盖已有文件,运行下看看是不是已经licensed了![]()
需要fixed Snip-It Pro的留言并保证仅学习 自己使用 但!不保证你能用 因为没研究QlmLicenseLib.dll机制 貌似license key有绑机器码的架势···
------------------------------关于Snip-It Pro的介绍--------------------------------------------------------
下面是转自这的关于Snip-It Pro的介绍:
Snip-It Pro 程式碼管理工具
以往程式都是使用檔案管理員來做管理,不過最近看到一個管理工具,畫面不錯看,管理的分類能力也很好
這是官方網站 http://www.snipitpro.com/
運作的畫面
分類
這是作者的 Blog http://www.mtelligent.com/
用起來不會很複雜,卻可以滿足我們管理程式的需求,可以試試喔!
