yck1509 / ConfuserEx

An open-source, free protector for .NET applications
http://yck1509.github.io/ConfuserEx/
Other
3.57k stars 1.63k forks source link

crash application when external assemblies are referenced #368

Open Jasi2169 opened 8 years ago

Jasi2169 commented 8 years ago

Ok right now i am using ConfuserEx v0.5.0-90-gc79a032 latest build

PART 1 :- now let me explain better i can

Now issue comes is that i want to provide it as standalone .exe file

PART 2 :- now i used smart assembly to embed those assemblies without any encryption just embed option and build now they are embedded in new assembly and can be run on other pc without those support assembly now i used confuser on that smart assembly .exe in which i just only embedded those files to make it standalone

now when i protect here is the error

[INFO] Resolving dependencies... [ERROR] Failed to resolve dependency of 'Keymaker.exe'. Exception: dnlib.DotNet.AssemblyResolveException: Could not resolve assembly: MetroFramework, Version=1.3.5.0, Culture=neutral, PublicKeyToken=5f91a84759bf584a at dnlib.DotNet.Extensions.ResolveThrow(IAssemblyResolver self, IAssembly assembly, ModuleDef sourceModule) in c:\projects\confuserex\dnlib\src\DotNet\IAssemblyResolver.cs:line 113 at Confuser.Core.ConfuserEngine.Inspection(ConfuserContext context) in c:\projects\confuserex\Confuser.Core\ConfuserEngine.cs:line 267

Failed at 4:20 PM, 0:00 elapsed.

how i can i embed those assemblies and also protect with confuser ?

if i dont include any of this assembly as reference in my project it will protect the assembly properly but then i lost sound and themeing capabilities

Jasi2169 commented 8 years ago

cud u plz provide option to embedd assemblies ?

yck1509 commented 8 years ago

Hi, You can't use ConfuserEx on already obfuscated assemblies. If you want to embed assemblies, you can use the Packer option.

Jasi2169 commented 8 years ago

thank you i just got to know u have to drag n drop other assemblies as well to embed in it ,thanks brother :)

ivan-danilov commented 8 years ago

@yck1509 could you elaborate why you "can't use ConfuserEx on already obfuscated assemblies"? I have a library that is partially obfuscated (private/internal parts) and by its license I must obfuscate the rest before releasing my product. Given how it looks I'd say only renames to sequential english letters and control flow protections were applied, i.e. I can open it in ILSpy/dotPeek without issues and get a logic. Vendor proposes using dotfuscator and even provides sample configuration, but I'd like to use ConfuserEx instead. Actually I don't have any errors during obfuscation process, but result is not executable right now (I have created some issues here). For now I believe it is related to some general issues with ConfuserEx that could be fixed, not some critical flaw.

Should I expect some significant issues due to this partial obfuscation?

yck1509 commented 8 years ago

@ivan-danilov: Generally, you can't use ConfuserEx on assemblies already obfuscated by ConfuserEx itself, as protections by ConfuserEx are sensitive to modification. However, if the obfuscated assemblies do not have such protections (e.g. only renaming is applied), then obfuscation could be applied without problems.