How to use ConfuserEx?

andrewfam picture andrewfam · Jun 11, 2014 · Viewed 43.8k times · Source

I'd like to have a try on this program but I couldn't figure out how to use it.

I've search on the author's site https://github.com/yck1509/ConfuserEx but the example on this site is not clear enough for someone new to the programming like me.

So I post my question in here in hope that someone would show me how to use it in plain English and along with some examples. It would be so great and appreciated very much.

Answer

Naster picture Naster · Oct 3, 2014

Get the lastest binaries version from here : https://github.com/yck1509/ConfuserEx/releases

For use in command line (Confuser.CLI.exe) :

Confuser.CLI.exe  myProjectFile.crproj

Project file example :

<?xml version="1.0" encoding="utf-8"?>
<project baseDir="c:\" outputDir="c:\Confused" xmlns="http://confuser.codeplex.com">
    <rule preset="none" pattern="true">
        <protection id="anti debug" />
        <protection id="anti dump" />
        <protection id="anti ildasm" />
        <protection id="anti tamper" />
        <protection id="constants" />
        <protection id="ctrl flow" />
        <protection id="invalid metadata" />
        <protection id="ref proxy" />
        <protection id="rename" />
        <protection id="resources" />
    </rule>
    <module path="ICSharpCode.AvalonEdit.dll" />
    <module path="ICSharpCode.Decompiler.dll" />
    <module path="ICSharpCode.NRefactory.dll" />
    <module path="ICSharpCode.NRefactory.CSharp.dll" />
    <module path="ICSharpCode.NRefactory.VB.dll" />
    <module path="ICSharpCode.TreeView.dll" />
    <module path="ILSpy.BamlDecompiler.Plugin.dll" />
    <module path="ILSpy.exe" />
    <module path="ILSpy.SharpDevelop.LGPL.dll" />
    <module path="Mono.Cecil.dll" />
    <module path="Mono.Cecil.Pdb.dll" />
</project>

cmd line

Config file format : https://github.com/yck1509/ConfuserEx/blob/master/docs/ProjectFormat.md

For use with the GUI (ConfuserEx.exe) :

gui

  1. In the Project tab
    1. Choose a base directory
    2. Click on the + button to add DLLs (modules)
  2. In the Settings tab
    1. Click on < Global settings >
    2. Click on the + button. A new rule is added. When the pattern matches, the rule is executed, so "True" mean the rule will always be executed.
    3. Click on Edit button.
    4. Choose the preset "Maximum" then close
  3. In the Protect tab
    1. Click Protect!