刚刚尝试了混淆
我在我的代码上尝试了 Visual Studio 2010 附带的标准 DotNetObfuscator。
我没有更改代码上的任何标准设置。我对这个工具的行为有点困惑。我尝试通过在反射器中加载两个程序集来比较这些值。
有些东西确实发生了变化,但我仍然能够读取原始程序集中的方法。在使用此工具之前,我需要更改一些设置吗?
I tried the standard DotNetObfuscator that comes with Visual Studio 2010 on my code.
I did not change any standard settings on the code. I am a little puzzled by the behaviour of this tool. I tried to compare the values by loading both assemblies in reflector.
Somethings have definitely changed, but I am stil able to read the method as it is in the original assembly. Is there some setting that I need to change, before using this tool?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不确定您到底看到了什么,但是公共方法名称一定不能被混淆——由于它们是公共的,它们必须保持可由程序集外部的调用者调用。私有(可能还有内部)方法的名称可能会被混淆,方法中的实现细节也可能会被混淆,但即使名称很奇怪,仍然可以使用 Reflector 读取。各种混淆工具可能会提供进一步的功能,帮助防止使用 Reflector 等工具,但它们生成可验证 IL 的能力可能会有所不同,或者以我不太理解的其他方式。
混淆不是一种加密手段——它只会减慢读者的速度。
Not sure what exactly you you saw, but public method names mustn't be obfuscated--by virtue of their being public they must remain callable by callers outside the assembly. Private (and possibly internal) methods could have their names obfuscated, as can implementation details within methods, but may still be readable with Reflector even if the names are odd. Various obfuscation tools may provide further features that help prevent the use of tools like Reflector, but may vary in their ability to generate verifiable IL or in other ways I don't particularly understand.
Obfuscation is not a means of encryption--it only slows down the reader.