pyminifier icon indicating copy to clipboard operation
pyminifier copied to clipboard

Incorrect obfuscation with no imports

Open nbkolchin opened this issue 6 years ago • 0 comments

Input:

# Copyright comment
"""Common exceptions"""

class CannotRun(Exception):
    """Thrown from Base classes when running is impossible"""
    pass

Obfuscated: (--obfuscate-builtins --replacement-length=11)

class CannotRun(kfgyztSaQBc):
kfgyztSaQBc=Exception
 pass
# Created by pyminifier (https://github.com/liftoff/pyminifier)

Removing first line comment or adding dummy import produces correct output

import os
mxUpuXFLbBM=Exception
class CannotRun(mxUpuXFLbBM):
 pass
# Created by pyminifier (https://github.com/liftoff/pyminifier)

nbkolchin avatar Oct 16 '18 07:10 nbkolchin