python-obfuscation-framework 1.7.2__tar.gz → 1.7.4__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.2/python_obfuscation_framework.egg-info → python_obfuscation_framework-1.7.4}/PKG-INFO +45 -2
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/README.md +44 -1
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/obfuscator/definitions.py +23 -20
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/obfuscator/names.py +3 -1
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/obfuscator/names_rope.py +6 -2
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/obfuscator/strings.py +21 -5
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/utils/generator/unicode.py +2 -1
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pyproject.toml +1 -1
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4/python_obfuscation_framework.egg-info}/PKG-INFO +45 -2
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/python_obfuscation_framework.egg-info/SOURCES.txt +8 -0
- python_obfuscation_framework-1.7.4/tests/obfuscator/test_a85.py +41 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/tests/obfuscator/test_b16.py +3 -1
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/tests/obfuscator/test_b32.py +3 -1
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/tests/obfuscator/test_b32hex.py +3 -1
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/tests/obfuscator/test_b64.py +3 -1
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/tests/obfuscator/test_b85.py +3 -1
- python_obfuscation_framework-1.7.4/tests/obfuscator/test_binascii.py +40 -0
- python_obfuscation_framework-1.7.4/tests/obfuscator/test_call.py +40 -0
- python_obfuscation_framework-1.7.4/tests/obfuscator/test_doc.py +40 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/tests/obfuscator/test_docstrings.py +3 -1
- python_obfuscation_framework-1.7.4/tests/obfuscator/test_ipv6encoding.py +41 -0
- python_obfuscation_framework-1.7.2/tests/obfuscator/test_a85.py → python_obfuscation_framework-1.7.4/tests/obfuscator/test_number.py +3 -1
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/tests/obfuscator/test_print.py +1 -0
- python_obfuscation_framework-1.7.4/tests/obfuscator/test_snt.py +40 -0
- python_obfuscation_framework-1.7.4/tests/obfuscator/test_tokens.py +40 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/tests/obfuscator/test_xor.py +5 -2
- python_obfuscation_framework-1.7.4/tests/obfuscator/utils.py +11 -0
- python_obfuscation_framework-1.7.4/tests/utils/test_generator.py +88 -0
- python_obfuscation_framework-1.7.2/tests/utils/test_generator.py +0 -59
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/LICENSE +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/MANIFEST.in +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/__init__.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/__main__.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/cli.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/cli_v2.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/errors.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/evasion/__init__.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/evasion/argv.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/evasion/base.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/evasion/cpu/__init__.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/evasion/cpu/cpu_count.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/evasion/fs/__init__.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/evasion/fs/directory_exist.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/evasion/fs/directory_list_exist.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/evasion/fs/directory_list_missing.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/evasion/fs/directory_missing.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/evasion/fs/exec_method.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/evasion/fs/executable_path.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/evasion/fs/file_exist.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/evasion/fs/file_list_exist.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/evasion/fs/file_list_missing.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/evasion/fs/file_missing.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/evasion/fs/tmp.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/evasion/hardware/__init__.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/evasion/hardware/ram_count.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/evasion/hooks/__init__.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/evasion/hooks/debugger.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/evasion/hooks/tracemalloc.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/evasion/human/__init__.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/evasion/human/p.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/evasion/human/prompt.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/evasion/integrity.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/evasion/multi.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/evasion/os/__init__.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/evasion/os/domain.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/evasion/os/hostname.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/evasion/os/uid.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/evasion/os/username.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/evasion/processes/__init__.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/evasion/processes/proc_count.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/evasion/time/__init__.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/evasion/time/expire.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/evasion/time/uptime.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/evasion/time/utc.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/evasion/utils.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/logger.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/main.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/obfuscator/__init__.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/obfuscator/builtins.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/obfuscator/cipher/__init__.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/obfuscator/cipher/deep_encryption.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/obfuscator/cipher/rc4.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/obfuscator/cipher/shift.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/obfuscator/cipher/xor.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/obfuscator/compression/__init__.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/obfuscator/compression/bz2.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/obfuscator/compression/gzip.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/obfuscator/compression/lzma.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/obfuscator/compression/zlib.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/obfuscator/constants.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/obfuscator/encoding/__init__.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/obfuscator/encoding/a85.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/obfuscator/encoding/b16.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/obfuscator/encoding/b32.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/obfuscator/encoding/b32hex.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/obfuscator/encoding/b64.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/obfuscator/encoding/b85.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/obfuscator/encoding/binascii.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/obfuscator/encoding/snt.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/obfuscator/esoteric/__init__.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/obfuscator/esoteric/call.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/obfuscator/esoteric/doc.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/obfuscator/esoteric/globals.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/obfuscator/esoteric/imports.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/obfuscator/extract_variables.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/obfuscator/junk/__init__.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/obfuscator/junk/add_comments.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/obfuscator/junk/add_newlines.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/obfuscator/numbers.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/obfuscator/other/__init__.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/obfuscator/other/tokens.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/obfuscator/remove/__init__.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/obfuscator/remove/comments.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/obfuscator/remove/exceptions.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/obfuscator/remove/indents.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/obfuscator/remove/loggings.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/obfuscator/remove/loggings_old.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/obfuscator/remove/newline.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/obfuscator/remove/print.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/obfuscator/restructure.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/obfuscator/stegano/__init__.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/obfuscator/stegano/docstrings.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/obfuscator/stegano/ipv6encoding.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/obfuscator/stegano/macencoding.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/obfuscator/stegano/uuidencoding.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/stager/__init__.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/stager/cipher/__init__.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/stager/cipher/rc4.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/stager/download.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/stager/image.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/stager/lots/__init__.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/stager/lots/cl1pnet.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/stager/lots/pastebin.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/stager/lots/pasters.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/stager/quine.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/utils/__init__.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/utils/cipher/__init__.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/utils/cipher/rc4.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/utils/cipher/shift.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/utils/compression/__init__.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/utils/compression/bz2.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/utils/compression/gzip.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/utils/compression/lzma.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/utils/compression/zlib.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/utils/encoding/__init__.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/utils/encoding/a85.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/utils/encoding/b16.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/utils/encoding/b3.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/utils/encoding/b32.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/utils/encoding/b32hex.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/utils/encoding/b64.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/utils/encoding/b85.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/utils/encoding/binascii.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/utils/encoding/snt.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/utils/entropy.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/utils/extract_names.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/utils/format.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/utils/generator/__init__.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/utils/generator/advanced.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/utils/generator/base.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/utils/generator/basic.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/utils/generator/comments.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/utils/generator/comments.txt +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/utils/generator/names.txt +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/utils/se/__init__.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/utils/se/homoglyphs.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/utils/se/homoglyphs.txt +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/utils/stegano/__init__.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/utils/stegano/ipv6encoding.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/utils/stegano/macencoding.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/utils/stegano/uuidencoding.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/utils/tokens.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/python_obfuscation_framework.egg-info/dependency_links.txt +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/python_obfuscation_framework.egg-info/entry_points.txt +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/python_obfuscation_framework.egg-info/requires.txt +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/python_obfuscation_framework.egg-info/top_level.txt +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/setup.cfg +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/tests/__init__.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/tests/obfuscator/__init__.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/tests/obfuscator/test_comments.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/tests/obfuscator/test_exceptions.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/tests/obfuscator/test_names/code/out.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/tests/obfuscator/test_names/code/source.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/tests/obfuscator/test_names/test_names.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/tests/pyproject.toml +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/tests/utils/__init__.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/tests/utils/se/__init__.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/tests/utils/se/test_homoglyphs.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-obfuscation-framework
|
|
3
|
-
Version: 1.7.
|
|
3
|
+
Version: 1.7.4
|
|
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>
|
|
@@ -173,6 +173,46 @@ globals()["".join([chr(ord(i) - 3) for i in "bbvqlwolxebb"[::-1]])].__dict__[
|
|
|
173
173
|
|
|
174
174
|
More examples and usage can be found in `examples/` or in the section bellow.
|
|
175
175
|
|
|
176
|
+
## Effectiveness
|
|
177
|
+
|
|
178
|
+
The tests are done using the default configuration of pof, no sandbox evasion
|
|
179
|
+
technique was used with obfuscation. Also note that I haven't tested the
|
|
180
|
+
malware to see if they still work, they should, but they may break with
|
|
181
|
+
obfuscation.
|
|
182
|
+
|
|
183
|
+
Obfuscating a [Lazarus malware](https://bazaar.abuse.ch/sample/c3cb53c4a290bc9ab6c9eb825ed0ca38bb54bcc4a59f33be72becdff80cb091b/),
|
|
184
|
+
we go from
|
|
185
|
+
[18/63](https://www.virustotal.com/gui/file/c3cb53c4a290bc9ab6c9eb825ed0ca38bb54bcc4a59f33be72becdff80cb091b)
|
|
186
|
+
to
|
|
187
|
+
[0/63](https://www.virustotal.com/gui/file/2f427bc784e2a865d8f000c21f366cb8459842f97c56465cbe963f221b3e115a)
|
|
188
|
+
on virus total:
|
|
189
|
+

|
|
190
|
+
|
|
191
|
+
Obfuscating [BTC-Clipper](https://github.com/NightfallGT/BTC-Clipper), we go
|
|
192
|
+
from
|
|
193
|
+
[13/64](https://www.virustotal.com/gui/file/9817d8de9bf7d2740b5b66e30ec1afdd98d7d119074a61cbba05514d4ebdc149)
|
|
194
|
+
to
|
|
195
|
+
[0/63](https://www.virustotal.com/gui/file/71631daa26fe6c2cf77d282a16f8b3fd31e4794b63709b956599563b95e64816)
|
|
196
|
+
on virus total:
|
|
197
|
+

|
|
198
|
+
|
|
199
|
+
Obfuscating a
|
|
200
|
+
[Braodo malware](https://bazaar.abuse.ch/sample/b86e4bff935db9345cc1467e615ff4fbe292fae618ae927595d328cfd9e8a08f/),
|
|
201
|
+
we go from
|
|
202
|
+
[10/61](https://www.virustotal.com/gui/file/b86e4bff935db9345cc1467e615ff4fbe292fae618ae927595d328cfd9e8a08f)
|
|
203
|
+
to
|
|
204
|
+
[0/63](https://www.virustotal.com/gui/file/8791188aaf7655093307e46fa68e3705ee7249cb81e05ea416ae96ad2fd2f0f2)
|
|
205
|
+
on virus total:
|
|
206
|
+

|
|
207
|
+
|
|
208
|
+
Obfuscating [Python-File-Stealer](https://github.com/KrizzhSriskantharajah-UK/Python-File-Stealer),
|
|
209
|
+
we go from
|
|
210
|
+
[4/63](https://www.virustotal.com/gui/file/2fc798f1df42adae3af2f7d2623edc74f6b8f08a7ae16ef3b67305c4ad668c82)
|
|
211
|
+
to
|
|
212
|
+
[0/63](https://www.virustotal.com/gui/file/8d529e6ee2806986ca376a427d683fdf6980d6332134e4759d790d604d6b5dcb)
|
|
213
|
+
on virus total:
|
|
214
|
+

|
|
215
|
+
|
|
176
216
|
## Install
|
|
177
217
|
|
|
178
218
|
There are multiple installation options, with PIP, a virtualenv, a container, or with Nix.
|
|
@@ -298,7 +338,7 @@ echo "print('Hello, world')" | pof -f obfuscator -k UUIDObfuscator | python
|
|
|
298
338
|
|
|
299
339
|
### Obfuscator
|
|
300
340
|
|
|
301
|
-
`NamesObfuscator` the most basic obfuscator is
|
|
341
|
+
`NamesObfuscator` the most basic obfuscator is renaming variables, classes, functions, and imports.
|
|
302
342
|
|
|
303
343
|
Source in `examples/source.py`.
|
|
304
344
|
|
|
@@ -352,6 +392,9 @@ print('Helnelemd'.replace('nelem','lo, worl'))
|
|
|
352
392
|
# One on n
|
|
353
393
|
print("".join([d if g%3==0 else""for g,d in enumerate('H9IesYlvJl5loU4,dK nDw51ovsrozl0UdoI!jL')]))
|
|
354
394
|
|
|
395
|
+
# Hex-encoded
|
|
396
|
+
print('\x48\x65\x6c\x6c\x6f\x2c\x20\x77\x6f\x72\x6c\x64')
|
|
397
|
+
|
|
355
398
|
# Unicode
|
|
356
399
|
print('\u0048\u0065\u006c\u006c\u006f\u002c\u0020\u0077\u006f\u0072\u006c\u0064')
|
|
357
400
|
|
|
@@ -128,6 +128,46 @@ globals()["".join([chr(ord(i) - 3) for i in "bbvqlwolxebb"[::-1]])].__dict__[
|
|
|
128
128
|
|
|
129
129
|
More examples and usage can be found in `examples/` or in the section bellow.
|
|
130
130
|
|
|
131
|
+
## Effectiveness
|
|
132
|
+
|
|
133
|
+
The tests are done using the default configuration of pof, no sandbox evasion
|
|
134
|
+
technique was used with obfuscation. Also note that I haven't tested the
|
|
135
|
+
malware to see if they still work, they should, but they may break with
|
|
136
|
+
obfuscation.
|
|
137
|
+
|
|
138
|
+
Obfuscating a [Lazarus malware](https://bazaar.abuse.ch/sample/c3cb53c4a290bc9ab6c9eb825ed0ca38bb54bcc4a59f33be72becdff80cb091b/),
|
|
139
|
+
we go from
|
|
140
|
+
[18/63](https://www.virustotal.com/gui/file/c3cb53c4a290bc9ab6c9eb825ed0ca38bb54bcc4a59f33be72becdff80cb091b)
|
|
141
|
+
to
|
|
142
|
+
[0/63](https://www.virustotal.com/gui/file/2f427bc784e2a865d8f000c21f366cb8459842f97c56465cbe963f221b3e115a)
|
|
143
|
+
on virus total:
|
|
144
|
+

|
|
145
|
+
|
|
146
|
+
Obfuscating [BTC-Clipper](https://github.com/NightfallGT/BTC-Clipper), we go
|
|
147
|
+
from
|
|
148
|
+
[13/64](https://www.virustotal.com/gui/file/9817d8de9bf7d2740b5b66e30ec1afdd98d7d119074a61cbba05514d4ebdc149)
|
|
149
|
+
to
|
|
150
|
+
[0/63](https://www.virustotal.com/gui/file/71631daa26fe6c2cf77d282a16f8b3fd31e4794b63709b956599563b95e64816)
|
|
151
|
+
on virus total:
|
|
152
|
+

|
|
153
|
+
|
|
154
|
+
Obfuscating a
|
|
155
|
+
[Braodo malware](https://bazaar.abuse.ch/sample/b86e4bff935db9345cc1467e615ff4fbe292fae618ae927595d328cfd9e8a08f/),
|
|
156
|
+
we go from
|
|
157
|
+
[10/61](https://www.virustotal.com/gui/file/b86e4bff935db9345cc1467e615ff4fbe292fae618ae927595d328cfd9e8a08f)
|
|
158
|
+
to
|
|
159
|
+
[0/63](https://www.virustotal.com/gui/file/8791188aaf7655093307e46fa68e3705ee7249cb81e05ea416ae96ad2fd2f0f2)
|
|
160
|
+
on virus total:
|
|
161
|
+

|
|
162
|
+
|
|
163
|
+
Obfuscating [Python-File-Stealer](https://github.com/KrizzhSriskantharajah-UK/Python-File-Stealer),
|
|
164
|
+
we go from
|
|
165
|
+
[4/63](https://www.virustotal.com/gui/file/2fc798f1df42adae3af2f7d2623edc74f6b8f08a7ae16ef3b67305c4ad668c82)
|
|
166
|
+
to
|
|
167
|
+
[0/63](https://www.virustotal.com/gui/file/8d529e6ee2806986ca376a427d683fdf6980d6332134e4759d790d604d6b5dcb)
|
|
168
|
+
on virus total:
|
|
169
|
+

|
|
170
|
+
|
|
131
171
|
## Install
|
|
132
172
|
|
|
133
173
|
There are multiple installation options, with PIP, a virtualenv, a container, or with Nix.
|
|
@@ -253,7 +293,7 @@ echo "print('Hello, world')" | pof -f obfuscator -k UUIDObfuscator | python
|
|
|
253
293
|
|
|
254
294
|
### Obfuscator
|
|
255
295
|
|
|
256
|
-
`NamesObfuscator` the most basic obfuscator is
|
|
296
|
+
`NamesObfuscator` the most basic obfuscator is renaming variables, classes, functions, and imports.
|
|
257
297
|
|
|
258
298
|
Source in `examples/source.py`.
|
|
259
299
|
|
|
@@ -307,6 +347,9 @@ print('Helnelemd'.replace('nelem','lo, worl'))
|
|
|
307
347
|
# One on n
|
|
308
348
|
print("".join([d if g%3==0 else""for g,d in enumerate('H9IesYlvJl5loU4,dK nDw51ovsrozl0UdoI!jL')]))
|
|
309
349
|
|
|
350
|
+
# Hex-encoded
|
|
351
|
+
print('\x48\x65\x6c\x6c\x6f\x2c\x20\x77\x6f\x72\x6c\x64')
|
|
352
|
+
|
|
310
353
|
# Unicode
|
|
311
354
|
print('\u0048\u0065\u006c\u006c\u006f\u002c\u0020\u0077\u006f\u0072\u006c\u0064')
|
|
312
355
|
|
|
@@ -19,6 +19,8 @@
|
|
|
19
19
|
Rename function and classes names using external package: rope
|
|
20
20
|
"""
|
|
21
21
|
|
|
22
|
+
# https://rope.readthedocs.io/en/latest/library.html
|
|
23
|
+
|
|
22
24
|
import ast
|
|
23
25
|
import io
|
|
24
26
|
import keyword
|
|
@@ -30,6 +32,7 @@ from pof.logger import logger
|
|
|
30
32
|
from pof.utils.generator import BasicGenerator
|
|
31
33
|
|
|
32
34
|
try:
|
|
35
|
+
import rope
|
|
33
36
|
from rope.base.project import Project
|
|
34
37
|
from rope.refactor.rename import Rename
|
|
35
38
|
|
|
@@ -218,7 +221,7 @@ class DefinitionsObfuscator:
|
|
|
218
221
|
|
|
219
222
|
DEFAULT_TMP_DIR = ".pof_cache"
|
|
220
223
|
|
|
221
|
-
def __init__(self, generator=None, tmp_dir=None, *, clean=
|
|
224
|
+
def __init__(self, generator=None, tmp_dir=None, *, clean=True) -> None:
|
|
222
225
|
if generator is None:
|
|
223
226
|
generator = BasicGenerator.alphabet_generator()
|
|
224
227
|
self.generator = generator
|
|
@@ -303,8 +306,7 @@ class DefinitionsObfuscator:
|
|
|
303
306
|
|
|
304
307
|
local_names = self.get_local(tokens)
|
|
305
308
|
|
|
306
|
-
|
|
307
|
-
logger.debug(msg)
|
|
309
|
+
logger.debug(f"found {len(local_names)} local names")
|
|
308
310
|
|
|
309
311
|
self.create_tmp_dir()
|
|
310
312
|
|
|
@@ -312,35 +314,36 @@ class DefinitionsObfuscator:
|
|
|
312
314
|
tmp_file_path = self.create_tmp_file(tokens, mod_name)
|
|
313
315
|
|
|
314
316
|
# TODO (deoktr): find a way better way, do everything in memory
|
|
315
|
-
|
|
316
|
-
mod =
|
|
317
|
+
project = Project(self.tmp_dir)
|
|
318
|
+
mod = project.get_module(mod_name)
|
|
317
319
|
|
|
318
320
|
todo = len(local_names)
|
|
319
321
|
for done, name in enumerate(local_names):
|
|
320
322
|
new_name = self.generate_new_name()
|
|
321
|
-
|
|
322
|
-
logger.debug(msg)
|
|
323
|
+
logger.debug(f"{done + 1}/{todo} renaming {name} to {new_name}")
|
|
323
324
|
try:
|
|
324
325
|
old_name = mod.get_attribute(name)
|
|
325
|
-
|
|
326
326
|
pymod, lineno = old_name.get_definition_location()
|
|
327
|
-
#
|
|
328
|
-
|
|
327
|
+
# pymod.logical_lines.logical_line_in(lineno)
|
|
329
328
|
offset = pymod.resource.read().index(
|
|
330
329
|
old_name.pyobject.get_name(),
|
|
331
330
|
pymod.lines.get_line_start(lineno),
|
|
332
331
|
)
|
|
332
|
+
renamer = Rename(project, pymod.get_resource(), offset)
|
|
333
|
+
change = renamer.get_changes(new_name)
|
|
334
|
+
project.do(change)
|
|
335
|
+
except (
|
|
336
|
+
# can happen on class functions
|
|
337
|
+
rope.base.exceptions.AttributeNotFoundError,
|
|
338
|
+
# this can happen if the function is not called for example and
|
|
339
|
+
# for other very obscure reasons
|
|
340
|
+
ValueError,
|
|
341
|
+
):
|
|
342
|
+
logger.error(f"error trying to obfuscate var {name}")
|
|
343
|
+
except Exception as e: # noqa: BLE001
|
|
344
|
+
logger.exception(f"error trying to obfuscate var {name}: {e!s}")
|
|
333
345
|
|
|
334
|
-
|
|
335
|
-
new_name,
|
|
336
|
-
)
|
|
337
|
-
|
|
338
|
-
proj.do(changes)
|
|
339
|
-
except Exception: # noqa: BLE001
|
|
340
|
-
msg = f"error trying to obfuscate var {name}"
|
|
341
|
-
logger.error(msg)
|
|
342
|
-
# logger.exception(msg)
|
|
343
|
-
proj.close()
|
|
346
|
+
project.close()
|
|
344
347
|
|
|
345
348
|
# finish by reading the file one last time
|
|
346
349
|
with tmp_file_path.open() as f:
|
{python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/obfuscator/names.py
RENAMED
|
@@ -227,9 +227,11 @@ class NamesObfuscator:
|
|
|
227
227
|
"update", # on dict
|
|
228
228
|
"copy", # copy dict or list
|
|
229
229
|
"join", # on string "".join()
|
|
230
|
+
"decode", # on string "".decode()
|
|
231
|
+
"encode", # on string "".encode()
|
|
230
232
|
"__dict__",
|
|
231
|
-
"quine", # quine is used by pof to get the quine output
|
|
232
233
|
# TODO (deoktr): add all the others
|
|
234
|
+
"quine", # quine is used by pof to get the quine output
|
|
233
235
|
)
|
|
234
236
|
|
|
235
237
|
RESERVED = RESERVED_WORDS + BUILTINS + tuple(keyword.kwlist)
|
|
@@ -209,7 +209,11 @@ class NamesRopeObfuscator:
|
|
|
209
209
|
"update", # on dict
|
|
210
210
|
"copy", # copy dict or list
|
|
211
211
|
"join", # on string "".join()
|
|
212
|
+
"decode", # on string "".decode()
|
|
213
|
+
"encode", # on string "".encode()
|
|
214
|
+
"__dict__",
|
|
212
215
|
# TODO (deoktr): add all the others
|
|
216
|
+
"quine", # quine is used by pof to get the quine output
|
|
213
217
|
)
|
|
214
218
|
|
|
215
219
|
RESERVED = RESERVED_WORDS + BUILTINS + tuple(keyword.kwlist)
|
|
@@ -344,7 +348,7 @@ class NamesRopeObfuscator:
|
|
|
344
348
|
imports = self.get_imports(tokens)
|
|
345
349
|
local_names = self.get_local(tokens, imports)
|
|
346
350
|
|
|
347
|
-
msg = f"found {len(local_names)} local names"
|
|
351
|
+
msg = f"found {len(local_names)} local names to obfuscate"
|
|
348
352
|
logger.debug(msg)
|
|
349
353
|
|
|
350
354
|
self.create_tmp_dir()
|
|
@@ -359,7 +363,7 @@ class NamesRopeObfuscator:
|
|
|
359
363
|
todo = len(local_names)
|
|
360
364
|
for done, name in enumerate(local_names):
|
|
361
365
|
new_name = self.generate_new_name()
|
|
362
|
-
msg = f"{done + 1}/{todo}
|
|
366
|
+
msg = f"{done + 1}/{todo} renaming {name} to {new_name}"
|
|
363
367
|
logger.debug(msg)
|
|
364
368
|
try:
|
|
365
369
|
old_name = mod.get_attribute(name)
|
{python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.4}/pof/obfuscator/strings.py
RENAMED
|
@@ -49,11 +49,12 @@ class StringsObfuscator:
|
|
|
49
49
|
ADDITION = 2 # FIXME (deoktr): doesn't seems to work <
|
|
50
50
|
ONLY_ADDITION = 3
|
|
51
51
|
BASE85 = 4
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
52
|
+
HEX = 5
|
|
53
|
+
UNICODE = 6
|
|
54
|
+
SHIFT = 7
|
|
55
|
+
REPLACE = 8
|
|
56
|
+
REVERSE = 9
|
|
57
|
+
ONE_ON_N = 10
|
|
57
58
|
|
|
58
59
|
ALL = (
|
|
59
60
|
Strats.BASE64,
|
|
@@ -134,6 +135,18 @@ class StringsObfuscator:
|
|
|
134
135
|
(RPAR, ")"),
|
|
135
136
|
]
|
|
136
137
|
|
|
138
|
+
@staticmethod
|
|
139
|
+
def hex(tokval: str):
|
|
140
|
+
# Hello --> \x48\x65\x6c\x6c\x6f
|
|
141
|
+
raw_string = eval(tokval) # noqa: S307
|
|
142
|
+
if isinstance(raw_string, bytes):
|
|
143
|
+
raw_string = raw_string.decode()
|
|
144
|
+
encoded = ""
|
|
145
|
+
for c in raw_string:
|
|
146
|
+
hexcode = f"\\x{hex(ord(c))[2:]:0>2}" if not c.isdigit() else c # noqa: FURB116
|
|
147
|
+
encoded += hexcode
|
|
148
|
+
return [(STRING, f"'{encoded}'")]
|
|
149
|
+
|
|
137
150
|
@staticmethod
|
|
138
151
|
def unicode(tokval: str):
|
|
139
152
|
# Hell --> \u0048\u0065\u006C\u006C
|
|
@@ -327,6 +340,7 @@ class StringsObfuscator:
|
|
|
327
340
|
strategies = list(strategies)
|
|
328
341
|
strategies.extend(
|
|
329
342
|
[
|
|
343
|
+
self.Strats.HEX,
|
|
330
344
|
self.Strats.UNICODE,
|
|
331
345
|
self.Strats.SHIFT,
|
|
332
346
|
],
|
|
@@ -342,6 +356,8 @@ class StringsObfuscator:
|
|
|
342
356
|
tokens = self.only_additions(tokval)
|
|
343
357
|
elif strategy == self.Strats.BASE85:
|
|
344
358
|
tokens = self.obf_base85(tokval)
|
|
359
|
+
elif strategy == self.Strats.HEX:
|
|
360
|
+
tokens = self.hex(tokval)
|
|
345
361
|
elif strategy == self.Strats.UNICODE:
|
|
346
362
|
tokens = self.unicode(tokval)
|
|
347
363
|
elif strategy == self.Strats.SHIFT:
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
"""Unicode random names generators."""
|
|
18
18
|
|
|
19
|
+
import ast
|
|
19
20
|
import random
|
|
20
21
|
|
|
21
22
|
from .base import BaseGenerator
|
|
@@ -35,7 +36,7 @@ class UnicodeGenerator(BaseGenerator):
|
|
|
35
36
|
if name in previous or name in cls.RESERVED:
|
|
36
37
|
continue
|
|
37
38
|
try:
|
|
38
|
-
|
|
39
|
+
ast.parse(f"{name}=None")
|
|
39
40
|
|
|
40
41
|
# if we need to call `getattr` on the variable name, then normalize
|
|
41
42
|
# the variable name BEFORE adding it to the string, or uncomment the
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-obfuscation-framework
|
|
3
|
-
Version: 1.7.
|
|
3
|
+
Version: 1.7.4
|
|
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>
|
|
@@ -173,6 +173,46 @@ globals()["".join([chr(ord(i) - 3) for i in "bbvqlwolxebb"[::-1]])].__dict__[
|
|
|
173
173
|
|
|
174
174
|
More examples and usage can be found in `examples/` or in the section bellow.
|
|
175
175
|
|
|
176
|
+
## Effectiveness
|
|
177
|
+
|
|
178
|
+
The tests are done using the default configuration of pof, no sandbox evasion
|
|
179
|
+
technique was used with obfuscation. Also note that I haven't tested the
|
|
180
|
+
malware to see if they still work, they should, but they may break with
|
|
181
|
+
obfuscation.
|
|
182
|
+
|
|
183
|
+
Obfuscating a [Lazarus malware](https://bazaar.abuse.ch/sample/c3cb53c4a290bc9ab6c9eb825ed0ca38bb54bcc4a59f33be72becdff80cb091b/),
|
|
184
|
+
we go from
|
|
185
|
+
[18/63](https://www.virustotal.com/gui/file/c3cb53c4a290bc9ab6c9eb825ed0ca38bb54bcc4a59f33be72becdff80cb091b)
|
|
186
|
+
to
|
|
187
|
+
[0/63](https://www.virustotal.com/gui/file/2f427bc784e2a865d8f000c21f366cb8459842f97c56465cbe963f221b3e115a)
|
|
188
|
+
on virus total:
|
|
189
|
+

|
|
190
|
+
|
|
191
|
+
Obfuscating [BTC-Clipper](https://github.com/NightfallGT/BTC-Clipper), we go
|
|
192
|
+
from
|
|
193
|
+
[13/64](https://www.virustotal.com/gui/file/9817d8de9bf7d2740b5b66e30ec1afdd98d7d119074a61cbba05514d4ebdc149)
|
|
194
|
+
to
|
|
195
|
+
[0/63](https://www.virustotal.com/gui/file/71631daa26fe6c2cf77d282a16f8b3fd31e4794b63709b956599563b95e64816)
|
|
196
|
+
on virus total:
|
|
197
|
+

|
|
198
|
+
|
|
199
|
+
Obfuscating a
|
|
200
|
+
[Braodo malware](https://bazaar.abuse.ch/sample/b86e4bff935db9345cc1467e615ff4fbe292fae618ae927595d328cfd9e8a08f/),
|
|
201
|
+
we go from
|
|
202
|
+
[10/61](https://www.virustotal.com/gui/file/b86e4bff935db9345cc1467e615ff4fbe292fae618ae927595d328cfd9e8a08f)
|
|
203
|
+
to
|
|
204
|
+
[0/63](https://www.virustotal.com/gui/file/8791188aaf7655093307e46fa68e3705ee7249cb81e05ea416ae96ad2fd2f0f2)
|
|
205
|
+
on virus total:
|
|
206
|
+

|
|
207
|
+
|
|
208
|
+
Obfuscating [Python-File-Stealer](https://github.com/KrizzhSriskantharajah-UK/Python-File-Stealer),
|
|
209
|
+
we go from
|
|
210
|
+
[4/63](https://www.virustotal.com/gui/file/2fc798f1df42adae3af2f7d2623edc74f6b8f08a7ae16ef3b67305c4ad668c82)
|
|
211
|
+
to
|
|
212
|
+
[0/63](https://www.virustotal.com/gui/file/8d529e6ee2806986ca376a427d683fdf6980d6332134e4759d790d604d6b5dcb)
|
|
213
|
+
on virus total:
|
|
214
|
+

|
|
215
|
+
|
|
176
216
|
## Install
|
|
177
217
|
|
|
178
218
|
There are multiple installation options, with PIP, a virtualenv, a container, or with Nix.
|
|
@@ -298,7 +338,7 @@ echo "print('Hello, world')" | pof -f obfuscator -k UUIDObfuscator | python
|
|
|
298
338
|
|
|
299
339
|
### Obfuscator
|
|
300
340
|
|
|
301
|
-
`NamesObfuscator` the most basic obfuscator is
|
|
341
|
+
`NamesObfuscator` the most basic obfuscator is renaming variables, classes, functions, and imports.
|
|
302
342
|
|
|
303
343
|
Source in `examples/source.py`.
|
|
304
344
|
|
|
@@ -352,6 +392,9 @@ print('Helnelemd'.replace('nelem','lo, worl'))
|
|
|
352
392
|
# One on n
|
|
353
393
|
print("".join([d if g%3==0 else""for g,d in enumerate('H9IesYlvJl5loU4,dK nDw51ovsrozl0UdoI!jL')]))
|
|
354
394
|
|
|
395
|
+
# Hex-encoded
|
|
396
|
+
print('\x48\x65\x6c\x6c\x6f\x2c\x20\x77\x6f\x72\x6c\x64')
|
|
397
|
+
|
|
355
398
|
# Unicode
|
|
356
399
|
print('\u0048\u0065\u006c\u006c\u006f\u002c\u0020\u0077\u006f\u0072\u006c\u0064')
|
|
357
400
|
|
|
@@ -163,11 +163,19 @@ tests/obfuscator/test_b32.py
|
|
|
163
163
|
tests/obfuscator/test_b32hex.py
|
|
164
164
|
tests/obfuscator/test_b64.py
|
|
165
165
|
tests/obfuscator/test_b85.py
|
|
166
|
+
tests/obfuscator/test_binascii.py
|
|
167
|
+
tests/obfuscator/test_call.py
|
|
166
168
|
tests/obfuscator/test_comments.py
|
|
169
|
+
tests/obfuscator/test_doc.py
|
|
167
170
|
tests/obfuscator/test_docstrings.py
|
|
168
171
|
tests/obfuscator/test_exceptions.py
|
|
172
|
+
tests/obfuscator/test_ipv6encoding.py
|
|
173
|
+
tests/obfuscator/test_number.py
|
|
169
174
|
tests/obfuscator/test_print.py
|
|
175
|
+
tests/obfuscator/test_snt.py
|
|
176
|
+
tests/obfuscator/test_tokens.py
|
|
170
177
|
tests/obfuscator/test_xor.py
|
|
178
|
+
tests/obfuscator/utils.py
|
|
171
179
|
tests/obfuscator/test_names/test_names.py
|
|
172
180
|
tests/obfuscator/test_names/code/out.py
|
|
173
181
|
tests/obfuscator/test_names/code/source.py
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# POF, a free and open source Python obfuscation framework.
|
|
2
|
+
# Copyright (C) 2022 - 2025 POF Team
|
|
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 io
|
|
18
|
+
from tokenize import generate_tokens, untokenize
|
|
19
|
+
|
|
20
|
+
from pof.obfuscator import NumberObfuscator
|
|
21
|
+
from .utils import exec_capture
|
|
22
|
+
|
|
23
|
+
source = """
|
|
24
|
+
def main_function():
|
|
25
|
+
a = [1, 2, 3, 4]
|
|
26
|
+
b = a[0] + a[1]
|
|
27
|
+
c = a[2] + a[3]
|
|
28
|
+
print(b + c)
|
|
29
|
+
|
|
30
|
+
main_function()
|
|
31
|
+
"""
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def test_NumberObfuscator():
|
|
35
|
+
io_obj = io.StringIO(source)
|
|
36
|
+
tokens = list(generate_tokens(io_obj.readline))
|
|
37
|
+
tokens = NumberObfuscator().obfuscate_tokens(tokens)
|
|
38
|
+
|
|
39
|
+
out = untokenize(tokens)
|
|
40
|
+
captured_output = exec_capture(out)
|
|
41
|
+
assert captured_output == "10\n"
|
|
@@ -18,6 +18,7 @@ import io
|
|
|
18
18
|
from tokenize import generate_tokens, untokenize
|
|
19
19
|
|
|
20
20
|
from pof.obfuscator import Base16Obfuscator
|
|
21
|
+
from .utils import exec_capture
|
|
21
22
|
|
|
22
23
|
source = """
|
|
23
24
|
def main_function():
|
|
@@ -35,4 +36,5 @@ def test_Base16Obfuscator():
|
|
|
35
36
|
tokens = Base16Obfuscator().obfuscate_tokens(tokens)
|
|
36
37
|
|
|
37
38
|
out = untokenize(tokens)
|
|
38
|
-
|
|
39
|
+
captured_output = exec_capture(out)
|
|
40
|
+
assert captured_output == "Hello, world!\n"
|
|
@@ -18,6 +18,7 @@ import io
|
|
|
18
18
|
from tokenize import generate_tokens, untokenize
|
|
19
19
|
|
|
20
20
|
from pof.obfuscator import Base32Obfuscator
|
|
21
|
+
from .utils import exec_capture
|
|
21
22
|
|
|
22
23
|
source = """
|
|
23
24
|
def main_function():
|
|
@@ -35,4 +36,5 @@ def test_Base32Obfuscator():
|
|
|
35
36
|
tokens = Base32Obfuscator().obfuscate_tokens(tokens)
|
|
36
37
|
|
|
37
38
|
out = untokenize(tokens)
|
|
38
|
-
|
|
39
|
+
captured_output = exec_capture(out)
|
|
40
|
+
assert captured_output == "Hello, world!\n"
|
|
@@ -18,6 +18,7 @@ import io
|
|
|
18
18
|
from tokenize import generate_tokens, untokenize
|
|
19
19
|
|
|
20
20
|
from pof.obfuscator import Base32HexObfuscator
|
|
21
|
+
from .utils import exec_capture
|
|
21
22
|
|
|
22
23
|
source = """
|
|
23
24
|
def main_function():
|
|
@@ -35,4 +36,5 @@ def test_Base32HexObfuscator():
|
|
|
35
36
|
tokens = Base32HexObfuscator().obfuscate_tokens(tokens)
|
|
36
37
|
|
|
37
38
|
out = untokenize(tokens)
|
|
38
|
-
|
|
39
|
+
captured_output = exec_capture(out)
|
|
40
|
+
assert captured_output == "Hello, world!\n"
|
|
@@ -18,6 +18,7 @@ import io
|
|
|
18
18
|
from tokenize import generate_tokens, untokenize
|
|
19
19
|
|
|
20
20
|
from pof.obfuscator import Base64Obfuscator
|
|
21
|
+
from .utils import exec_capture
|
|
21
22
|
|
|
22
23
|
source = """
|
|
23
24
|
def main_function():
|
|
@@ -35,4 +36,5 @@ def test_Base64Obfuscator():
|
|
|
35
36
|
tokens = Base64Obfuscator().obfuscate_tokens(tokens)
|
|
36
37
|
|
|
37
38
|
out = untokenize(tokens)
|
|
38
|
-
|
|
39
|
+
captured_output = exec_capture(out)
|
|
40
|
+
assert captured_output == "Hello, world!\n"
|
|
@@ -18,6 +18,7 @@ import io
|
|
|
18
18
|
from tokenize import generate_tokens, untokenize
|
|
19
19
|
|
|
20
20
|
from pof.obfuscator import Base85Obfuscator
|
|
21
|
+
from .utils import exec_capture
|
|
21
22
|
|
|
22
23
|
source = """
|
|
23
24
|
def main_function():
|
|
@@ -35,4 +36,5 @@ def test_Base85Obfuscator():
|
|
|
35
36
|
tokens = Base85Obfuscator().obfuscate_tokens(tokens)
|
|
36
37
|
|
|
37
38
|
out = untokenize(tokens)
|
|
38
|
-
|
|
39
|
+
captured_output = exec_capture(out)
|
|
40
|
+
assert captured_output == "Hello, world!\n"
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# POF, a free and open source Python obfuscation framework.
|
|
2
|
+
# Copyright (C) 2022 - 2025 POF Team
|
|
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 io
|
|
18
|
+
from tokenize import generate_tokens, untokenize
|
|
19
|
+
|
|
20
|
+
from pof.obfuscator import BinasciiObfuscator
|
|
21
|
+
from .utils import exec_capture
|
|
22
|
+
|
|
23
|
+
source = """
|
|
24
|
+
def main_function():
|
|
25
|
+
x = "Hello"
|
|
26
|
+
y = ", world!"
|
|
27
|
+
print(x + y)
|
|
28
|
+
|
|
29
|
+
main_function()
|
|
30
|
+
"""
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def test_BinasciiObfuscator():
|
|
34
|
+
io_obj = io.StringIO(source)
|
|
35
|
+
tokens = list(generate_tokens(io_obj.readline))
|
|
36
|
+
tokens = BinasciiObfuscator().obfuscate_tokens(tokens)
|
|
37
|
+
|
|
38
|
+
out = untokenize(tokens)
|
|
39
|
+
captured_output = exec_capture(out)
|
|
40
|
+
assert captured_output == "Hello, world!\n"
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# POF, a free and open source Python obfuscation framework.
|
|
2
|
+
# Copyright (C) 2022 - 2025 POF Team
|
|
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 io
|
|
18
|
+
from tokenize import generate_tokens, untokenize
|
|
19
|
+
|
|
20
|
+
from pof.obfuscator import CallObfuscator
|
|
21
|
+
from .utils import exec_capture
|
|
22
|
+
|
|
23
|
+
source = """
|
|
24
|
+
def main_function():
|
|
25
|
+
x = "Hello"
|
|
26
|
+
y = ", world!"
|
|
27
|
+
print(x + y)
|
|
28
|
+
|
|
29
|
+
main_function()
|
|
30
|
+
"""
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def test_CallObfuscator():
|
|
34
|
+
io_obj = io.StringIO(source)
|
|
35
|
+
tokens = list(generate_tokens(io_obj.readline))
|
|
36
|
+
tokens = CallObfuscator().obfuscate_tokens(tokens)
|
|
37
|
+
|
|
38
|
+
out = untokenize(tokens)
|
|
39
|
+
captured_output = exec_capture(out)
|
|
40
|
+
assert captured_output == "Hello, world!\n"
|