修改已编译的.Net Exe [英] Modify Compiled .Net Exe
问题描述
我有一个用C#编写的应用程序(当然没有源代码),需要稍作更改。例如,我需要停止几行代码来创建不必要的菜单。所以我认为我应该将它们注释掉。
I have an application written in C# (without the source of course), that needs to be changed a little bit. For example, I need to stop a few lines of code that create an unnecessary menu. So I think I should comment them out.
源代码没有被混淆。我知道我可以使用Reflector / Reflexil之类的工具完全反编译,更改和重新编译。但是每个人都知道,这样做,代码的许多部分将不会再次编译!
The source code is not obfuscated. I know I can completely decompile, change, and compile again, using tools like Reflector/Reflexil. But everyone knows that by doing this, many parts of code won't compile again! Is there a way in Reflector (or any other product) that a part of could be disabled/changed without this process?
谢谢。
推荐答案
最终,我设法禁用了已编译的exe文件中的几行代码。
Eventually I managed to "disable" a few lines of code in the compiled exe.
I安装了Reflexil插件的二手Reflector。 Reflexil允许我编辑MSIL指令,然后将结果保存回exe文件。因此,它涉及学习一些MSIL指令,尤其是无操作命令(使一行代码无所作为)。要查看说明列表和教程,请参见此处和此处。
I used Reflector with Reflexil plugin installed. Reflexil allowed me to edit an MSIL instruction, and then save the result back to an exe file. So, it involved learning a few MSIL instructions, especially the "no operation" command (making a line of code do nothing). To see the list of instructions and a tutorial, see here and here.
希望对别人有帮助。
这篇关于修改已编译的.Net Exe的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!