Command Line Quick Start
This section demonstrates how to use the command line interface to obfuscate using the same settings as in the Standalone GUI Quick Start.
You can start Dotfuscator from the command line using the following syntax:
dotfuscator [options] [configfile]
The command line options are documented in the Command Line Options Summary.
The configuration file is an XML document that specifies various options for Dotfuscator. When you ran the standalone GUI and filled in the various dialogs, you were populating a configuration file. All elements of the configuration file are documented in the Configuration File Reference.
Using Existing Configurations
You can feed previously created configuration files into the command line tool. For example, using the configuration file that you created in the last section, you can obfuscate from the command line using this command:
Using Command Line Switches Only
Alternatively, you can Dotfuscate on the command line without a configuration file because most of the configuration options are available as command line switches. To get powerful obfuscation for our example assembly, all you need to do is specify your input assembly.
- The "in" switch lets you specify a list of input assemblies separated by commas.
- Because the input assembly is an EXE, the application type is automatically set for maximal obfuscation. DLLs default to library mode.
- By default, the output assembly is placed in a subdirectory of the working directory called "Dotfuscated". You can override this with the "out" command line switch.
- By default, renaming is enabled and the renaming map file is called "map.xml". It is also placed in the "Dotfuscated" subdirectory. You can override this with the "mapout" switch.
- By default, string encryption, control flow, and removal are turned on.
Using Advanced Command Line Switches
If you want to run the obfuscator from the command line with the same options that you set in the standalone GUI in the previous section, you need a command like this:
dotfuscator /in:GettingStarted.exe /debug:on /v /enha:on /
- The "in" option is as before.
- The "v" option runs Dotfuscator in verbose mode.
- The "debug" option tells Dotfuscator to generate the debugging symbols for the obfuscated output assemblies.
- The "enha" option turns on Enhanced Overload Induction.