如何保护DLL。没人能看到dll的源代码。 [英] How to secure dll. No one can see the source code of dll.

查看:75
本文介绍了如何保护DLL。没人能看到dll的源代码。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的朋友们,



我做了一个dll,但它是在另一个软件中打开的。我希望dll不能从任何软件打开。



问候,

Vengaqua

Dear Friends,

I made a dll but it was opened in another software. i want that the dll cannot be opened from any software.

Regards,
Vengaqua

推荐答案

不,你不能。因为.NET程序集是MSIL。它可以被解除。

请检查混淆工具。

用于.NET的Obuscators
No, you can't. Because .NET assembly is MSIL. It can be de-comiled.
Please check obfuscation tools.
Obuscators for .NET


由于每个dll必须是符合CLI规范的有效程序集,因此无法阻止反编译。典型的方法是在释放二进制文件之前在二进制文件上使用混淆器。同样,这不会阻止反编译,但反编译的代码将更难理解。 PreEmptive Dotfuscator Community Edition 随Visual Studio一起提供 [ ^ ]对于一些版本,所以我建议你从那里开始。
You cannot prevent decompilation as such since every dll has to be a valid assembly as per the CLI specification. The typical approach is to use an obfuscator on the binaries before releasing them. Again, this will not prevent decompilation but the decompiled code will be much harder to understand. The Community Edition of PreEmptive Dotfuscator has has shipped with Visual Studio[^] for a few releases so I suggest you start there.


你不是说在另一个软件中打开的意思,但我认为你的意思是你可以反编译.NET程序集并查看实际的源代码。



为此,有混淆。通过模糊你的源代码,人们仍然可以反编译程序集,但理解代码要困难得多(尽管并非不可能)。有几种工具可用,包括免费和付费。



Eazfuscator .NET [ ^ ](免费)

Dotfuscator [ ^ ](社区版是免费的,请参阅Microsoft [ ^ ])

SharpObfuscator [ ^ ](免费)

Confuser [ ^ ](免费)

其他几个人 [ ^ ]



您还需要确保使用代码签名证书(非免费)签署您的应用程序。这将确保您的用户组装来自您(或更确切地说是您的公司)并且未被篡改。



如果您的意思是阻止使用在其他应用程序中进行组装,您可以执行以下操作:

如何防止未经授权的代码访问.NET 2.0中的程序集? [ ^ ]



您需要确保使用强名称密钥对程序集和可执行文件进行签名。
Don't exactly what you mean by "open in another software", but I'll assume you mean you can decompile .NET assemblies and see the actual source code.

For that there is obfuscation. By obfuscating your sources, people will still be able to decompile the assembly, but it'll be a lot harder to understand the code (though not impossible). There are a couple of tools available, both free and paid.

Eazfuscator.NET[^] (free)
Dotfuscator[^] (community edition is free, see more info on that at Microsoft[^])
SharpObfuscator[^] (free)
Confuser[^] (free)
And a few others[^]

You'll also want to make sure you sign your applications with a code signing certificate (not free). This will ensure to your users that the assembly originates from you (or rather your company) and hasn't been tampered with.

If you mean to prevent the use of your assembly in other applications, you can do the following:
How can I prevent unauthorized code from accessing my assembly in .NET 2.0?[^]

You'll need to be sure to sign your assemblies and executables with a Strong Name Key.


这篇关于如何保护DLL。没人能看到dll的源代码。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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