修改编译的.Net Exe [英] Modify Compiled .Net Exe

查看:29
本文介绍了修改编译的.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 等工具完全反编译、更改和再次编译.但是大家都知道,这样做的话,很多部分的代码将无法再次编译!Reflector(或任何其他产品)中是否有办法在没有此过程的情况下禁用/更改其一部分?

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.

我使用安装了 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆