Is there a way to prevent dll from being opened in

2020-07-22 09:44发布

HI, Is there a way to prevent a particular dll in C# being opened in reflector. I can open many of the dll's and can get the code using reflector. But when trying to open some dll's it shows an error message stating that "The particual dll does not contain a CLI header.".

How can I make a dll like this??

标签: c# reflector
4条回答
何必那么认真
2楼-- · 2020-07-22 10:10

There is no way to prevent Reflector from opening .Net assemblies, but you make make it pointless by obfuscating your assemblies. After obfuscating, class/method/fields are renamed, inline strings in methods are encrypted, method calls are hidden, method control flow is scrambled and so on. So, anybody who use Reflector will see a lot of garbage and will not be able to make sense of most of it.

DISCLAIMER: I work for LogicNP Software, the developers of Crypto Obfuscator

查看更多
相关推荐>>
3楼-- · 2020-07-22 10:18

If you want to protect your .net dll you could obfuscate your assembly

Free .NET Obfuscation Tools

You have commercial ones too...

"The particual dll does not contain a CLI header.". message appears in Reflector because they are not managed dlls (.net).

查看更多
地球回转人心会变
4楼-- · 2020-07-22 10:19

I thought there was once a certain IL code which caused a crash in the reflector. But this bug is fixed now.

Obfuscation is nice - You can also try to encrypt certain critical parts of your code and decrypt+load+compile it at runtime. The problem is how to store the password.

You can't prevent it from being opened by the reflector.

查看更多
SAY GOODBYE
5楼-- · 2020-07-22 10:25

Are you sure that these DLLs are managed-code-dlls? I don't think so, if they don't contain the CLI header, they aren't written in C#.

And for your question, you can't prevent a managed-DLL from being opened in a decompiler, all what you can do is to obfuscate it.

查看更多
登录 后发表回答