Dotfuscator User's Guide
Command Line Option Summary

Command line options may begin with the '/' or the '-' characters.

Command Line Options
Copy Code
Usage: dotfuscator [options] [config_file]

Traditional Options

The following is a summary of the traditional command line options.

Traditional Options Description
/i Investigate only
/p=<property list> Specifies values for user defined properties in the configuration file. Comma separated list of name-value pairs (e.g. /p=projectdir=c:\\temp,projectname=MyApp.exe)
/q Quiet output
/v Verbose output
/nologo Suppresses the output of the Dotfuscator Copyright and License information.
/? Print help
/?? Print extended options
[config_file] configuration file containing runtime options.

The /v option induces Dotfuscator to provide information about its progress during execution. The level of detail here will likely change between releases.

The /i option tells Dotfuscator to not create any output assemblies files. If the configuration file specifies a map file, the results of the run will be found there (this option is close to worthless without generating a map).

The /q option tells Dotfuscator to run completely without printed output. This is suitable for inclusion into application build sequences. This option overrides verbose mode.

The /p option tells Dotfuscator to set external properties at the command line. Setting these properties here will override those specified in the <properties> section of the configuration file.

The <proplist> is a list of comma-separated name-value pairs. For example, property declaration and assignment in conjunction with the p option, might look like:

Property Declaration and Assignment in Conjunction with -p Option:
Copy Code

Properties may be quoted if they contain spaces as illustrated below:

Quoting Properties
Copy Code
/p=MyProperty="value has spaces"
Note: Property names are case sensitive.

By running dotfuscatorUI.exe, you can start the standalone graphical user interface with external properties and a specific configuration file:

Start Up Standalone GUI
Copy Code
dotfuscatorUI.exe /p=projectdir=c:\temp project_template.xml

The configfile is a configuration file that is required for every run of Dotfuscator. Notice you do not enter configuration information or target assemblies on the command line. This information must be found in the configuration file.

Extended Options

Extended options are designed to allow for basic obfuscation from the command line, without requiring you to first create a configuration file. If you use a configuration file with an extended command line option, the command line option supplements or overrides the commands in the configuration file. See Supplementing or Overriding a Configuration File from the Command Line for more information.

Extended options are recognized by the first four characters.

The following is a summary of the extended command line options. An asterisk denotes the default setting if an option is missing and no configuration file is specified.

Extended Options Description
/in [+|-]<file>[,[+|-]<file>] Specify inputs.  Any combination of  assemblies, package files or directory file masks can be specified. Use prefix to obfuscate input as library mode (+) or private (-) assembly. Default is governed by assembly file extension (EXEs are private; .DLLs are run in library mode).
/out:<directory> Specify output directory. Default is .\Dotfuscated.
/honor:[on|off*] Toggle honoring obfuscation attribute directives found in all input assemblies.
/strip:[on|off*] Toggle stripping obfuscation attributes from all input assemblies.
/makeconfig:<file> Save all runtime options (from command line and configuration file if present) to <file>.
/debug:[on:off*|impl|opt|pdb] Emit debugging symbols for obfuscated assemblies and control JIT behavior.
/suppress:[on|off*] Add the SuppressIldasmAttribute to supported output assemblies.
/disable Disable all transforms regardless of other options
/rename:[on|off*] Enable/disable renaming.
/mapout:<file> Specify output mapping file.

Default is .\Dotfuscated\map.xml.

/mapin:<file> Specify input mapping file.
/clobbermap:[on|off*] Specify map file overwrite mode.
/keep:[namespace|hierarchy|none*] Specify type renaming scheme.
/prefix:[on:off*] Append a prefix to all renamed types.
/enhancedOI:[on|off*] Use Enhanced Overload Induction.
/refsrename:[on*|off] Rename referenced metadata defined only in input map file.
/naming:[loweralpha*|upperalpha|numeric|unprintable] Specify identifier renaming scheme.
/controlflow:[high*|medium|low|off] Set control flow obfuscation level.

Enable/disable string encryption.


/prune:[on*|off|const] Enable/disable pruning, or enable constant-only pruning.
/link:[[+]<name>[,[+]<name>],]out=<name> Specify assemblies to link into named output assembly. A ‘+’ prefix indicates a prime assembly. Omit the list to link all inputs, using first input as the prime assembly. You can specify multiple link options on the command line.
/link:off Disables linking. Linking is off by default unless you pass a configuration file with linking options. This option is useful for that scenario.
/premark:[on|off*|only] Enable/disable watermarking. “Only” option disables all other transforms.
/watermark:<string> Specify the watermark string. Quotes are optional. By default, all input assemblies will be watermarked with this string.
/passphrase:<passphrase> Optionally specify a passphrase to use for encrypting the watermark string.
/charmap:<name> Specify a character map to use to encode the watermark string. The name must be one of the supported character maps. See Character Maps.
/smart:[on|off] Enables/disables Smart Obfuscation. See SmartObfuscation.
/soreport:[all|warn|none] Sets the verbosity level of the reporting output of the Smart Obfuscation functionality. See SmartObfuscation.
/offlineactivation:<activation_file> Manually activate Dotfuscator with the activation data contained in the <activation_file>.


Example 1
Copy Code
dotfuscator -in:my.dll

Obfuscates my.dll as a library (visible symbols preserved and unpruned) with renaming, control flow, pruning, and string encryption turned on. The output assembly is written to a directory called .\Dotfuscated, and the map file is written to .\Dotfuscated\map.xml since no output directories were specified.

Example 2
Copy Code
dotfuscator -in:-myapp.exe,-private.dll

Obfuscates myapp.exe and private.dll together as a standalone application. Even visible symbols inside the DLL are obfuscated. Pruning is enabled based on the entry point method contained in myapp.exe.

Example 3
Copy Code
dotfuscator -in:myapp.exe -mapo:MyName.xml

This command obfuscates myapp.exe as a standalone application. An output renaming map is specified.



© 2017 PreEmptive Solutions, LLC. All Rights Reserved.