混淆是一种方法,但它不能防止破坏应用程序的盗版保护安全性。如何确保应用程序不被篡改,如何确保注册机制不会被逆向工程?
此外,还可以将c#应用程序转换为本机代码,而Xenocode的成本太高。
c#提供了很多特性,是编写代码的理想语言,所以用c++重新编写整个代码库是不可能的。
安全证书可以很容易地从. net中的签名程序集中删除。
混淆是一种方法,但它不能防止破坏应用程序的盗版保护安全性。如何确保应用程序不被篡改,如何确保注册机制不会被逆向工程?
此外,还可以将c#应用程序转换为本机代码,而Xenocode的成本太高。
c#提供了很多特性,是编写代码的理想语言,所以用c++重新编写整个代码库是不可能的。
安全证书可以很容易地从. net中的签名程序集中删除。
当前回答
net反应堆
更新
Jared指出de4dot声称能够反编译它。
.NET Reactor provides complete protection for your sensitive intellectual property by converting your .NET assemblies into unmanaged processes which cannot be understood as CIL, and which no existing tool can decompile. Hackers have no access to any intelligible form of your source. Powerful and flexible, the .NET Reactor licensing features allow you to enforce your license conditions and protect your revenue stream by using hardware and software locks. The license manager can build trial or permanent licenses, in a matter of seconds. A fully documented software development kit (SDK), complete with examples, allows you to call the licensing system directly from your code, allowing you to create custom extensions to the licensing system.
其他回答
坦率地说,有时我们需要混淆代码(例如,注册许可类等)。在这种情况下,您的项目不是免费的。在我看来,你应该花钱买个好东西。
Dotfuscator隐藏代码,. net Reflector在尝试反编译时显示错误。
客户端上运行的任何东西都可以被反编译和破解。混淆只会让它更难。我不了解你的应用程序,但99%的情况下,我认为不值得这么做。
只是补充一个警告:如果你打算使用混淆,检查一切仍然工作!混淆可能会改变类名和方法名。因此,如果你使用反射来调用某些方法和/或类(就像在插件架构中),你的应用程序在混淆后可能会失败。另外,堆栈跟踪对于跟踪错误可能是无用的。
根据微软博客中的以下问题:
https://blogs.msdn.microsoft.com/amb/2011/05/27/how-to-prevent-ildasm-from-disassembling-my-net-code/
如何防止ILDASM分解程序集?
. net有一个名为SuppressIldasmAttribute的属性,它可以防止分解代码。例如,考虑以下代码:
using System;
using System.Text;
using System.Runtime.CompilerServices;
[assembly: SuppressIldasmAttribute()]
namespace HelloWorld
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello world...");
}
}
}
如你所见,只有两个不同之处:
我们添加了System.Runtime.CompilerServices命名空间减速。 我们添加了[assembly: SuppressIldasmAttribute()]属性。
在Visual Studio中构建应用程序后,当我们尝试在ILDASM中打开生成的EXE文件时,现在我们得到以下消息:
你和很多人分享的秘密就不是秘密了。如果你的代码中有秘密的东西,混淆它是没有保护的;它只需要去混淆一次。如果你有什么秘密不想和你的客户分享,那就不要和你的客户分享。将代码编写为web服务,并将超级机密代码保存在自己的服务器上,只有您可以看到它。