Skip to content
Alexander Martens edited this page Aug 13, 2017 · 1 revision

To Use The CLI, you can add Rules directly to your AssemblyInfo File or you can make a XML-Style .crproj

To Use The CLI Without a .crproj: Confuser.CLI.exe -n -o=. Main.exe

Rules That Are Added To AssemblyInfo Should Resemble

[assembly: Obfuscation(Exclude = false, Feature = "preset(none);+anti ildasm;+anti tamper;+constants;+ctrl flow;+anti dump;+anti debug;+invalid metadata;+ref proxy;+resources;+rename(mode=letters,flatten=false);")]
[assembly: Obfuscation(Exclude = false, Feature = "random seed: SeedToKeepRenamingConsistant")]
[assembly: Obfuscation(Exclude = false, Feature = "preset(normal)")]
[assembly: Obfuscation(Exclude = false, Feature = "packer:compressor")]
[assembly: Obfuscation(Exclude = false, Feature = "packer:compressor(key=dynamic)")]

To Override Features On A Per-Class Level, Add [ObfuscationAttribute(Exclude = false, Feature = "-rename")] Before The Class Declaration

As of Present, Per-Class Obfuscation Techniques Can Only Be Used If Using The CLI Without a .crproj


To Use The CLI With a .crproj: Confuser.CLI.exe -n obfuscate.crproj -o Main.exe

An Example .crproj

<project outputDir="C:\Users\USERNAME\Source\Repos\REPONAME\Confused" baseDir="C:\USERNAME\alexandermartens\Source\Repos\REPONAME" seed="SeedToKeepRenamingConsistant" xmlns="http://confuser.codeplex.com">
  <rule pattern="true" inherit="false">
    <protection id="anti ildasm" />
    <protection id="anti tamper" />
    <protection id="constants" />
    <protection id="ctrl flow" />
    <protection id="anti dump" />
    <protection id="anti debug" />
    <protection id="invalid metadata" />
    <protection id="ref proxy" />
    <protection id="resources" />
    <protection id="rename" />
  </rule>
  <packer id="compressor" />
</project>