dotnet dll反编译并更改代码

编程入门 行业动态 更新时间:2024-10-26 01:19:05
本文介绍了dotnet dll反编译并更改代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我需要更改.NET DLL的代码。我可以通过使用.NET反射器可编译DLL来看代码,但是我无法更改DLL的代码。使用.NET Reflector,我反编译代码并保存到我的硬盘中,但是当我能够重新编译代码时给出错误。

I need to change the code of the .NET DLL. I am able to see the code by compilable the DLL with .NET reflector, but I am not able to change the code of the DLL. With .NET Reflector, I decompile the code and saved in to my hard disk, but when i am able to recompile the code its giving errors.

几个代码被反编译二进制格式几个代码用c#反编译。有没有任何改变和重新编译DLL的工具?

Few code is decompiled in binary format few code is decompiled with c#. Is there any tool to change and recompile the DLL?

这是我用来尝试反编译DLL的工具:

Here are the tools I used for trying to decompile the DLL:

  • ILSpy
  • DisSharp
  • Reflector7.1使用Reflexil插件
  • Spices.Net.Suite.5.8
  • 部署.NET 1.0.0
  • devextras.codereflect
  • dotPeek-1.0.0.2545
  • intellilock
  • JustDecompile_BETA_2011.1.728.1
  • ILSpy
  • DisSharp
  • Reflector7.1 With the Reflexil plugin
  • Spices.Net.Suite.5.8
  • Deploy .NET 1.0.0
  • devextras.codereflect
  • dotPeek-1.0.0.2545
  • intellilock
  • JustDecompile_BETA_2011.1.728.1

不幸的是,没有一个工具提供完美的源代码来重新编译DLL代码。

Unfortunately, none of the tools giving perfect source code to recompile the DLL code.

推荐答案

以下代码正在运行:

"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\ildasm.exe" original.dll /out=code.asm echo Here changes to code.asm should be done. C:\Windows\Microsoft.NET\Framework\v4.0.30319\ilasm.exe /dll code.asm

所以如果代码的变化很小,可以直接在汇编代码中进行更改。可以编译和拆卸简单的方法来查看汇编代码的外观。在程序集文件中添加其他方法也不应该太难了。

So if the change in code is to be small, it's doable by making the changes in assembly code directly. One can compile and disassemble simple methods to see how the assembly code should look like. Putting additional methods inside the assembly file should not be too hard too.

当然,代码分析应该使用类似ilspy的工具完成,显示源代码而不是汇编代码

Of course code analyzis should be done using ilspy-like tools, displaying the source code rather than assembly code.

这里使用的工具来自Windows SDK(ildasm)和框架(ilasm)。

Tools employed here come from Windows SDK (ildasm) and from framework (ilasm).

更多推荐

dotnet dll反编译并更改代码

本文发布于:2023-11-09 22:47:51,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1573643.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:反编译   代码   dotnet   dll

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!