.net 中的代码保护和代码编织

发布于 2024-08-20 23:56:08 字数 188 浏览 6 评论 0原文

我尝试使用 clisecure 和 postsharp 制作的代码保护(代码已加密且无法反映),但在解决方案中使用 post Sharp 时,受保护的 dll 将无法编译。我只使用 PostSharp.Laos 和 PostSharp.Public

您尝试过这样的组合吗?你成功了吗?如果是这样,请告诉您您使用的是哪种混淆工具和哪种代码编织框架?

I tried to use code protection (code is encrypted and can't be reflected) made by clisecure with postsharp but secured dlls won't compile when post sharp is used in solution. I use just PostSharp.Laos and PostSharp.Public

Have You ever tried such combination? Did you manage to make it work. If so please tell what obfuscation tool and what code weaving framework have you been using?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

深爱不及久伴 2024-08-27 23:56:08

我已经成功地结合使用了 Dotfuscator 和 Postsharp,但仅使用了编译时 IL Weaving,还没有使用任何运行时拦截。只要您混淆 PostSharp 编译后编织输出的二进制文件,一切都应该相当简单。

通常的混淆警告适用于任何横切代码(尤其是在使用反射的情况下),因为混淆会更改符号名称,并且您需要排除任何将被反射或使用后期绑定的符号进行重命名或修剪。

I have successfully used Dotfuscator and Postsharp in combination but only with the compile time IL Weaving and not yet with any runtime interception. Everything should be fairly straightforward as long as you obfuscate the binary that PostSharp post-compilation weaving outputs.

The usual obfuscation caveats apply to any of your cross cutting code (especially where you use reflection) as obfuscation changes symbol names and you will need to exclude any symbols from being renamed or pruned that will be reflected upon or that use late binding.

等待我真够勒 2024-08-27 23:56:08

使用混淆器时有一些技巧。例如,您无法更改切面类型的名称和切面类型的字段,因为切面由 PostSharp 序列化并在运行时反序列化。您可能希望对方面使用混淆异常。

另一个问题是您无法重命名某些方面目标的方法。我认为这种情况仅发生在泛型方法或泛型类型的方法中。

另一种方法是使用不重命名代码的混淆器,例如 WIBU。不过,我没有尝试。

There are some tricks when using an obfuscator. For instance, you cannot change the name of aspect types and fields of aspect types because aspect are serialized by PostSharp and deserialized at runtime. You may want to use obfuscation exceptions for aspects.

Another issue is that you cannot rename some methods that are the target of aspects. I think this happens only with generic methods or methods of generic types.

An alternative is to use an obfuscator that does not rename the code, such as WIBU. I did not try, however.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文