我需要更改.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反编译并更改代码
发布评论