Dealing with .netmodule files
Hi, Is it possible to support .netmodule files? not only DLL files. I have .netmodules files need to protect, some tools like dnSpy can convert .netmodule to dll, however when I convert back from dll to .netmodule, the file is corrupted, so I need to protect .netmodule files directly without conversion.
Thanks.
The problem is that dnspy and ConfuserEx are using the same library to handle assemblies and modules (dnlib). So even if I add the support for directly working with netmodules you'd like encounter the same issue.
Is the module actually being corrupted if you just put it into an assembly and pull it back out right away (without obfuscating it)?
If so, the question is why dnSpy is corrupting the netmodule. That is a question for @0xd4d over at 0xd4d/dnSpy. Placing the module in an assembly and pulling it back out shouldn't corrupt it.
Hi, thanks for your reply, the issue is the application is using a DLL with OnDisk metadata (i.e: hosing its module as external .netmodule files), so to use Confuser, I had to convert it to DLL, then protect it, then convert it back to .netmodule file, the problem, is when converting the protected DLL back to .netmodule, it does not produce a .netmodule file correctly (Actually this is good protection), that's why I need to select a .netmodule in Confuser, so that I don't need to convert the "protected" DLL back to .netmodule file! I hope I clarified the problem well! thanks.
This is something I won't be able to implement quickly. Access to the assembly is done in many different places in the code of ConfuserEx.
From my initial analysis I can tell you that the resources protection is very likely the source of the issues for you. This protection will not work without an assembly. Could you give it a shot without this protection enabled? Just remove it from the rules in general to make sure it's disabled.
Also everything related to WPF will cause a lot of issues. If the assemblies contains XAML files, the rename protection will not work, unless you disable renXaml