yck1509 / ConfuserEx

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

rename with renPublic #558

Open MichaelRumpler opened 7 years ago

MichaelRumpler commented 7 years ago

I tried to obfuscate multiple dlls (Android and PCL) and rename public types and methods too with renPublic, but I always get an error.

I downloaded version 1.0 and when that did not work, then I also merged the PRs 512 and 553, but that didn't make any difference.

My crproj looks like this:

<rule pattern="true" preset="none" inherit="false">
    <protection id="anti debug" />
    <protection id="anti ildasm" />
    <protection id="constants" />
    <protection id="ctrl flow" />
    <protection id="ref proxy" />
    <protection id="rename">
        <argument name="mode" value="letters" />
        <argument name="renPublic" value="true" />
    </protection>
</rule>

When I remove renPublic, then it works. But with it I get this error:

[ERROR] Failed to resolve a member, check if all dependencies are present in the correct version.
Exception: dnlib.DotNet.MemberRefResolveException: Could not resolve method: System.Void xOgmwRFMjfUKczDLVLSQLjWBpbkE::set_Text(System.String) (RoyalMobileApps.XF, Version=1.0.6151.27426, Culture=neutral, PublicKeyToken=null)
   at dnlib.DotNet.MemberRef.ResolveMethodThrow() in d:\ConfuserEx\dnlib\src\DotNet\MemberRef.cs:line 395
   at Confuser.Protections.ReferenceProxy.MildMode.ProcessCall(RPContext ctx, Int32 instrIndex) in d:\ConfuserEx\Confuser.Protections\ReferenceProxy\MildMode.cs:line 71
   at Confuser.Protections.ReferenceProxy.ReferenceProxyPhase.ProcessMethod(RPContext ctx) in d:\ConfuserEx\Confuser.Protections\ReferenceProxy\ReferenceProxyPhase.cs:line 122
   at Confuser.Protections.ReferenceProxy.ReferenceProxyPhase.Execute(ConfuserContext context, ProtectionParameters parameters) in d:\ConfuserEx\Confuser.Protections\ReferenceProxy\ReferenceProxyPhase.cs:line 109
   at Confuser.Core.ProtectionPipeline.ExecuteStage(PipelineStage stage, Action`1 func, Func`1 targets, ConfuserContext context) in d:\ConfuserEx\Confuser.Core\ProtectionPipeline.cs:line 128
   at Confuser.Core.ConfuserEngine.RunPipeline(ProtectionPipeline pipeline, ConfuserContext context) in d:\ConfuserEx\Confuser.Core\ConfuserEngine.cs:line 230
   at Confuser.Core.ConfuserEngine.RunInternal(ConfuserParameters parameters, CancellationToken token) in d:\ConfuserEx\Confuser.Core\ConfuserEngine.cs:line 175
[ERROR] ---BEGIN DEBUG INFO---
[ERROR] Installed Framework Versions:
[ERROR]     v2.0.50727  2.0.50727.4927
[ERROR]     v3.0  3.0.30729.4926
[ERROR]     v3.5  3.5.30729.4926
[ERROR]     v4
[ERROR]     Client  4.6.01586
[ERROR]     Full  4.6.01586
[ERROR]     v4.0
[ERROR]     Client  4.0.0.0
[ERROR]     v4.5 394802

Any idea what causes this or how I can get more information? It seems to be a normal string property, nothing special.

febitanya commented 6 years ago

++