开发者

Obfuscation of assemblies that reference 3rd party assemblies

开发者 https://www.devze.com 2023-02-12 14:32 出处:网络
I am ready to wrap up a big project for a client. The requirements are, the final assembly must be a single assembly. Normally I obfuscate all my assemblies together and it results in a single file. T

I am ready to wrap up a big project for a client. The requirements are, the final assembly must be a single assembly. Normally I obfuscate all my assemblies together and it results in a single file. This time however i'm referencing 3rd party assemblies such as PostSharp, Enterprise Libraries, and some specific vendor APIs.

When I obfuscate the project, I end up with a single assembly but it no longer works.

The project is a plugin for ACT! which requires a class to implement a specific interface. If I build and copy all output files to the plugin folder it works as expected and ACT! will see the plugin and it will work. Using the single obfuscated assembly, it no longer works. ACT! will not see the plugin.

I can only imagine that it's caused by these 3rd party references as I've done this on prior projects, just never using any 3rd party assemblies or APIs.

I'm using Xenocode to do 开发者_StackOverflowthe obfuscation but I'll try anything.


The first problem likley not whit the fact that you are using third party assemblies, but most likley interface that ACT! expects and its implementation got obfuscated. Get Reflector or even ILDasm and see if the class you are interested in implements interface(s) required by ACT!

I have not used Xenocode, but I hope it has a way to specify what classes/methods should not be obfuscated. You goal is to keep the interface and its implementation from obfuscation.

Note: I would also recommend to look at licensing requirements of third party components you've used as they may not allow such merging.


You should never obfuscate 3rd party assemblies for following reasons:

  1. You have no control or knowledge of the inner workings of the code to know how obfuscating it will affect its working. Even if you do (for example if its open source), do you want to spend time taking care of any issues that may arise if those assemblies are obfuscated?
  2. Its not your IP, so there is no advantage to be gained from obfuscating 3rd party assemblies but you get all the dis-advantages described in #1.

Try Crypto Obfuscator - it supports including 3rd party assemblies without obfuscating them by listing them as "Additional Dependancies" - you still end up with only one assembly since the dependencies are embedded inside your main assembly and provided during assembly resolution.

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

0

精彩评论

暂无评论...
验证码 换一张
取 消