Babel Obfuscator
HomeDocumentationShop
  • Introduction
    • General Features
  • Getting Started
    • Install
    • Product Activation
  • Command Line
    • Command Line Reference
      • Miscellaneous
      • Input Files
      • Output Files
      • Plugins
      • Merge and Embed
      • Renaming
      • Control Flow Obfuscation
      • Encryption and Protection
      • Code Generation
  • MSBuild Task
    • Babel Task Reference
    • Customizing Intellisense
  • NuGet Package
    • NuGet Pakage Reference
  • User Interface
    • Obfuscation
    • Tools
    • Custom Themes
  • Obfuscation Rules
    • XML Rules
      • Example Rules
    • Custom Attributes
    • Obfuscation Agent
  • Merge and Embed
    • Assembly Merging
    • Assembly Embedding
  • Symbols Renaming
    • XML Map Files
    • Cross Assembly Renaming
    • XAML Renaming
    • Decoding Stack Traces
  • String Encryption
    • Custom String Encryption
  • Control Flow Obfuscation
  • Code Encryption
    • External Code Files
    • Password Protected Code
    • Dynamic Code
  • Dynamic Proxy
  • Resource Encryption
  • Value And Array Encryption
  • Tampering Detection
  • Anti Debugging
  • Enhancing Code Security
  • Optimizations
    • Dead Code Removal
    • Metadata Optimizations
    • Code Optimizations
  • Appendix
  • Examples
    • Examples
    • General Samples
      • ClickOnce Deploy
      • Detecting Babel Obfuscation
      • Obfuscate .NET MAUI
      • Blazor Web App
    • Code Encryption
      • Feature Based Licenses
    • Cross Assembly Renaming
      • Publish .NET App
    • Build Servers
      • GitHub Actions
      • Unit Tests
    • Babel Obfuscator NuGet
      • Android Application
  • Plugins
    • Babel Obfuscator Plugins
    • Encrypt Plugin
      • Getting Started
      • Source Code
Powered by GitBook
On this page

Was this helpful?

Command Line

Babel Obfuscator provides a command line tool on Windows, Mac and Linux. This paragraph will describe how to use Babel Obfuscator from the command line.

Babel Obfuscator is available as a command line tool, which makes it easy to integrate into your build pipeline and automate the obfuscation process. The command line tool, named "babel", allows you to easily specify the input assemblies, output file, and various obfuscation options. To start babel from the command line, open the PowerShell on Windows or the Terminal on Mac OS and enter:

> babel

The "babel" command launches the babel executable command line tool. This command accepts the following syntax:

babel <primary assembly source> [<other assemblies>...] [options]

The first parameter, <primary assembly source>, is the target assembly (or primary assembly) you want to obfuscate and is a mandatory parameter.

The [<other assemblies>...] is an optional list of assemblies that will be merged with the primary assembly.

The [options] are a list of command line switches to configure Babel Obfuscator. Each command line switch is prefixed by a double hyphen, for example:

--embed

Command line parameters can be bundled using the short syntax for command line options. Use a single hyphen to enter multiple parameters in a bundled expression:

babel myapp.exe --types --methods --properties --fields --events

It is equivalent to:

babel myapp.exe -tmpfe

To show all available command line switches enter the command line:

babel --help

You can show a detailed description of every command line switch by entering:

babel --help [command name]

For example

babel --help controlflow

will output detailed help for the controlflow command line switch:

> babel --help controlflow
controlflow (nocontrolflow, no-controlflow, control-flow, no-control-flow, i)
usage: --[no]controlflow
  Enable ([no]disable) MSIL control flow obfuscation (default: disabled)
  Use this option to alter the method control flow. 
  Key-value pairs can optionally be entered to configure code scrambling:

Produces verifiable MSIL code

  goto=[on/off]    Whether to insert irrelevant branches
  switch=[on/off]  Whether to enable switch scrambling
  case=[on/off]    Whether to hide case constants
  if=[on/off]      Whether to enable if scrambling
  call=[on/off]    Whether to enable random calls
  value=[on/off]   Whether to use value encryption
  token=[on/off]   Whether to enable emission of method tokens

Produces not verifiable MSIL code
  underflow=[on/off]  Whether to enable stack underflow ()

Examples:
--controlflow switch=on --controlflow case=on

This option can be entered multiple times. 

Last updated 2 years ago

Was this helpful?