python-obfuscation-framework 1.11.0__tar.gz → 1.11.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {python_obfuscation_framework-1.11.0/python_obfuscation_framework.egg-info → python_obfuscation_framework-1.11.1}/PKG-INFO +1 -1
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/obfuscator/boolean.py +18 -6
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/obfuscator/esoteric/globals.py +15 -3
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/obfuscator/names.py +20 -3
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/obfuscator/remove/print.py +1 -1
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/obfuscator/strings.py +101 -60
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/utils/cipher/rc4.py +1 -1
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pyproject.toml +1 -1
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1/python_obfuscation_framework.egg-info}/PKG-INFO +1 -1
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/python_obfuscation_framework.egg-info/SOURCES.txt +7 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/tests/obfuscator/conftest.py +3 -3
- python_obfuscation_framework-1.11.1/tests/obfuscator/fixtures/booleans.py +30 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/tests/obfuscator/fixtures/complex.py +21 -0
- python_obfuscation_framework-1.11.1/tests/obfuscator/fixtures/compression.py +15 -0
- python_obfuscation_framework-1.11.1/tests/obfuscator/fixtures/deepenc.py +14 -0
- python_obfuscation_framework-1.11.1/tests/obfuscator/fixtures/docs.py +10 -0
- python_obfuscation_framework-1.11.1/tests/obfuscator/fixtures/encoding.py +42 -0
- python_obfuscation_framework-1.11.1/tests/obfuscator/fixtures/esoteric.py +48 -0
- python_obfuscation_framework-1.11.1/tests/obfuscator/fixtures/numbers.py +29 -0
- python_obfuscation_framework-1.11.1/tests/obfuscator/fixtures/rc4.py +36 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/tests/obfuscator/fixtures/simple.py +6 -0
- python_obfuscation_framework-1.11.1/tests/obfuscator/fixtures/strings.py +55 -0
- python_obfuscation_framework-1.11.0/tests/obfuscator/fixtures/numbers.py +0 -12
- python_obfuscation_framework-1.11.0/tests/obfuscator/fixtures/strings.py +0 -27
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/LICENSE +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/MANIFEST.in +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/README.md +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/__init__.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/__main__.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/cli.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/cli_v2.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/errors.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/evasion/__init__.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/evasion/argv.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/evasion/base.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/evasion/cpu/__init__.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/evasion/cpu/cpu_count.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/evasion/fs/__init__.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/evasion/fs/directory_exist.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/evasion/fs/directory_list_exist.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/evasion/fs/directory_list_missing.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/evasion/fs/directory_missing.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/evasion/fs/exec_method.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/evasion/fs/executable_path.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/evasion/fs/file_exist.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/evasion/fs/file_list_exist.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/evasion/fs/file_list_missing.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/evasion/fs/file_missing.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/evasion/fs/tmp.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/evasion/hardware/__init__.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/evasion/hardware/ram_count.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/evasion/hooks/__init__.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/evasion/hooks/debugger.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/evasion/hooks/tracemalloc.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/evasion/human/__init__.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/evasion/human/p.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/evasion/human/prompt.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/evasion/integrity.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/evasion/multi.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/evasion/os/__init__.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/evasion/os/domain.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/evasion/os/hostname.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/evasion/os/uid.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/evasion/os/username.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/evasion/processes/__init__.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/evasion/processes/proc_count.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/evasion/time/__init__.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/evasion/time/expire.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/evasion/time/uptime.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/evasion/time/utc.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/evasion/utils.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/logger.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/main.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/obfuscator/__init__.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/obfuscator/builtins.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/obfuscator/cipher/__init__.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/obfuscator/cipher/deep_encryption.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/obfuscator/cipher/rc4.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/obfuscator/cipher/shift.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/obfuscator/cipher/xor.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/obfuscator/compression/__init__.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/obfuscator/compression/bz2.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/obfuscator/compression/gzip.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/obfuscator/compression/lzma.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/obfuscator/compression/zlib.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/obfuscator/constants.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/obfuscator/controlflow/__init__.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/obfuscator/controlflow/control_flow_flatten.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/obfuscator/encoding/__init__.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/obfuscator/encoding/a85.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/obfuscator/encoding/b16.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/obfuscator/encoding/b32.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/obfuscator/encoding/b32hex.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/obfuscator/encoding/b64.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/obfuscator/encoding/b85.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/obfuscator/encoding/binascii.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/obfuscator/encoding/snt.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/obfuscator/encoding/whitespace.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/obfuscator/esoteric/__init__.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/obfuscator/esoteric/call.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/obfuscator/esoteric/doc.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/obfuscator/esoteric/imports.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/obfuscator/extract_variables.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/obfuscator/junk/__init__.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/obfuscator/junk/add_comments.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/obfuscator/junk/add_newlines.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/obfuscator/junk/dead_code.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/obfuscator/numbers.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/obfuscator/other/__init__.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/obfuscator/other/tokens.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/obfuscator/remove/__init__.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/obfuscator/remove/comments.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/obfuscator/remove/exceptions.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/obfuscator/remove/indents.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/obfuscator/remove/loggings.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/obfuscator/remove/loggings_old.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/obfuscator/remove/newline.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/obfuscator/restructure.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/obfuscator/stegano/__init__.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/obfuscator/stegano/docstrings.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/obfuscator/stegano/ipv6encoding.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/obfuscator/stegano/macencoding.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/obfuscator/stegano/uuidencoding.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/stager/__init__.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/stager/cipher/__init__.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/stager/cipher/rc4.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/stager/download.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/stager/image.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/stager/lots/__init__.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/stager/lots/cl1pnet.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/stager/lots/pastebin.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/stager/lots/pasters.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/stager/quine.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/utils/__init__.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/utils/cipher/__init__.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/utils/cipher/shift.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/utils/compression/__init__.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/utils/compression/bz2.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/utils/compression/gzip.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/utils/compression/lzma.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/utils/compression/zlib.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/utils/encoding/__init__.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/utils/encoding/a85.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/utils/encoding/b16.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/utils/encoding/b3.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/utils/encoding/b32.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/utils/encoding/b32hex.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/utils/encoding/b64.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/utils/encoding/b85.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/utils/encoding/binascii.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/utils/encoding/snt.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/utils/encoding/whitespace.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/utils/entropy.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/utils/extract_names.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/utils/format.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/utils/generator/__init__.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/utils/generator/advanced.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/utils/generator/base.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/utils/generator/basic.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/utils/generator/comments.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/utils/generator/comments.txt +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/utils/generator/names.txt +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/utils/generator/unicode.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/utils/se/__init__.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/utils/se/homoglyphs.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/utils/se/homoglyphs.txt +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/utils/stegano/__init__.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/utils/stegano/ipv6encoding.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/utils/stegano/macencoding.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/utils/stegano/uuidencoding.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/utils/tokens.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/python_obfuscation_framework.egg-info/dependency_links.txt +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/python_obfuscation_framework.egg-info/entry_points.txt +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/python_obfuscation_framework.egg-info/requires.txt +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/python_obfuscation_framework.egg-info/top_level.txt +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/setup.cfg +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/tests/__init__.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/tests/obfuscator/__init__.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/tests/obfuscator/fixtures/__init__.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/tests/obfuscator/fixtures/decorators.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/tests/obfuscator/fixtures/getattr.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/tests/obfuscator/fixtures/import.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/tests/obfuscator/fixtures/lambda.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/tests/obfuscator/fixtures/moderate.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/tests/obfuscator/fixtures/try.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/tests/obfuscator/test_edge_cases.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/tests/obfuscator/test_integration.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/tests/obfuscator/utils.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/tests/pyproject.toml +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/tests/utils/__init__.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/tests/utils/se/__init__.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/tests/utils/se/test_homoglyphs.py +0 -0
- {python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/tests/utils/test_generator.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-obfuscation-framework
|
|
3
|
-
Version: 1.11.
|
|
3
|
+
Version: 1.11.1
|
|
4
4
|
Summary: Python Obfuscation Framework
|
|
5
5
|
Author-email: deoktr <35725720+deoktr@users.noreply.github.com>
|
|
6
6
|
Maintainer-email: deoktr <35725720+deoktr@users.noreply.github.com>
|
|
@@ -44,24 +44,30 @@ class BooleanObfuscator:
|
|
|
44
44
|
(RPAR, ")"),
|
|
45
45
|
]
|
|
46
46
|
case 3:
|
|
47
|
-
# not False
|
|
47
|
+
# (not False)
|
|
48
48
|
return [
|
|
49
|
+
(LPAR, "("),
|
|
49
50
|
(NAME, "not"),
|
|
50
51
|
(NAME, "False"),
|
|
52
|
+
(RPAR, ")"),
|
|
51
53
|
]
|
|
52
54
|
case 4:
|
|
53
|
-
# not not True
|
|
55
|
+
# (not not True)
|
|
54
56
|
return [
|
|
57
|
+
(LPAR, "("),
|
|
55
58
|
(NAME, "not"),
|
|
56
59
|
(NAME, "not"),
|
|
57
60
|
(NAME, "True"),
|
|
61
|
+
(RPAR, ")"),
|
|
58
62
|
]
|
|
59
63
|
case 5:
|
|
60
|
-
# "" in ""
|
|
64
|
+
# ("" in "")
|
|
61
65
|
return [
|
|
66
|
+
(LPAR, "("),
|
|
62
67
|
(STRING, "''"),
|
|
63
68
|
(NAME, "in"),
|
|
64
69
|
(STRING, "''"),
|
|
70
|
+
(RPAR, ")"),
|
|
65
71
|
]
|
|
66
72
|
case 6:
|
|
67
73
|
# bool(1)
|
|
@@ -97,25 +103,31 @@ class BooleanObfuscator:
|
|
|
97
103
|
(RPAR, ")"),
|
|
98
104
|
]
|
|
99
105
|
case 3:
|
|
100
|
-
# not True
|
|
106
|
+
# (not True)
|
|
101
107
|
return [
|
|
108
|
+
(LPAR, "("),
|
|
102
109
|
(NAME, "not"),
|
|
103
110
|
(NAME, "True"),
|
|
111
|
+
(RPAR, ")"),
|
|
104
112
|
]
|
|
105
113
|
case 4:
|
|
106
|
-
# not not False
|
|
114
|
+
# (not not False)
|
|
107
115
|
return [
|
|
116
|
+
(LPAR, "("),
|
|
108
117
|
(NAME, "not"),
|
|
109
118
|
(NAME, "not"),
|
|
110
119
|
(NAME, "False"),
|
|
120
|
+
(RPAR, ")"),
|
|
111
121
|
]
|
|
112
122
|
case 5:
|
|
113
|
-
# "" not in ""
|
|
123
|
+
# ("" not in "")
|
|
114
124
|
return [
|
|
125
|
+
(LPAR, "("),
|
|
115
126
|
(STRING, "''"),
|
|
116
127
|
(NAME, "not"),
|
|
117
128
|
(NAME, "in"),
|
|
118
129
|
(STRING, "''"),
|
|
130
|
+
(RPAR, ")"),
|
|
119
131
|
]
|
|
120
132
|
case 6:
|
|
121
133
|
# bool(0)
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
16
16
|
|
|
17
17
|
import keyword
|
|
18
|
-
from tokenize import LPAR, NAME, OP, RPAR, STRING
|
|
18
|
+
from tokenize import LPAR, NAME, NEWLINE, NL, OP, RPAR, STRING
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
# TODO (deoktr): add frequency
|
|
@@ -42,14 +42,24 @@ class GlobalsObfuscator:
|
|
|
42
42
|
def obfuscate_tokens(cls, tokens):
|
|
43
43
|
local_functions = []
|
|
44
44
|
prev_tokval = None
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
prev_col = -1
|
|
46
|
+
for toknum, tokval, *rest in tokens:
|
|
47
|
+
start = rest[0] if rest else (0, 0)
|
|
48
|
+
if prev_tokval in ["def", "class"] and toknum == NAME and prev_col == 0:
|
|
47
49
|
local_functions.append(tokval)
|
|
50
|
+
if toknum == NAME and tokval in ("def", "class"):
|
|
51
|
+
prev_col = start[1]
|
|
48
52
|
prev_tokval = tokval
|
|
49
53
|
|
|
50
54
|
result = []
|
|
51
55
|
prev_tokval = None
|
|
56
|
+
in_import = False
|
|
52
57
|
for index, (toknum, tokval, *_) in enumerate(tokens):
|
|
58
|
+
if tokval in ("import", "from") and toknum == NAME:
|
|
59
|
+
in_import = True
|
|
60
|
+
elif toknum in (NEWLINE, NL):
|
|
61
|
+
in_import = False
|
|
62
|
+
|
|
53
63
|
new_tokens = [(toknum, tokval)]
|
|
54
64
|
next_tokval = None
|
|
55
65
|
if len(tokens) > index + 1:
|
|
@@ -62,6 +72,8 @@ class GlobalsObfuscator:
|
|
|
62
72
|
# ensure it's not an argument of a call
|
|
63
73
|
and next_tokval != "="
|
|
64
74
|
and tokval not in cls.RESERVED
|
|
75
|
+
# ensure it's not inside an import statement
|
|
76
|
+
and not in_import
|
|
65
77
|
):
|
|
66
78
|
new_tokens = [
|
|
67
79
|
(NAME, "globals"),
|
{python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/obfuscator/names.py
RENAMED
|
@@ -192,14 +192,30 @@ class _StringFixer(ast.NodeTransformer):
|
|
|
192
192
|
node.args[1] = ast.Constant(value=self.mapping[node.args[1].value])
|
|
193
193
|
return node
|
|
194
194
|
|
|
195
|
+
def _is_globals_call(self, node: ast.expr) -> bool:
|
|
196
|
+
"""Check if node is a call to globals()."""
|
|
197
|
+
return (
|
|
198
|
+
isinstance(node, ast.Call)
|
|
199
|
+
and isinstance(node.func, ast.Name)
|
|
200
|
+
and node.func.id == "globals"
|
|
201
|
+
and not node.args
|
|
202
|
+
)
|
|
203
|
+
|
|
195
204
|
def visit_Subscript(self, node: ast.Subscript) -> ast.Subscript:
|
|
196
205
|
self.generic_visit(node)
|
|
197
206
|
if (
|
|
198
|
-
isinstance(node.
|
|
199
|
-
and node.value.attr == "__dict__"
|
|
200
|
-
and isinstance(node.slice, ast.Constant)
|
|
207
|
+
isinstance(node.slice, ast.Constant)
|
|
201
208
|
and isinstance(node.slice.value, str)
|
|
202
209
|
and node.slice.value in self.mapping
|
|
210
|
+
and (
|
|
211
|
+
# __dict__['name'] pattern
|
|
212
|
+
(
|
|
213
|
+
isinstance(node.value, ast.Attribute)
|
|
214
|
+
and node.value.attr == "__dict__"
|
|
215
|
+
)
|
|
216
|
+
# globals()['name'] pattern
|
|
217
|
+
or self._is_globals_call(node.value)
|
|
218
|
+
)
|
|
203
219
|
):
|
|
204
220
|
node.slice = ast.Constant(value=self.mapping[node.slice.value])
|
|
205
221
|
return node
|
|
@@ -212,6 +228,7 @@ class NamesObfuscator:
|
|
|
212
228
|
"__file__",
|
|
213
229
|
"__name__",
|
|
214
230
|
"__doc__",
|
|
231
|
+
"__builtins__",
|
|
215
232
|
"__package__",
|
|
216
233
|
"__loader__",
|
|
217
234
|
"__spec__",
|
|
@@ -53,7 +53,7 @@ class PrintObfuscator:
|
|
|
53
53
|
|
|
54
54
|
if inside_print:
|
|
55
55
|
if print_par_depth == parenthesis_depth and (
|
|
56
|
-
tokval not in ("(", "print") and prev_tokval
|
|
56
|
+
tokval not in ("(", "print") and prev_tokval not in {"print", "."}
|
|
57
57
|
): # check if still inside print
|
|
58
58
|
inside_print = False
|
|
59
59
|
else:
|
|
@@ -84,15 +84,26 @@ class StringsObfuscator:
|
|
|
84
84
|
shift_cipher_class_obj = ShiftCipher()
|
|
85
85
|
self.shift_cipher_class_obj = shift_cipher_class_obj
|
|
86
86
|
|
|
87
|
-
|
|
87
|
+
@staticmethod
|
|
88
|
+
def _is_bytes_literal(tokval: str) -> bool:
|
|
89
|
+
"""Check if a string token represents a bytes literal (b'...' or B'...')."""
|
|
90
|
+
prefix = tokval.split("'", maxsplit=1)[0].split('"')[0]
|
|
91
|
+
return "b" in prefix or "B" in prefix
|
|
92
|
+
|
|
93
|
+
def _obf_shift(self, tokval: str):
|
|
88
94
|
# TODO (deoktr): choose random padding here
|
|
89
95
|
raw_string = eval(tokval) # noqa: S307
|
|
90
96
|
if isinstance(raw_string, bytes):
|
|
91
|
-
|
|
97
|
+
try:
|
|
98
|
+
raw_string = raw_string.decode()
|
|
99
|
+
except UnicodeDecodeError:
|
|
100
|
+
return [(STRING, tokval)]
|
|
101
|
+
if not raw_string.isascii():
|
|
102
|
+
return [(STRING, tokval)]
|
|
92
103
|
encoded = self.shift_cipher_class_obj.encode_tokens(raw_string)
|
|
93
104
|
return self.shift_cipher_class_obj.decode_tokens(encoded)
|
|
94
105
|
|
|
95
|
-
def
|
|
106
|
+
def _obf_base64(self, tokval: str):
|
|
96
107
|
"""Obfuscate string with base64.
|
|
97
108
|
|
|
98
109
|
```
|
|
@@ -100,21 +111,28 @@ class StringsObfuscator:
|
|
|
100
111
|
```
|
|
101
112
|
"""
|
|
102
113
|
raw_string = eval(tokval) # noqa: S307
|
|
114
|
+
is_bytes = isinstance(raw_string, bytes)
|
|
103
115
|
if isinstance(raw_string, str):
|
|
104
116
|
raw_string = raw_string.encode()
|
|
105
117
|
b64encoded_string = b64encode(raw_string).decode()
|
|
106
|
-
|
|
118
|
+
tokens = [
|
|
107
119
|
(NAME, self.b64decode_name),
|
|
108
120
|
(LPAR, "("),
|
|
109
121
|
(STRING, repr(b64encoded_string)),
|
|
110
122
|
(RPAR, ")"),
|
|
111
|
-
(OP, "."),
|
|
112
|
-
(NAME, "decode"),
|
|
113
|
-
(LPAR, "("),
|
|
114
|
-
(RPAR, ")"),
|
|
115
123
|
]
|
|
124
|
+
if not is_bytes:
|
|
125
|
+
tokens.extend(
|
|
126
|
+
[
|
|
127
|
+
(OP, "."),
|
|
128
|
+
(NAME, "decode"),
|
|
129
|
+
(LPAR, "("),
|
|
130
|
+
(RPAR, ")"),
|
|
131
|
+
],
|
|
132
|
+
)
|
|
133
|
+
return tokens
|
|
116
134
|
|
|
117
|
-
def
|
|
135
|
+
def _obf_base85(self, tokval: str):
|
|
118
136
|
"""Obfuscate string with base85.
|
|
119
137
|
|
|
120
138
|
```
|
|
@@ -122,38 +140,56 @@ class StringsObfuscator:
|
|
|
122
140
|
```
|
|
123
141
|
"""
|
|
124
142
|
raw_string = eval(tokval) # noqa: S307
|
|
143
|
+
is_bytes = isinstance(raw_string, bytes)
|
|
125
144
|
if isinstance(raw_string, str):
|
|
126
145
|
raw_string = raw_string.encode()
|
|
127
146
|
b85encoded_string = b85encode(raw_string).decode()
|
|
128
|
-
|
|
147
|
+
tokens = [
|
|
129
148
|
(NAME, self.b85decode_name),
|
|
130
149
|
(LPAR, "("),
|
|
131
150
|
(STRING, repr(b85encoded_string)),
|
|
132
151
|
(RPAR, ")"),
|
|
133
|
-
(OP, "."),
|
|
134
|
-
(NAME, "decode"),
|
|
135
|
-
(LPAR, "("),
|
|
136
|
-
(RPAR, ")"),
|
|
137
152
|
]
|
|
153
|
+
if not is_bytes:
|
|
154
|
+
tokens.extend(
|
|
155
|
+
[
|
|
156
|
+
(OP, "."),
|
|
157
|
+
(NAME, "decode"),
|
|
158
|
+
(LPAR, "("),
|
|
159
|
+
(RPAR, ")"),
|
|
160
|
+
],
|
|
161
|
+
)
|
|
162
|
+
return tokens
|
|
138
163
|
|
|
139
164
|
@staticmethod
|
|
140
|
-
def
|
|
165
|
+
def _hex(tokval: str):
|
|
141
166
|
# Hello --> \x48\x65\x6c\x6c\x6f
|
|
142
167
|
raw_string = eval(tokval) # noqa: S307
|
|
143
168
|
if isinstance(raw_string, bytes):
|
|
144
|
-
|
|
169
|
+
encoded = "".join(f"\\x{b:02x}" for b in raw_string)
|
|
170
|
+
return [(STRING, f"b'{encoded}'")]
|
|
145
171
|
encoded = ""
|
|
146
172
|
for c in raw_string:
|
|
147
|
-
|
|
148
|
-
|
|
173
|
+
code = ord(c)
|
|
174
|
+
if c.isdigit():
|
|
175
|
+
encoded += c
|
|
176
|
+
elif code <= 0xFF: # noqa: PLR2004
|
|
177
|
+
encoded += f"\\x{code:02x}"
|
|
178
|
+
elif code <= 0xFFFF: # noqa: PLR2004
|
|
179
|
+
encoded += f"\\u{code:04x}"
|
|
180
|
+
else:
|
|
181
|
+
encoded += f"\\U{code:08x}"
|
|
149
182
|
return [(STRING, f"'{encoded}'")]
|
|
150
183
|
|
|
151
184
|
@staticmethod
|
|
152
|
-
def
|
|
185
|
+
def _unicode(tokval: str):
|
|
153
186
|
# Hell --> \u0048\u0065\u006C\u006C
|
|
154
187
|
raw_string = eval(tokval) # noqa: S307
|
|
155
188
|
if isinstance(raw_string, bytes):
|
|
156
|
-
|
|
189
|
+
try:
|
|
190
|
+
raw_string = raw_string.decode()
|
|
191
|
+
except UnicodeDecodeError:
|
|
192
|
+
return [(STRING, tokval)]
|
|
157
193
|
encoded = ""
|
|
158
194
|
for c in raw_string:
|
|
159
195
|
ucode = f"\\u{hex(ord(c))[2:]:0>4}" if not c.isdigit() else c # noqa: FURB116
|
|
@@ -161,8 +197,11 @@ class StringsObfuscator:
|
|
|
161
197
|
return [(STRING, f"'{encoded}'")]
|
|
162
198
|
|
|
163
199
|
@staticmethod
|
|
164
|
-
def
|
|
200
|
+
def _additions(tokval: str):
|
|
165
201
|
# "Hello, world!" --> "Hello, "+"world!"
|
|
202
|
+
if len(tokval) < 6: # noqa: PLR2004
|
|
203
|
+
return [(STRING, tokval)]
|
|
204
|
+
|
|
166
205
|
raw_string = False
|
|
167
206
|
if tokval.startswith("r"):
|
|
168
207
|
tokval = tokval[1:]
|
|
@@ -183,8 +222,11 @@ class StringsObfuscator:
|
|
|
183
222
|
]
|
|
184
223
|
|
|
185
224
|
@staticmethod
|
|
186
|
-
def
|
|
225
|
+
def _only_additions(tokval: str):
|
|
187
226
|
# "Hello, world!" --> "Hello, "+"world!"
|
|
227
|
+
if len(tokval) <= 2: # noqa: PLR2004
|
|
228
|
+
return [(STRING, tokval)]
|
|
229
|
+
|
|
188
230
|
raw_string = False
|
|
189
231
|
if tokval.startswith("r"):
|
|
190
232
|
tokval = tokval[1:]
|
|
@@ -215,14 +257,17 @@ class StringsObfuscator:
|
|
|
215
257
|
add_slash = False
|
|
216
258
|
else:
|
|
217
259
|
add_slash = True
|
|
218
|
-
t
|
|
260
|
+
if t:
|
|
261
|
+
t.pop() # remove last +
|
|
262
|
+
else:
|
|
263
|
+
return [(STRING, tokval)]
|
|
219
264
|
return t
|
|
220
265
|
|
|
221
266
|
@staticmethod
|
|
222
|
-
def
|
|
267
|
+
def _string_replace(tokval: str):
|
|
223
268
|
raw_string = eval(tokval) # noqa: S307
|
|
224
269
|
|
|
225
|
-
if not raw_string or isinstance(raw_string, str):
|
|
270
|
+
if not raw_string or isinstance(raw_string, (str, bytes)):
|
|
226
271
|
return [(STRING, tokval)]
|
|
227
272
|
|
|
228
273
|
i = random.randint(0, len(raw_string) - 1)
|
|
@@ -255,7 +300,7 @@ class StringsObfuscator:
|
|
|
255
300
|
]
|
|
256
301
|
|
|
257
302
|
@staticmethod
|
|
258
|
-
def
|
|
303
|
+
def _string_reverse(tokval: str):
|
|
259
304
|
raw_string = eval(tokval) # noqa: S307
|
|
260
305
|
reversed_string = raw_string[::-1]
|
|
261
306
|
return [
|
|
@@ -268,20 +313,19 @@ class StringsObfuscator:
|
|
|
268
313
|
]
|
|
269
314
|
|
|
270
315
|
@staticmethod
|
|
271
|
-
def
|
|
316
|
+
def _string_one_on_n(tokval: str):
|
|
272
317
|
"""One on N.
|
|
273
318
|
|
|
274
319
|
"".join([l if x%2 ==0 else "" for x, l in
|
|
275
320
|
enumerate("Heeeleleoe,e eweoerelede!e")])
|
|
276
321
|
"""
|
|
277
322
|
raw_string = eval(tokval) # noqa: S307
|
|
278
|
-
if not raw_string:
|
|
323
|
+
if not raw_string or isinstance(raw_string, bytes):
|
|
279
324
|
return [(STRING, tokval)]
|
|
280
325
|
|
|
281
326
|
# steps between each actual characters
|
|
282
327
|
steps = random.randint(1, 7)
|
|
283
328
|
|
|
284
|
-
obf_string = raw_string
|
|
285
329
|
obf_string = ""
|
|
286
330
|
for char in raw_string:
|
|
287
331
|
t = "".join(
|
|
@@ -323,55 +367,52 @@ class StringsObfuscator:
|
|
|
323
367
|
(OP, ")"),
|
|
324
368
|
]
|
|
325
369
|
|
|
326
|
-
def
|
|
370
|
+
def _obfuscate_string(self, tokval: str, next_tokval: str): # noqa: C901, PLR0912
|
|
327
371
|
# TODO (deoktr): consider f"" u"" ur"" b"" r"" strings
|
|
328
372
|
# consider empty strings
|
|
329
373
|
# consider calling function on whole string "".format()
|
|
330
|
-
|
|
374
|
+
is_bytes = self._is_bytes_literal(tokval)
|
|
331
375
|
|
|
332
|
-
|
|
333
|
-
# strategies = strategies.copy()
|
|
334
|
-
# strategies.append(self.Strats.ADDITION)
|
|
376
|
+
strategies = list(self.ALL)
|
|
335
377
|
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
378
|
+
if is_bytes:
|
|
379
|
+
# SHIFT and REPLACE are text-only; exclude for byte literals
|
|
380
|
+
for s in (self.Strats.SHIFT, self.Strats.REPLACE):
|
|
381
|
+
if s in strategies:
|
|
382
|
+
strategies.remove(s)
|
|
339
383
|
|
|
340
384
|
if next_tokval != ".":
|
|
341
|
-
strategies
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
self.Strats.SHIFT,
|
|
347
|
-
],
|
|
348
|
-
)
|
|
385
|
+
strategies.append(self.Strats.HEX)
|
|
386
|
+
if not is_bytes:
|
|
387
|
+
# UNICODE uses \u escapes which are invalid in byte literals
|
|
388
|
+
strategies.append(self.Strats.UNICODE)
|
|
389
|
+
strategies.append(self.Strats.SHIFT)
|
|
349
390
|
|
|
350
391
|
strategy = random.choice(strategies)
|
|
351
392
|
|
|
352
393
|
if strategy == self.Strats.BASE64:
|
|
353
|
-
tokens = self.
|
|
394
|
+
tokens = self._obf_base64(tokval)
|
|
354
395
|
elif strategy == self.Strats.ADDITION:
|
|
355
|
-
tokens = self.
|
|
396
|
+
tokens = self._additions(tokval)
|
|
356
397
|
elif strategy == self.Strats.ONLY_ADDITION:
|
|
357
|
-
tokens = self.
|
|
398
|
+
tokens = self._only_additions(tokval)
|
|
358
399
|
elif strategy == self.Strats.BASE85:
|
|
359
|
-
tokens = self.
|
|
400
|
+
tokens = self._obf_base85(tokval)
|
|
360
401
|
elif strategy == self.Strats.HEX:
|
|
361
|
-
tokens = self.
|
|
402
|
+
tokens = self._hex(tokval)
|
|
362
403
|
elif strategy == self.Strats.UNICODE:
|
|
363
|
-
tokens = self.
|
|
404
|
+
tokens = self._unicode(tokval)
|
|
364
405
|
elif strategy == self.Strats.SHIFT:
|
|
365
|
-
tokens = self.
|
|
406
|
+
tokens = self._obf_shift(tokval)
|
|
366
407
|
elif strategy == self.Strats.REPLACE:
|
|
367
|
-
tokens = self.
|
|
408
|
+
tokens = self._string_replace(tokval)
|
|
368
409
|
elif strategy == self.Strats.REVERSE:
|
|
369
|
-
tokens = self.
|
|
410
|
+
tokens = self._string_reverse(tokval)
|
|
370
411
|
elif strategy == self.Strats.ONE_ON_N:
|
|
371
|
-
tokens = self.
|
|
412
|
+
tokens = self._string_one_on_n(tokval)
|
|
372
413
|
else:
|
|
373
|
-
logger.error("unsupported strategy %s", strategy)
|
|
374
|
-
return
|
|
414
|
+
logger.error("unsupported strategy %s, not obfuscating", strategy)
|
|
415
|
+
return [(STRING, tokval)]
|
|
375
416
|
|
|
376
417
|
return tokens
|
|
377
418
|
|
|
@@ -442,9 +483,9 @@ class StringsObfuscator:
|
|
|
442
483
|
ENCODING,
|
|
443
484
|
]:
|
|
444
485
|
try:
|
|
445
|
-
new_tokens = self.
|
|
446
|
-
except
|
|
447
|
-
logger.
|
|
486
|
+
new_tokens = self._obfuscate_string(tokval, next_tokval)
|
|
487
|
+
except Exception: # noqa: BLE001
|
|
488
|
+
logger.warning("failed to obfuscate string token: %s", tokval[:50])
|
|
448
489
|
|
|
449
490
|
if new_tokens:
|
|
450
491
|
result.extend(new_tokens)
|
{python_obfuscation_framework-1.11.0 → python_obfuscation_framework-1.11.1}/pof/utils/cipher/rc4.py
RENAMED
|
@@ -399,7 +399,7 @@ class RC4Cipher:
|
|
|
399
399
|
return "".join(res)
|
|
400
400
|
|
|
401
401
|
def rc4encrypt(key, plaintext):
|
|
402
|
-
plaintext =
|
|
402
|
+
plaintext = list(plaintext.encode("utf-8"))
|
|
403
403
|
return encrypt_logic(key, plaintext)
|
|
404
404
|
|
|
405
405
|
return rc4encrypt(self.key, string)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-obfuscation-framework
|
|
3
|
-
Version: 1.11.
|
|
3
|
+
Version: 1.11.1
|
|
4
4
|
Summary: Python Obfuscation Framework
|
|
5
5
|
Author-email: deoktr <35725720+deoktr@users.noreply.github.com>
|
|
6
6
|
Maintainer-email: deoktr <35725720+deoktr@users.noreply.github.com>
|
|
@@ -166,13 +166,20 @@ tests/obfuscator/test_edge_cases.py
|
|
|
166
166
|
tests/obfuscator/test_integration.py
|
|
167
167
|
tests/obfuscator/utils.py
|
|
168
168
|
tests/obfuscator/fixtures/__init__.py
|
|
169
|
+
tests/obfuscator/fixtures/booleans.py
|
|
169
170
|
tests/obfuscator/fixtures/complex.py
|
|
171
|
+
tests/obfuscator/fixtures/compression.py
|
|
170
172
|
tests/obfuscator/fixtures/decorators.py
|
|
173
|
+
tests/obfuscator/fixtures/deepenc.py
|
|
174
|
+
tests/obfuscator/fixtures/docs.py
|
|
175
|
+
tests/obfuscator/fixtures/encoding.py
|
|
176
|
+
tests/obfuscator/fixtures/esoteric.py
|
|
171
177
|
tests/obfuscator/fixtures/getattr.py
|
|
172
178
|
tests/obfuscator/fixtures/import.py
|
|
173
179
|
tests/obfuscator/fixtures/lambda.py
|
|
174
180
|
tests/obfuscator/fixtures/moderate.py
|
|
175
181
|
tests/obfuscator/fixtures/numbers.py
|
|
182
|
+
tests/obfuscator/fixtures/rc4.py
|
|
176
183
|
tests/obfuscator/fixtures/simple.py
|
|
177
184
|
tests/obfuscator/fixtures/strings.py
|
|
178
185
|
tests/obfuscator/fixtures/try.py
|
|
@@ -93,9 +93,9 @@ class SkipEntry:
|
|
|
93
93
|
|
|
94
94
|
SKIP_LIST: list[SkipEntry] = [
|
|
95
95
|
SkipEntry(
|
|
96
|
-
"
|
|
97
|
-
"
|
|
98
|
-
"
|
|
96
|
+
"CommentsObfuscator",
|
|
97
|
+
"docs",
|
|
98
|
+
"esoteric fixture uses Foo.__doc__ which CommentsObfuscator removes by design",
|
|
99
99
|
),
|
|
100
100
|
]
|
|
101
101
|
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
print(True)
|
|
2
|
+
print(False)
|
|
3
|
+
|
|
4
|
+
if True:
|
|
5
|
+
print(1)
|
|
6
|
+
|
|
7
|
+
if False:
|
|
8
|
+
pass
|
|
9
|
+
else:
|
|
10
|
+
print(2)
|
|
11
|
+
|
|
12
|
+
# obfuscated
|
|
13
|
+
|
|
14
|
+
# not False
|
|
15
|
+
print(not False)
|
|
16
|
+
|
|
17
|
+
# all([])
|
|
18
|
+
print(all([]))
|
|
19
|
+
|
|
20
|
+
# any([True])
|
|
21
|
+
print(any([True]))
|
|
22
|
+
|
|
23
|
+
# not not True
|
|
24
|
+
print(not not True)
|
|
25
|
+
|
|
26
|
+
# '' in ''
|
|
27
|
+
print('' in '')
|
|
28
|
+
|
|
29
|
+
# bool(1)
|
|
30
|
+
print(bool(1))
|
|
@@ -77,3 +77,24 @@ print(f"stopped at {i}")
|
|
|
77
77
|
items = ["alpha", "beta", "gamma"]
|
|
78
78
|
for idx, item in enumerate(items):
|
|
79
79
|
print(f"{idx}:{item}")
|
|
80
|
+
|
|
81
|
+
# obfuscated
|
|
82
|
+
|
|
83
|
+
# ControlFlowFlattenObfuscator
|
|
84
|
+
# TODO: uncomment
|
|
85
|
+
# def greet(name):
|
|
86
|
+
# _state=936
|
|
87
|
+
# _ret=None
|
|
88
|
+
# while _state!=435:
|
|
89
|
+
# if _state==995:
|
|
90
|
+
# msg=msg+name
|
|
91
|
+
# _state=528
|
|
92
|
+
# elif _state==936:
|
|
93
|
+
# msg='Hello, '
|
|
94
|
+
# _state=995
|
|
95
|
+
# elif _state==528:
|
|
96
|
+
# _ret=msg
|
|
97
|
+
# _state=435
|
|
98
|
+
# return _ret
|
|
99
|
+
#
|
|
100
|
+
# greet("world")
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Bz2Obfuscator
|
|
2
|
+
import bz2,marshal
|
|
3
|
+
exec(marshal.loads(bz2.decompress( b'BZh91AY&SY\xcf\xf8\xcd\xdc\x00\x00\ru\x80\xc0\x10\x01\x00@\xe4\x00@\x06%\xd4\x80\x08\x00 \x00"&\x80d\x196\xa1L&\x9a\x03LI\x99\\eR\x15\xcd\xb9\x04\xd4s\x1d\x08\x00\xf8\xbb\x92)\xc2\x84\x86\x7f\xc6n\xe0')))
|
|
4
|
+
|
|
5
|
+
# GzipObfuscator
|
|
6
|
+
import gzip,marshal
|
|
7
|
+
exec(marshal.loads(gzip.decompress( b'\x1f\x8b\x08\x00$p\x91d\x02\xff\xfb,\xc6\xc0\xc0PP\x94\x99W\xa2\xa1\xee\x91\x9a\x93\x93\xaf\xa3P\x9e_\x94\x93\xa2\xae\xc9\x05\x00\xf2\x90\x8eA\x1b\x00\x00\x00')))
|
|
8
|
+
|
|
9
|
+
# LzmaObfuscator
|
|
10
|
+
import lzma,marshal
|
|
11
|
+
exec(marshal.loads(lzma.decompress( b"\xfd7zXZ\x00\x00\x04\xe6\xd6\xb4F\x02\x00!\x01\x16\x00\x00\x00t/\xe5\xa3\x01\x00\x1a\xf3\x16\x00\x00\x00print('Hello, world')\n\x00\x00\xd5\xa4\x00\xec\xfa;\x9c\xf1\x00\x013\x1b\xf7\x19\x88^\x1f\xb6\xf3}\x01\x00\x00\x00\x00\x04YZ")))
|
|
12
|
+
|
|
13
|
+
# ZlibObfuscator
|
|
14
|
+
import zlib,marshal
|
|
15
|
+
exec(marshal.loads(zlib.decompress( b'x\x9c\xfb,\xc6\xc0\xc0PP\x94\x99W\xa2\xa1\xee\x91\x9a\x93\x93\xaf\xa3P\x9e_\x94\x93\xa2\xae\xc9\x05\x00va\x08H')))
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# DeepEncryptionObfuscator
|
|
2
|
+
from base64 import b64decode
|
|
3
|
+
def foo():
|
|
4
|
+
r_dict=globals().copy()
|
|
5
|
+
r_dict.update(locals())
|
|
6
|
+
exec(b64decode( b'cHJpbnQgKCJIZWxsbywgd29ybGQiKQoK'),r_dict)
|
|
7
|
+
if'r'not in r_dict:
|
|
8
|
+
return None
|
|
9
|
+
else:
|
|
10
|
+
r_val=r_dict['r']
|
|
11
|
+
del r_dict
|
|
12
|
+
return r_val
|
|
13
|
+
|
|
14
|
+
foo()
|