首页 > 开发 > .Net > 正文

FlyTreeView for ASP.NET 3.1 破解手记

2020-02-03 16:00:05
字体:
来源:转载
供稿:网友
这里的datetime(2004, 7, 11)就是控件的过期时间。说来简单,其实要找到它还是费了一番周折的。根据上面的线索,我在用ildasm工具反汇编出的ninerays.web.ui.webcontrols.flytreeview.il文件中找到了对应的il代码如下:
.method private hidebysig specialname rtspecialname static
void .cctor() cil managed
{
// 代码大小 19 (0x13)
.maxstack 4
il_0000: ldsflda valuetype [mscorlib]system.datetime global::trial_expire_date
il_0005: ldc.i4 0x7d4
il_000a: ldc.i4.7
il_000b: ldc.i4.s 11
il_000d: call instance void [mscorlib]system.datetime::.ctor(int32, int32,int32)
il_0012: ret
} // end of method global::.cctor

代码中的0x7d4 便是十六进制的年号2004,我不想太贪,就把它改成2050年吧,十六进制是0x802f

.method private hidebysig specialname rtspecialname static
void .cctor() cil managed
{
// 代码大小 19 (0x13)
.maxstack 4
il_0000: ldsflda valuetype [mscorlib]system.datetime global::trial_expire_date
il_0005: ldc.i4 0x802f
il_000a: ldc.i4.7
il_000b: ldc.i4.s 11
il_000d: call instance void [mscorlib]system.datetime::.ctor(int32, int32,int32)
il_0012: ret
} // end of method global::.cctor

保存前别忘了删除il代码起始部分类似下面的代码
.publickey =(00 24 00 00 04 80 00 00 94 00 00 00 06 02 00 00 // .$..............
00 24 00 00 52 53 41 31 00 04 00 00 01 00 01 00 // .$..rsa1........
cd 62 12 05 0e 7c cd 6f 51 af 2c 41 fd cc 65 44 // .b...|.oq.,a..ed
ac e3 cf 79 6a 19 49 c5 80 c3 ff 52 7c ac 91 1d // ...yj.i....r|...
9b e0 5f ad 28 47 ce f4 e7 e5 ec 87 9f c9 4b e4 // .._.(g........k.
9e 31 c7 97 c2 b8 39 25 c4 ed f6 aa 83 fa 78 a3 // .1....9%......x.
5a 47 c0 f4 7b 44 a8 f9 3f d1 44 a9 b7 96 bf 74 // zg..{d..?.d....t
9e 8d fc b3 99 82 11 52 a9 5c 7a 37 eb a3 82 b6 // .......r./z7....
9d a5 8b 7a 1c 87 da 5c ed 0b 7a 72 ba b1 3f 12 // ...z.../..zr..?.
52 c6 2f 50 dd 35 44 06 e6 f3 b0 4b af f4 19 bd ) // r./p.5d....k....

再用ilasm重新编译ninerays.web.ui.webcontrols.flytreeview.il及其附属文件,一个破解过的ninerays.web.ui.webcontrols.flytreeview.dll便产生了。用visual studio .net打开安装flytreeview时安装文件自动创建的示例站点flytreeview for asp.net/samples中的samples项目,将项目引用中ninerays.web.ui.webcontrols.flytreeview.dll移除,然后重新添加引用并选择破解后的ninerays.web.ui.webcontrols.flytreeview.dll。l
最后,重新生成一次samples项目并在浏览器中测试示例站点,破解大功告成。
另外,这段文章是我直接在线编辑的,感觉这个web编辑器的改动还是成功的比上次使用舒服多了。不过,中间在转换 设计 和 html
时如果赶上页面自动回传,会出现 html 代码出现在 设计
界面上的情况,幸亏我明白一点机理,马上把有关代码在反粘回来,才不致一切重新来过。

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表