开始->Microsoft Visual Studio 2005->Visual Studio Tools->Visual Studio 2005 命令提示,进入原dll文件所在的目录D:/test


下面以Krystalware.SlickUpload.dll为例


运行命令ildasm Krystalware.SlickUpload.dll /out=Krystalware.SlickUpload.il进行反编译.

用记事本打开Krystalware.SlickUpload.il文件,因为我要改的是类x75979804e3328b1e的x8da2e55498083456 ()方法,所以搜索时输入“end of method x75979804e3328b1e::x8da2e55498083456”,这样就能快速定位.

把原来的
.method private hidebysig instance string
          x8da2e55498083456() cil managed
  {
    // 代码大小      22 (0x16)
    .maxstack  8
    IL_0000:  ldstr      " <div style=/"z-index:99999;background-color:#265ecf"
    + ";border-top:1px solid #37b0e5;border-right:1px solid #37b0e5;position:a"
    + "bsolute;right:0;bottom:0;margin:0;padding:.25em .5em .25em .5em;font-si"
    + "ze:80%;background-image:url('http://krystalware.com/SlickUpload.ashx/?ve"
    + "rsion="
    IL_0005:  ldarg.0
    IL_0006:  call      instance string Krystalware.SlickUpload.x75979804e3328b1e::xd82cd904f37d14cc()
    IL_000b:  ldstr      "')/"> <a href=/"http://krystalware.com/Products/Slick"
    + "Upload//" style=/"color:#ffffff;text-decoration:none;/" target=/"_top/" onmo"
    + "useover=/"this.style.textDecoration='underline'/" onmouseout=/"this.style."
    + "textDecoration='none'/">Powered By SlickUpload Evaluation Version </a> </d"
    + "iv>"
    IL_0010:  call      string [mscorlib]System.String::Concat(string,
                                                                string,
                                                                string)
    IL_0015:  ret
  } // end of method x75979804e3328b1e::x8da2e55498083456

换成

  .method private hidebysig instance string
          x8da2e55498083456() cil managed
  {
        // 代码大小      11 (0xb)
    .maxstack  1
    .locals init (string V_0)
    IL_0000:  nop
    IL_0001:  ldstr      ""
    IL_0006:  stloc.0
    IL_0007:  br.s      IL_0009

    IL_0009:  ldloc.0
    IL_000a:  ret
  } // end of method x75979804e3328b1e::x8da2e55498083456

为什么这样换呢?呵呵,IL的语法我也是不太懂的,这里就要借助reflector.

那dll是强命名的,所以还要生成snk文件,命令
sn -k Krystalware.SlickUpload.snk

现在是再编译的时候了,命令
ilasm /dll /res:Krystalware.SlickUpload.res /key:Krystalware.SlickUpload.snk Krystalware.SlickUpload.il /out:Krystalware.SlickUpload.dll
生成成功,更破解后的dll文件替换原来的,OK,讨厌的版权信息没了!

 

posted on 2012-01-06 22:10  阿米  阅读(514)  评论(0编辑  收藏  举报