python-obfuscation-framework 1.7.5__tar.gz → 1.9.0__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.7.5/python_obfuscation_framework.egg-info → python_obfuscation_framework-1.9.0}/PKG-INFO +38 -74
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/README.md +37 -73
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/main.py +21 -5
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/__init__.py +4 -0
- python_obfuscation_framework-1.9.0/pof/obfuscator/boolean.py +144 -0
- python_obfuscation_framework-1.9.0/pof/obfuscator/variables.py +116 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pyproject.toml +1 -1
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0/python_obfuscation_framework.egg-info}/PKG-INFO +38 -74
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/python_obfuscation_framework.egg-info/SOURCES.txt +3 -0
- python_obfuscation_framework-1.9.0/tests/obfuscator/test_boolean.py +35 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/LICENSE +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/MANIFEST.in +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/__init__.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/__main__.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/cli.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/cli_v2.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/errors.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/evasion/__init__.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/evasion/argv.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/evasion/base.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/evasion/cpu/__init__.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/evasion/cpu/cpu_count.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/evasion/fs/__init__.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/evasion/fs/directory_exist.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/evasion/fs/directory_list_exist.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/evasion/fs/directory_list_missing.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/evasion/fs/directory_missing.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/evasion/fs/exec_method.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/evasion/fs/executable_path.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/evasion/fs/file_exist.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/evasion/fs/file_list_exist.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/evasion/fs/file_list_missing.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/evasion/fs/file_missing.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/evasion/fs/tmp.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/evasion/hardware/__init__.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/evasion/hardware/ram_count.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/evasion/hooks/__init__.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/evasion/hooks/debugger.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/evasion/hooks/tracemalloc.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/evasion/human/__init__.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/evasion/human/p.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/evasion/human/prompt.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/evasion/integrity.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/evasion/multi.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/evasion/os/__init__.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/evasion/os/domain.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/evasion/os/hostname.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/evasion/os/uid.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/evasion/os/username.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/evasion/processes/__init__.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/evasion/processes/proc_count.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/evasion/time/__init__.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/evasion/time/expire.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/evasion/time/uptime.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/evasion/time/utc.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/evasion/utils.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/logger.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/builtins.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/cipher/__init__.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/cipher/deep_encryption.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/cipher/rc4.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/cipher/shift.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/cipher/xor.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/compression/__init__.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/compression/bz2.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/compression/gzip.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/compression/lzma.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/compression/zlib.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/constants.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/definitions.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/encoding/__init__.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/encoding/a85.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/encoding/b16.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/encoding/b32.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/encoding/b32hex.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/encoding/b64.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/encoding/b85.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/encoding/binascii.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/encoding/snt.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/encoding/whitespace.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/esoteric/__init__.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/esoteric/call.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/esoteric/doc.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/esoteric/globals.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/esoteric/imports.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/extract_variables.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/junk/__init__.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/junk/add_comments.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/junk/add_newlines.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/names.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/names_rope.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/numbers.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/other/__init__.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/other/tokens.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/remove/__init__.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/remove/comments.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/remove/exceptions.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/remove/indents.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/remove/loggings.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/remove/loggings_old.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/remove/newline.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/remove/print.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/restructure.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/stegano/__init__.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/stegano/docstrings.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/stegano/ipv6encoding.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/stegano/macencoding.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/stegano/uuidencoding.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/strings.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/stager/__init__.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/stager/cipher/__init__.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/stager/cipher/rc4.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/stager/download.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/stager/image.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/stager/lots/__init__.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/stager/lots/cl1pnet.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/stager/lots/pastebin.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/stager/lots/pasters.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/stager/quine.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/utils/__init__.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/utils/cipher/__init__.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/utils/cipher/rc4.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/utils/cipher/shift.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/utils/compression/__init__.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/utils/compression/bz2.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/utils/compression/gzip.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/utils/compression/lzma.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/utils/compression/zlib.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/utils/encoding/__init__.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/utils/encoding/a85.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/utils/encoding/b16.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/utils/encoding/b3.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/utils/encoding/b32.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/utils/encoding/b32hex.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/utils/encoding/b64.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/utils/encoding/b85.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/utils/encoding/binascii.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/utils/encoding/snt.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/utils/encoding/whitespace.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/utils/entropy.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/utils/extract_names.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/utils/format.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/utils/generator/__init__.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/utils/generator/advanced.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/utils/generator/base.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/utils/generator/basic.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/utils/generator/comments.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/utils/generator/comments.txt +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/utils/generator/names.txt +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/utils/generator/unicode.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/utils/se/__init__.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/utils/se/homoglyphs.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/utils/se/homoglyphs.txt +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/utils/stegano/__init__.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/utils/stegano/ipv6encoding.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/utils/stegano/macencoding.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/utils/stegano/uuidencoding.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/utils/tokens.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/python_obfuscation_framework.egg-info/dependency_links.txt +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/python_obfuscation_framework.egg-info/entry_points.txt +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/python_obfuscation_framework.egg-info/requires.txt +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/python_obfuscation_framework.egg-info/top_level.txt +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/setup.cfg +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/tests/__init__.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/tests/obfuscator/__init__.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/tests/obfuscator/test_a85.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/tests/obfuscator/test_b16.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/tests/obfuscator/test_b32.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/tests/obfuscator/test_b32hex.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/tests/obfuscator/test_b64.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/tests/obfuscator/test_b85.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/tests/obfuscator/test_binascii.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/tests/obfuscator/test_call.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/tests/obfuscator/test_comments.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/tests/obfuscator/test_doc.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/tests/obfuscator/test_docstrings.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/tests/obfuscator/test_exceptions.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/tests/obfuscator/test_ipv6encoding.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/tests/obfuscator/test_names/code/out.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/tests/obfuscator/test_names/code/source.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/tests/obfuscator/test_names/test_names.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/tests/obfuscator/test_number.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/tests/obfuscator/test_print.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/tests/obfuscator/test_snt.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/tests/obfuscator/test_tokens.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/tests/obfuscator/test_xor.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/tests/obfuscator/utils.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/tests/pyproject.toml +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/tests/utils/__init__.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/tests/utils/se/__init__.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/tests/utils/se/test_homoglyphs.py +0 -0
- {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/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.
|
|
3
|
+
Version: 1.9.0
|
|
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>
|
|
@@ -190,6 +190,15 @@ to
|
|
|
190
190
|
on virus total:
|
|
191
191
|

|
|
192
192
|
|
|
193
|
+
Obfuscating
|
|
194
|
+
[RedTigerStealer](https://bazaar.abuse.ch/sample/9b4c37e3e994ad0222740e4c51dae48cc415957f8ad066da25e977e5031fa374/)
|
|
195
|
+
we go from
|
|
196
|
+
[26/63](https://www.virustotal.com/gui/file/9b4c37e3e994ad0222740e4c51dae48cc415957f8ad066da25e977e5031fa374)
|
|
197
|
+
to
|
|
198
|
+
[1/62](https://www.virustotal.com/gui/file/5616cb69576b11fa4a024023bcf0f66e66b84f426067e597075dfcbba945d5e3)
|
|
199
|
+
on virus total:
|
|
200
|
+

|
|
201
|
+
|
|
193
202
|
Obfuscating [BTC-Clipper](https://github.com/NightfallGT/BTC-Clipper), we go
|
|
194
203
|
from
|
|
195
204
|
[13/64](https://www.virustotal.com/gui/file/9817d8de9bf7d2740b5b66e30ec1afdd98d7d119074a61cbba05514d4ebdc149)
|
|
@@ -217,17 +226,13 @@ on virus total:
|
|
|
217
226
|
|
|
218
227
|
## Install
|
|
219
228
|
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
There is also the option to run the web server, see [server/README.md](./server/README.md).
|
|
223
|
-
|
|
224
|
-
And you can try it without installing anything:
|
|
229
|
+
You can install POF with pip install, inside a container or try it online at [pof.run](https://pof.run):
|
|
225
230
|
|
|
226
231
|
```bash
|
|
227
232
|
echo 'print("Hello, world!")' | curl -X POST -d @- https://pof.run
|
|
228
233
|
```
|
|
229
234
|
|
|
230
|
-
###
|
|
235
|
+
### PIP
|
|
231
236
|
|
|
232
237
|
From [pypi](https://pypi.org/project/python-obfuscation-framework):
|
|
233
238
|
|
|
@@ -235,31 +240,16 @@ From [pypi](https://pypi.org/project/python-obfuscation-framework):
|
|
|
235
240
|
pip install python-obfuscation-framework
|
|
236
241
|
```
|
|
237
242
|
|
|
238
|
-
###
|
|
239
|
-
|
|
240
|
-
Install from source inside a virtual env:
|
|
243
|
+
### Docker
|
|
241
244
|
|
|
242
245
|
```bash
|
|
243
|
-
git clone https://github.com/deoktr/pof
|
|
244
|
-
cd pof
|
|
245
|
-
python -m venv venv
|
|
246
|
-
source ./venv/bin/activate
|
|
247
|
-
pip install .
|
|
248
|
-
```
|
|
249
|
-
|
|
250
|
-
This will install pof inside a virtual env, so you'll need to activate it every time you want to use it.
|
|
251
|
-
|
|
252
|
-
### 3. Docker
|
|
253
|
-
|
|
254
|
-
```bash
|
|
255
|
-
docker pull ghcr.io/deoktr/pof:latest
|
|
256
246
|
docker run --rm ghcr.io/deoktr/pof:latest --help
|
|
257
247
|
```
|
|
258
248
|
|
|
259
249
|
Run inside Docker from a local file `in.py`:
|
|
260
250
|
|
|
261
251
|
```bash
|
|
262
|
-
docker run --rm -v $(pwd):/tmp ghcr.io/deoktr/pof:latest
|
|
252
|
+
docker run --rm -v $(pwd):/tmp -w /tmp ghcr.io/deoktr/pof:latest in.py -o out.py
|
|
263
253
|
```
|
|
264
254
|
|
|
265
255
|
Or pipe input and output:
|
|
@@ -268,29 +258,6 @@ Or pipe input and output:
|
|
|
268
258
|
cat in.py | docker run --rm -i ghcr.io/deoktr/pof:latest > out.py
|
|
269
259
|
```
|
|
270
260
|
|
|
271
|
-
### 4. Docker Source
|
|
272
|
-
|
|
273
|
-
```bash
|
|
274
|
-
git clone https://github.com/deoktr/pof
|
|
275
|
-
cd pof
|
|
276
|
-
docker build -t pof .
|
|
277
|
-
docker run --rm pof --help
|
|
278
|
-
```
|
|
279
|
-
|
|
280
|
-
Run inside Docker from a local file `in.py`:
|
|
281
|
-
|
|
282
|
-
```bash
|
|
283
|
-
docker run --rm -v $(pwd):/tmp pof /tmp/in.py -o /tmp/out.py
|
|
284
|
-
```
|
|
285
|
-
|
|
286
|
-
### 5. Nix
|
|
287
|
-
|
|
288
|
-
From [github.com/onix-sec/nixsecpkgs](https://github.com/onix-sec/nixsecpkgs):
|
|
289
|
-
|
|
290
|
-
```bash
|
|
291
|
-
nix shell github:onix-sec/nixsecpkgs#pof
|
|
292
|
-
```
|
|
293
|
-
|
|
294
261
|
## Usage
|
|
295
262
|
|
|
296
263
|
```bash
|
|
@@ -346,51 +313,48 @@ echo "print('Hello, world')" | pof -f obfuscator -k UUIDObfuscator | python
|
|
|
346
313
|
|
|
347
314
|
### Obfuscator
|
|
348
315
|
|
|
349
|
-
`
|
|
316
|
+
`VariablesObfuscator` the most basic obfuscator will rename variables.
|
|
350
317
|
|
|
351
318
|
Source in `examples/source.py`.
|
|
352
319
|
|
|
353
320
|
```python
|
|
354
|
-
import os
|
|
321
|
+
import os
|
|
355
322
|
|
|
356
|
-
def
|
|
323
|
+
def get_linux_release_info():
|
|
357
324
|
"""Get Linux release info from /etc/os-release."""
|
|
358
|
-
|
|
359
|
-
if not
|
|
325
|
+
uggNx = '/etc/os-release'
|
|
326
|
+
if not os.path.exists(uggNx):
|
|
360
327
|
print('OS release file not found. This might not be a Linux system.')
|
|
361
328
|
return None
|
|
362
|
-
|
|
329
|
+
LY3mN = {}
|
|
363
330
|
try:
|
|
364
|
-
with open(
|
|
365
|
-
for
|
|
366
|
-
if not
|
|
331
|
+
with open(uggNx, 'r') as kj0:
|
|
332
|
+
for Stv9o in kj0:
|
|
333
|
+
if not Stv9o or '=' not in Stv9o:
|
|
367
334
|
continue
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
335
|
+
l0j, QE5kCKYwMe = Stv9o.strip().split('=', 1)
|
|
336
|
+
QE5kCKYwMe = QE5kCKYwMe.strip('"\'\n')
|
|
337
|
+
LY3mN[l0j] = QE5kCKYwMe
|
|
371
338
|
print('\nLinux Release Information:')
|
|
372
|
-
print(f"Distribution: {
|
|
373
|
-
print(f"Version: {
|
|
374
|
-
print(f"Version ID: {
|
|
375
|
-
print(f"Pretty Name: {
|
|
376
|
-
return
|
|
377
|
-
except Exception as
|
|
378
|
-
print(f'Error reading release file: {
|
|
339
|
+
print(f"Distribution: {LY3mN.get('NAME', 'Unknown')}")
|
|
340
|
+
print(f"Version: {LY3mN.get('VERSION', 'Unknown')}")
|
|
341
|
+
print(f"Version ID: {LY3mN.get('VERSION_ID', 'Unknown')}")
|
|
342
|
+
print(f"Pretty Name: {LY3mN.get('PRETTY_NAME', 'Unknown')}")
|
|
343
|
+
return LY3mN
|
|
344
|
+
except Exception as e:
|
|
345
|
+
print(f'Error reading release file: {e}')
|
|
379
346
|
return None
|
|
380
347
|
if __name__ == '__main__':
|
|
381
|
-
if
|
|
382
|
-
|
|
348
|
+
if os.name == 'posix' and os.path.exists('/etc/os-release'):
|
|
349
|
+
E_R72 = get_linux_release_info()
|
|
383
350
|
else:
|
|
384
351
|
print('This script is designed for Linux systems.')
|
|
385
352
|
```
|
|
386
353
|
|
|
387
|
-
|
|
388
|
-
> Right now this obfuscator can fail under very specific circumstances, see `pof/obfuscator/names.py`.
|
|
389
|
-
|
|
390
|
-
An alternative is `DefinitionsObfuscator`, that will only obfuscate function declarations.
|
|
354
|
+
`DefinitionsObfuscator` obfuscate function names.
|
|
391
355
|
|
|
392
|
-
> [!
|
|
393
|
-
> There is an alternative implementation at `NamesRopeObfuscator` that uses `rope`, it's a work in progress and currently does not obfuscate variables declared inside functions.
|
|
356
|
+
> [!WARNING]
|
|
357
|
+
> `NamesObfuscator` obfuscator is renaming variables, classes, functions, and imports. Right now this obfuscator can fail under very specific circumstances, see `pof/obfuscator/names.py`. There is an alternative implementation at `NamesRopeObfuscator` that uses `rope`, it's a work in progress and currently does not obfuscate variables declared inside functions.
|
|
394
358
|
|
|
395
359
|
Other very basic obfuscation functions are done by specific obfuscators like:
|
|
396
360
|
|
|
@@ -145,6 +145,15 @@ to
|
|
|
145
145
|
on virus total:
|
|
146
146
|

|
|
147
147
|
|
|
148
|
+
Obfuscating
|
|
149
|
+
[RedTigerStealer](https://bazaar.abuse.ch/sample/9b4c37e3e994ad0222740e4c51dae48cc415957f8ad066da25e977e5031fa374/)
|
|
150
|
+
we go from
|
|
151
|
+
[26/63](https://www.virustotal.com/gui/file/9b4c37e3e994ad0222740e4c51dae48cc415957f8ad066da25e977e5031fa374)
|
|
152
|
+
to
|
|
153
|
+
[1/62](https://www.virustotal.com/gui/file/5616cb69576b11fa4a024023bcf0f66e66b84f426067e597075dfcbba945d5e3)
|
|
154
|
+
on virus total:
|
|
155
|
+

|
|
156
|
+
|
|
148
157
|
Obfuscating [BTC-Clipper](https://github.com/NightfallGT/BTC-Clipper), we go
|
|
149
158
|
from
|
|
150
159
|
[13/64](https://www.virustotal.com/gui/file/9817d8de9bf7d2740b5b66e30ec1afdd98d7d119074a61cbba05514d4ebdc149)
|
|
@@ -172,17 +181,13 @@ on virus total:
|
|
|
172
181
|
|
|
173
182
|
## Install
|
|
174
183
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
There is also the option to run the web server, see [server/README.md](./server/README.md).
|
|
178
|
-
|
|
179
|
-
And you can try it without installing anything:
|
|
184
|
+
You can install POF with pip install, inside a container or try it online at [pof.run](https://pof.run):
|
|
180
185
|
|
|
181
186
|
```bash
|
|
182
187
|
echo 'print("Hello, world!")' | curl -X POST -d @- https://pof.run
|
|
183
188
|
```
|
|
184
189
|
|
|
185
|
-
###
|
|
190
|
+
### PIP
|
|
186
191
|
|
|
187
192
|
From [pypi](https://pypi.org/project/python-obfuscation-framework):
|
|
188
193
|
|
|
@@ -190,31 +195,16 @@ From [pypi](https://pypi.org/project/python-obfuscation-framework):
|
|
|
190
195
|
pip install python-obfuscation-framework
|
|
191
196
|
```
|
|
192
197
|
|
|
193
|
-
###
|
|
194
|
-
|
|
195
|
-
Install from source inside a virtual env:
|
|
198
|
+
### Docker
|
|
196
199
|
|
|
197
200
|
```bash
|
|
198
|
-
git clone https://github.com/deoktr/pof
|
|
199
|
-
cd pof
|
|
200
|
-
python -m venv venv
|
|
201
|
-
source ./venv/bin/activate
|
|
202
|
-
pip install .
|
|
203
|
-
```
|
|
204
|
-
|
|
205
|
-
This will install pof inside a virtual env, so you'll need to activate it every time you want to use it.
|
|
206
|
-
|
|
207
|
-
### 3. Docker
|
|
208
|
-
|
|
209
|
-
```bash
|
|
210
|
-
docker pull ghcr.io/deoktr/pof:latest
|
|
211
201
|
docker run --rm ghcr.io/deoktr/pof:latest --help
|
|
212
202
|
```
|
|
213
203
|
|
|
214
204
|
Run inside Docker from a local file `in.py`:
|
|
215
205
|
|
|
216
206
|
```bash
|
|
217
|
-
docker run --rm -v $(pwd):/tmp ghcr.io/deoktr/pof:latest
|
|
207
|
+
docker run --rm -v $(pwd):/tmp -w /tmp ghcr.io/deoktr/pof:latest in.py -o out.py
|
|
218
208
|
```
|
|
219
209
|
|
|
220
210
|
Or pipe input and output:
|
|
@@ -223,29 +213,6 @@ Or pipe input and output:
|
|
|
223
213
|
cat in.py | docker run --rm -i ghcr.io/deoktr/pof:latest > out.py
|
|
224
214
|
```
|
|
225
215
|
|
|
226
|
-
### 4. Docker Source
|
|
227
|
-
|
|
228
|
-
```bash
|
|
229
|
-
git clone https://github.com/deoktr/pof
|
|
230
|
-
cd pof
|
|
231
|
-
docker build -t pof .
|
|
232
|
-
docker run --rm pof --help
|
|
233
|
-
```
|
|
234
|
-
|
|
235
|
-
Run inside Docker from a local file `in.py`:
|
|
236
|
-
|
|
237
|
-
```bash
|
|
238
|
-
docker run --rm -v $(pwd):/tmp pof /tmp/in.py -o /tmp/out.py
|
|
239
|
-
```
|
|
240
|
-
|
|
241
|
-
### 5. Nix
|
|
242
|
-
|
|
243
|
-
From [github.com/onix-sec/nixsecpkgs](https://github.com/onix-sec/nixsecpkgs):
|
|
244
|
-
|
|
245
|
-
```bash
|
|
246
|
-
nix shell github:onix-sec/nixsecpkgs#pof
|
|
247
|
-
```
|
|
248
|
-
|
|
249
216
|
## Usage
|
|
250
217
|
|
|
251
218
|
```bash
|
|
@@ -301,51 +268,48 @@ echo "print('Hello, world')" | pof -f obfuscator -k UUIDObfuscator | python
|
|
|
301
268
|
|
|
302
269
|
### Obfuscator
|
|
303
270
|
|
|
304
|
-
`
|
|
271
|
+
`VariablesObfuscator` the most basic obfuscator will rename variables.
|
|
305
272
|
|
|
306
273
|
Source in `examples/source.py`.
|
|
307
274
|
|
|
308
275
|
```python
|
|
309
|
-
import os
|
|
276
|
+
import os
|
|
310
277
|
|
|
311
|
-
def
|
|
278
|
+
def get_linux_release_info():
|
|
312
279
|
"""Get Linux release info from /etc/os-release."""
|
|
313
|
-
|
|
314
|
-
if not
|
|
280
|
+
uggNx = '/etc/os-release'
|
|
281
|
+
if not os.path.exists(uggNx):
|
|
315
282
|
print('OS release file not found. This might not be a Linux system.')
|
|
316
283
|
return None
|
|
317
|
-
|
|
284
|
+
LY3mN = {}
|
|
318
285
|
try:
|
|
319
|
-
with open(
|
|
320
|
-
for
|
|
321
|
-
if not
|
|
286
|
+
with open(uggNx, 'r') as kj0:
|
|
287
|
+
for Stv9o in kj0:
|
|
288
|
+
if not Stv9o or '=' not in Stv9o:
|
|
322
289
|
continue
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
290
|
+
l0j, QE5kCKYwMe = Stv9o.strip().split('=', 1)
|
|
291
|
+
QE5kCKYwMe = QE5kCKYwMe.strip('"\'\n')
|
|
292
|
+
LY3mN[l0j] = QE5kCKYwMe
|
|
326
293
|
print('\nLinux Release Information:')
|
|
327
|
-
print(f"Distribution: {
|
|
328
|
-
print(f"Version: {
|
|
329
|
-
print(f"Version ID: {
|
|
330
|
-
print(f"Pretty Name: {
|
|
331
|
-
return
|
|
332
|
-
except Exception as
|
|
333
|
-
print(f'Error reading release file: {
|
|
294
|
+
print(f"Distribution: {LY3mN.get('NAME', 'Unknown')}")
|
|
295
|
+
print(f"Version: {LY3mN.get('VERSION', 'Unknown')}")
|
|
296
|
+
print(f"Version ID: {LY3mN.get('VERSION_ID', 'Unknown')}")
|
|
297
|
+
print(f"Pretty Name: {LY3mN.get('PRETTY_NAME', 'Unknown')}")
|
|
298
|
+
return LY3mN
|
|
299
|
+
except Exception as e:
|
|
300
|
+
print(f'Error reading release file: {e}')
|
|
334
301
|
return None
|
|
335
302
|
if __name__ == '__main__':
|
|
336
|
-
if
|
|
337
|
-
|
|
303
|
+
if os.name == 'posix' and os.path.exists('/etc/os-release'):
|
|
304
|
+
E_R72 = get_linux_release_info()
|
|
338
305
|
else:
|
|
339
306
|
print('This script is designed for Linux systems.')
|
|
340
307
|
```
|
|
341
308
|
|
|
342
|
-
|
|
343
|
-
> Right now this obfuscator can fail under very specific circumstances, see `pof/obfuscator/names.py`.
|
|
344
|
-
|
|
345
|
-
An alternative is `DefinitionsObfuscator`, that will only obfuscate function declarations.
|
|
309
|
+
`DefinitionsObfuscator` obfuscate function names.
|
|
346
310
|
|
|
347
|
-
> [!
|
|
348
|
-
> There is an alternative implementation at `NamesRopeObfuscator` that uses `rope`, it's a work in progress and currently does not obfuscate variables declared inside functions.
|
|
311
|
+
> [!WARNING]
|
|
312
|
+
> `NamesObfuscator` obfuscator is renaming variables, classes, functions, and imports. Right now this obfuscator can fail under very specific circumstances, see `pof/obfuscator/names.py`. There is an alternative implementation at `NamesRopeObfuscator` that uses `rope`, it's a work in progress and currently does not obfuscate variables declared inside functions.
|
|
349
313
|
|
|
350
314
|
Other very basic obfuscation functions are done by specific obfuscators like:
|
|
351
315
|
|
|
@@ -41,6 +41,7 @@ from pof.evasion.utils import FILE_SYSTEM
|
|
|
41
41
|
from pof.logger import logger
|
|
42
42
|
from pof.obfuscator import (
|
|
43
43
|
AddCommentsObfuscator,
|
|
44
|
+
BooleanObfuscator,
|
|
44
45
|
BuiltinsObfuscator,
|
|
45
46
|
CommentsObfuscator,
|
|
46
47
|
ConstantsObfuscator,
|
|
@@ -55,6 +56,7 @@ from pof.obfuscator import (
|
|
|
55
56
|
NumberObfuscator,
|
|
56
57
|
PrintObfuscator,
|
|
57
58
|
StringsObfuscator,
|
|
59
|
+
VariablesObfuscator,
|
|
58
60
|
XORObfuscator,
|
|
59
61
|
)
|
|
60
62
|
from pof.stager import ImageStager, RC4Stager
|
|
@@ -177,6 +179,8 @@ class Obfuscator(BaseObfuscator):
|
|
|
177
179
|
# In this context, `baz` would be obfuscated, but it shouldn't because
|
|
178
180
|
# the function is part of the `foo` imported module
|
|
179
181
|
# tokens = NamesObfuscator(generator=generator).obfuscate_tokens(tokens)
|
|
182
|
+
# TODO: use alternative variable obfuscator using the AST
|
|
183
|
+
# tokens = VariablesObfuscator().obfuscate_tokens(tokens)
|
|
180
184
|
|
|
181
185
|
tokens = GlobalsObfuscator().obfuscate_tokens(tokens)
|
|
182
186
|
tokens = BuiltinsObfuscator().obfuscate_tokens(tokens)
|
|
@@ -195,9 +199,16 @@ class Obfuscator(BaseObfuscator):
|
|
|
195
199
|
|
|
196
200
|
for _ in range(2):
|
|
197
201
|
tokens = NumberObfuscator().obfuscate_tokens(tokens)
|
|
202
|
+
|
|
198
203
|
tokens = BuiltinsObfuscator().obfuscate_tokens(tokens)
|
|
204
|
+
|
|
199
205
|
for _ in range(2):
|
|
200
206
|
tokens = string_obfuscator.obfuscate_tokens(tokens)
|
|
207
|
+
|
|
208
|
+
# TODO (deoktr): enable once fully tested
|
|
209
|
+
# for _ in range(2):
|
|
210
|
+
# tokens = BooleanObfuscator().obfuscate_tokens(tokens)
|
|
211
|
+
|
|
201
212
|
tokens = AddCommentsObfuscator().obfuscate_tokens(tokens)
|
|
202
213
|
|
|
203
214
|
# clean output
|
|
@@ -230,7 +241,9 @@ class Obfuscator(BaseObfuscator):
|
|
|
230
241
|
tokens = self._get_tokens(source)
|
|
231
242
|
tokens = CommentsObfuscator().obfuscate_tokens(tokens)
|
|
232
243
|
generator = BasicGenerator.alphabet_generator()
|
|
233
|
-
tokens = NamesObfuscator(generator=generator).obfuscate_tokens(tokens)
|
|
244
|
+
# tokens = NamesObfuscator(generator=generator).obfuscate_tokens(tokens)
|
|
245
|
+
tokens = VariablesObfuscator(generator=generator).obfuscate_tokens(tokens)
|
|
246
|
+
tokens = DefinitionsObfuscator(generator=generator).obfuscate_tokens(tokens)
|
|
234
247
|
tokens = IndentsObfuscator().obfuscate_tokens(tokens)
|
|
235
248
|
tokens = NewlineObfuscator().obfuscate_tokens(tokens)
|
|
236
249
|
return self._untokenize(tokens)
|
|
@@ -305,7 +318,9 @@ class Obfuscator(BaseObfuscator):
|
|
|
305
318
|
# # FIXME (deoktr): breaks if obf_builtins_rate=1 with NamesObfuscator
|
|
306
319
|
# obf_builtins_rate=0,
|
|
307
320
|
# ).obfuscate_tokens(tokens)
|
|
308
|
-
tokens = NamesObfuscator(generator=generator).obfuscate_tokens(tokens)
|
|
321
|
+
# tokens = NamesObfuscator(generator=generator).obfuscate_tokens(tokens)
|
|
322
|
+
tokens = VariablesObfuscator(generator=generator).obfuscate_tokens(tokens)
|
|
323
|
+
tokens = DefinitionsObfuscator(generator=generator).obfuscate_tokens(tokens)
|
|
309
324
|
tokens = ConstantsObfuscator(
|
|
310
325
|
generator=generator,
|
|
311
326
|
obf_number_rate=1,
|
|
@@ -370,9 +385,10 @@ class Obfuscator(BaseObfuscator):
|
|
|
370
385
|
|
|
371
386
|
tokens = CommentsObfuscator().obfuscate_tokens(tokens)
|
|
372
387
|
# tokens = DeepEncryptionEvasion().add_evasion(tokens) # TODO (deoktr): fix
|
|
373
|
-
tokens = NamesObfuscator(
|
|
374
|
-
|
|
375
|
-
).obfuscate_tokens(tokens)
|
|
388
|
+
# tokens = NamesObfuscator(
|
|
389
|
+
# generator=AdvancedGenerator.fixed_length_generator(),
|
|
390
|
+
# ).obfuscate_tokens(tokens)
|
|
391
|
+
tokens = BooleanObfuscator().obfuscate_tokens(tokens)
|
|
376
392
|
tokens = IndentsObfuscator().obfuscate_tokens(tokens)
|
|
377
393
|
tokens = NewlineObfuscator().obfuscate_tokens(tokens)
|
|
378
394
|
|
{python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/__init__.py
RENAMED
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
# You should have received a copy of the GNU General Public License
|
|
15
15
|
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
16
16
|
|
|
17
|
+
from .boolean import BooleanObfuscator
|
|
17
18
|
from .builtins import BuiltinsObfuscator
|
|
18
19
|
from .cipher.deep_encryption import DeepEncryptionObfuscator
|
|
19
20
|
from .cipher.rc4 import RC4Obfuscator
|
|
@@ -56,6 +57,7 @@ from .stegano.ipv6encoding import IPv6Obfuscator
|
|
|
56
57
|
from .stegano.macencoding import MACObfuscator
|
|
57
58
|
from .stegano.uuidencoding import UUIDObfuscator
|
|
58
59
|
from .strings import StringsObfuscator
|
|
60
|
+
from .variables import VariablesObfuscator
|
|
59
61
|
|
|
60
62
|
__all__ = [
|
|
61
63
|
"ASCII85Obfuscator",
|
|
@@ -67,6 +69,7 @@ __all__ = [
|
|
|
67
69
|
"Base64Obfuscator",
|
|
68
70
|
"Base85Obfuscator",
|
|
69
71
|
"BinasciiObfuscator",
|
|
72
|
+
"BooleanObfuscator",
|
|
70
73
|
"BuiltinsObfuscator",
|
|
71
74
|
"Bz2Obfuscator",
|
|
72
75
|
"CallObfuscator",
|
|
@@ -98,6 +101,7 @@ __all__ = [
|
|
|
98
101
|
"StringsObfuscator",
|
|
99
102
|
"TokensObfuscator",
|
|
100
103
|
"UUIDObfuscator",
|
|
104
|
+
"VariablesObfuscator",
|
|
101
105
|
"WhitespaceObfuscator",
|
|
102
106
|
"XORObfuscator",
|
|
103
107
|
"ZlibObfuscator",
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
# POF, a free and open source Python obfuscation framework.
|
|
2
|
+
# Copyright (C) 2022 - 2026 Deoktr
|
|
3
|
+
#
|
|
4
|
+
# This program is free software: you can redistribute it and/or modify
|
|
5
|
+
# it under the terms of the GNU General Public License as published by
|
|
6
|
+
# the Free Software Foundation, either version 3 of the License, or
|
|
7
|
+
# (at your option) any later version.
|
|
8
|
+
#
|
|
9
|
+
# This program is distributed in the hope that it will be useful,
|
|
10
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12
|
+
# GNU General Public License for more details.
|
|
13
|
+
#
|
|
14
|
+
# You should have received a copy of the GNU General Public License
|
|
15
|
+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
16
|
+
|
|
17
|
+
import random
|
|
18
|
+
from tokenize import LPAR, LSQB, NAME, NUMBER, RPAR, RSQB, STRING
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class BooleanObfuscator:
|
|
22
|
+
"""Obfuscate booleans with multiple methods."""
|
|
23
|
+
|
|
24
|
+
@staticmethod
|
|
25
|
+
def obf_true():
|
|
26
|
+
match random.randint(1, 6):
|
|
27
|
+
case 1:
|
|
28
|
+
# all([])
|
|
29
|
+
return [
|
|
30
|
+
(NAME, "all"),
|
|
31
|
+
(LPAR, "("),
|
|
32
|
+
(LSQB, "["),
|
|
33
|
+
(RSQB, "]"),
|
|
34
|
+
(RPAR, ")"),
|
|
35
|
+
]
|
|
36
|
+
case 2:
|
|
37
|
+
# any([True])
|
|
38
|
+
return [
|
|
39
|
+
(NAME, "any"),
|
|
40
|
+
(LPAR, "("),
|
|
41
|
+
(LSQB, "["),
|
|
42
|
+
(NAME, "True"),
|
|
43
|
+
(RSQB, "]"),
|
|
44
|
+
(RPAR, ")"),
|
|
45
|
+
]
|
|
46
|
+
case 3:
|
|
47
|
+
# not False
|
|
48
|
+
return [
|
|
49
|
+
(NAME, "not"),
|
|
50
|
+
(NAME, "False"),
|
|
51
|
+
]
|
|
52
|
+
case 4:
|
|
53
|
+
# not not True
|
|
54
|
+
return [
|
|
55
|
+
(NAME, "not"),
|
|
56
|
+
(NAME, "not"),
|
|
57
|
+
(NAME, "True"),
|
|
58
|
+
]
|
|
59
|
+
case 5:
|
|
60
|
+
# "" in ""
|
|
61
|
+
return [
|
|
62
|
+
(STRING, "''"),
|
|
63
|
+
(NAME, "in"),
|
|
64
|
+
(STRING, "''"),
|
|
65
|
+
]
|
|
66
|
+
case 6:
|
|
67
|
+
# bool(1)
|
|
68
|
+
return [
|
|
69
|
+
(NAME, "bool"),
|
|
70
|
+
(LPAR, "("),
|
|
71
|
+
(NUMBER, "1"),
|
|
72
|
+
(RPAR, ")"),
|
|
73
|
+
]
|
|
74
|
+
|
|
75
|
+
@staticmethod
|
|
76
|
+
def obf_false():
|
|
77
|
+
match random.randint(1, 6):
|
|
78
|
+
case 1:
|
|
79
|
+
# False = all([[]])
|
|
80
|
+
return [
|
|
81
|
+
(NAME, "all"),
|
|
82
|
+
(LPAR, "("),
|
|
83
|
+
(LSQB, "["),
|
|
84
|
+
(LSQB, "["),
|
|
85
|
+
(RSQB, "]"),
|
|
86
|
+
(RSQB, "]"),
|
|
87
|
+
(RPAR, ")"),
|
|
88
|
+
]
|
|
89
|
+
case 2:
|
|
90
|
+
# all([False])
|
|
91
|
+
return [
|
|
92
|
+
(NAME, "all"),
|
|
93
|
+
(LPAR, "("),
|
|
94
|
+
(LSQB, "["),
|
|
95
|
+
(NAME, "False"),
|
|
96
|
+
(RSQB, "]"),
|
|
97
|
+
(RPAR, ")"),
|
|
98
|
+
]
|
|
99
|
+
case 3:
|
|
100
|
+
# not True
|
|
101
|
+
return [
|
|
102
|
+
(NAME, "not"),
|
|
103
|
+
(NAME, "True"),
|
|
104
|
+
]
|
|
105
|
+
case 4:
|
|
106
|
+
# not not False
|
|
107
|
+
return [
|
|
108
|
+
(NAME, "not"),
|
|
109
|
+
(NAME, "not"),
|
|
110
|
+
(NAME, "False"),
|
|
111
|
+
]
|
|
112
|
+
case 5:
|
|
113
|
+
# "" not in ""
|
|
114
|
+
return [
|
|
115
|
+
(STRING, "''"),
|
|
116
|
+
(NAME, "not"),
|
|
117
|
+
(NAME, "in"),
|
|
118
|
+
(STRING, "''"),
|
|
119
|
+
]
|
|
120
|
+
case 6:
|
|
121
|
+
# bool(0)
|
|
122
|
+
return [
|
|
123
|
+
(NAME, "bool"),
|
|
124
|
+
(LPAR, "("),
|
|
125
|
+
(NUMBER, "0"),
|
|
126
|
+
(RPAR, ")"),
|
|
127
|
+
]
|
|
128
|
+
|
|
129
|
+
def obfuscate_boolean(self, tokval):
|
|
130
|
+
if tokval == "True":
|
|
131
|
+
return self.obf_true()
|
|
132
|
+
return self.obf_false()
|
|
133
|
+
|
|
134
|
+
def obfuscate_tokens(self, tokens):
|
|
135
|
+
result = []
|
|
136
|
+
for toknum, tokval, *_ in tokens:
|
|
137
|
+
new_tokens = [(toknum, tokval)]
|
|
138
|
+
|
|
139
|
+
if toknum == NAME and tokval in ["True", "False"]:
|
|
140
|
+
new_tokens = self.obfuscate_boolean(tokval)
|
|
141
|
+
|
|
142
|
+
if new_tokens:
|
|
143
|
+
result.extend(new_tokens)
|
|
144
|
+
return result
|