BitBoost Python code obfuscator

Shrink Your Python Code With the BitBoost ‘bobs’ Python Obfuscator

It’s a Matter of Options

Do you need to make your python code smaller? If you’re using the BitBoost ‘bobs’ Python obfuscator, you just need to pick the right options.

Automatic renaming to short names

Tell the obfuscator to rename your variables, functions, classes, etc. in a space-saving way.

This will shrink practically any release format you might use: source code, byte-compiled code, executables, etc.

In the default renaming scheme, each replacement name consists of a ‘stem’ string + a numeric index. So…

Go from verbose names…

import dance_club

class Discotheque(dance_club.DanceClub):
  def __init__(self, epilepsy_risks, deafness_risks):
    self.epilepsy_risks = epilepsy_risks
    self.deafness_risks = deafness_risks
    # ...

…to short names.

import qy9

class qq45(qy9.qx20):
  def __init__(qy3e, qz3f, qq46):
    qy3e.qz3f = qz3f
    qy3e.qq46 = qq46
    # ...

Automatic removal of docstrings (documentation strings) and comments can also help.

These steps are taken every time you obfuscate. Depending on your coding style and release format, these automatic reductions may make your released code significantly smaller.

Mark parts of your code for redaction from release builds.
Even redact different sections of your code from different builds!

The obfuscator lets you mark sections of your source code to redact from your obfuscated release.

Because you can define additional code redaction directives in your obfuscation project files, you can enable different redaction directives when building different obfuscated releases.

Applications include:


    # Define board designer that provides premium license level functionality.
    class BoardDesigner_Premium(BoardDesigner):
      def __init__(self, strategy_chooser=None):
        self.strategy_chooser = strategy_chooser
        # ...
      # ...

    # If 'UNIX_RELEASE' is included in the project's redact_directives_added, 
    # this gets redacted during obfuscation 
    i_sure_like_unix = True
    # ...
    # ...

For More Information…

See the “Reducing Code Size” use case and the redact_directives_added project file setting in the obfuscator manual.