Dotfuscator User's Guide
Supplementing or Overriding a Configuration File from the Command Line

Dotfuscator has the unique ability to accept a complete or partial configuration file, yet allow you to supplement or override its options from the command line. This allows you to quickly adjust and tweak settings using a standard configuration file as a template.

Command Line Option Configuration File Option Notes
/in [+|-]<file>[,[+|-]<file>] input section adds
/out: <directory> output section overrides
/honor:[on|off*] inputassembly section overrides
/strip:[on|off*] inputassembly section overrides
/debug:[on|off*|impl|opt|pdb] "debug" global option overrides
/suppress:[on|off*] "suppressildasmattribute" global option overrides
/disable Sets "disable" option in renaming, controlflow, stringencrypt, and removal sections overrides
/rename:[on:off] Sets (or unsets) "disable" option in "renaming" section. Overrides
/mapout:<file> "mapoutput" section overrides
/mapin:<file> "mapinput" section overrides
/clobbermap:[on|off] "overwrite" attribute in "mapoutput" section overrides
/keep:[namespace|hierarchy|none] Sets (or unsets) renaming options: "keepnamespace", "keephierarchy" overrides
/enhancedOI:[on|off] Sets (or unsets) "enhancedOI" renaming option overrides
/refsrename:[on|off] "obfuscatereferences" attribute in "mapinput" element. overrides
/naming:[loweralpha|upperalpha|numeric|unprintable] Sets the "scheme" attribute in the renaming section. overrides
/controlflow:[high|medium|low|off] Sets the "level" attribute in the controlflow" section. The off flag sets the "disable" option. overrides
/encrypt:[on|off] Sets (or unsets) the "disable" option in the stringencrypt section. overrides
/prune:[on|off] Sets (or unsets) the "disable" option in the removal section. overrides
/link:[[+]<name>[,[+]<name>],]out=<name> Sets sub-elements of the <linkedassembly> element. overrides
/link:off Sets the "disable" option in the linking section. overrides
/premark: [on|off*|only]

Sets (or unsets) the "disable" option in the premark section. The "only" setting is not saved to the configuration file.

 

overrides
/watermark Sets the <watermark> element. overrides
/passphrase Sets the <passphrase> element and sets the usepassphrase option. overrides
/charmap Sets the "encoding" attribute in the premark section. overrides

Examples:

The following examples use this configuration file that enables renaming with an output mapping file. It is referenced as "myconfig.xml" in the examples.

Example 1
Copy Code
<?xml version="1.0"?>
<!DOCTYPE dotfuscator SYSTEM "http://www.preemptive.com/dotfuscator/dtd/dotfuscator_v2.2.dtd">
<dotfuscator version="2.2">
   <renaming>
      <mapping>
         <mapoutput overwrite="true">
            <file dir="${configdir}\reports" name="MyMap.xml"/>
         </mapoutput>
      </mapping>
   </renaming>
</dotfuscator>dotfuscator -in:my.dll myconfig.xml

This command specifies my.dll as an input assembly in library mode (because of the DLL extension), and applies the renaming options in the configuration file. In this case, control flow, string encryption, and pruning are disabled because they are implicitly disabled in the configuration file.

The output DLL will go in a directory called ".\Dotfuscated", since an output is not specified in the configuration file or on the command line.

Example 2
Copy Code
dotfuscator -in:my.dll -keep:namespace -enha:on -cont:high myconfig.xml

This command also specifies my.dll as an input assembly. In addition, it tells the renamer to keep namespaces and use enhanced overload induction. It also enables control flow obfuscation, setting the level to "high" for maximum obfuscation.

 

 


© 2016 PreEmptive Solutions, LLC. All Rights Reserved.

www.preemptive.com