python-obfuscation-framework 1.7.2__tar.gz → 1.7.3__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.3}/PKG-INFO +2 -2
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/README.md +1 -1
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/obfuscator/definitions.py +23 -20
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/obfuscator/names.py +3 -1
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/obfuscator/names_rope.py +6 -2
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/utils/generator/unicode.py +2 -1
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pyproject.toml +1 -1
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3/python_obfuscation_framework.egg-info}/PKG-INFO +2 -2
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/python_obfuscation_framework.egg-info/SOURCES.txt +8 -0
- python_obfuscation_framework-1.7.3/tests/obfuscator/test_a85.py +41 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/tests/obfuscator/test_b16.py +3 -1
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/tests/obfuscator/test_b32.py +3 -1
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/tests/obfuscator/test_b32hex.py +3 -1
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/tests/obfuscator/test_b64.py +3 -1
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/tests/obfuscator/test_b85.py +3 -1
- python_obfuscation_framework-1.7.3/tests/obfuscator/test_binascii.py +40 -0
- python_obfuscation_framework-1.7.3/tests/obfuscator/test_call.py +40 -0
- python_obfuscation_framework-1.7.3/tests/obfuscator/test_doc.py +40 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/tests/obfuscator/test_docstrings.py +3 -1
- python_obfuscation_framework-1.7.3/tests/obfuscator/test_ipv6encoding.py +41 -0
- python_obfuscation_framework-1.7.2/tests/obfuscator/test_a85.py → python_obfuscation_framework-1.7.3/tests/obfuscator/test_number.py +3 -1
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/tests/obfuscator/test_print.py +1 -0
- python_obfuscation_framework-1.7.3/tests/obfuscator/test_snt.py +40 -0
- python_obfuscation_framework-1.7.3/tests/obfuscator/test_tokens.py +40 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/tests/obfuscator/test_xor.py +5 -2
- python_obfuscation_framework-1.7.3/tests/obfuscator/utils.py +11 -0
- python_obfuscation_framework-1.7.3/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.3}/LICENSE +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/MANIFEST.in +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/__init__.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/__main__.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/cli.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/cli_v2.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/errors.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/evasion/__init__.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/evasion/argv.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/evasion/base.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/evasion/cpu/__init__.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/evasion/cpu/cpu_count.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/evasion/fs/__init__.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/evasion/fs/directory_exist.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/evasion/fs/directory_list_exist.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/evasion/fs/directory_list_missing.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/evasion/fs/directory_missing.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/evasion/fs/exec_method.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/evasion/fs/executable_path.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/evasion/fs/file_exist.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/evasion/fs/file_list_exist.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/evasion/fs/file_list_missing.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/evasion/fs/file_missing.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/evasion/fs/tmp.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/evasion/hardware/__init__.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/evasion/hardware/ram_count.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/evasion/hooks/__init__.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/evasion/hooks/debugger.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/evasion/hooks/tracemalloc.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/evasion/human/__init__.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/evasion/human/p.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/evasion/human/prompt.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/evasion/integrity.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/evasion/multi.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/evasion/os/__init__.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/evasion/os/domain.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/evasion/os/hostname.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/evasion/os/uid.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/evasion/os/username.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/evasion/processes/__init__.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/evasion/processes/proc_count.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/evasion/time/__init__.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/evasion/time/expire.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/evasion/time/uptime.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/evasion/time/utc.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/evasion/utils.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/logger.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/main.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/obfuscator/__init__.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/obfuscator/builtins.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/obfuscator/cipher/__init__.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/obfuscator/cipher/deep_encryption.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/obfuscator/cipher/rc4.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/obfuscator/cipher/shift.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/obfuscator/cipher/xor.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/obfuscator/compression/__init__.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/obfuscator/compression/bz2.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/obfuscator/compression/gzip.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/obfuscator/compression/lzma.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/obfuscator/compression/zlib.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/obfuscator/constants.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/obfuscator/encoding/__init__.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/obfuscator/encoding/a85.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/obfuscator/encoding/b16.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/obfuscator/encoding/b32.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/obfuscator/encoding/b32hex.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/obfuscator/encoding/b64.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/obfuscator/encoding/b85.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/obfuscator/encoding/binascii.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/obfuscator/encoding/snt.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/obfuscator/esoteric/__init__.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/obfuscator/esoteric/call.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/obfuscator/esoteric/doc.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/obfuscator/esoteric/globals.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/obfuscator/esoteric/imports.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/obfuscator/extract_variables.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/obfuscator/junk/__init__.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/obfuscator/junk/add_comments.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/obfuscator/junk/add_newlines.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/obfuscator/numbers.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/obfuscator/other/__init__.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/obfuscator/other/tokens.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/obfuscator/remove/__init__.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/obfuscator/remove/comments.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/obfuscator/remove/exceptions.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/obfuscator/remove/indents.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/obfuscator/remove/loggings.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/obfuscator/remove/loggings_old.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/obfuscator/remove/newline.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/obfuscator/remove/print.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/obfuscator/restructure.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/obfuscator/stegano/__init__.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/obfuscator/stegano/docstrings.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/obfuscator/stegano/ipv6encoding.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/obfuscator/stegano/macencoding.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/obfuscator/stegano/uuidencoding.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/obfuscator/strings.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/stager/__init__.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/stager/cipher/__init__.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/stager/cipher/rc4.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/stager/download.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/stager/image.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/stager/lots/__init__.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/stager/lots/cl1pnet.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/stager/lots/pastebin.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/stager/lots/pasters.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/stager/quine.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/utils/__init__.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/utils/cipher/__init__.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/utils/cipher/rc4.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/utils/cipher/shift.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/utils/compression/__init__.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/utils/compression/bz2.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/utils/compression/gzip.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/utils/compression/lzma.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/utils/compression/zlib.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/utils/encoding/__init__.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/utils/encoding/a85.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/utils/encoding/b16.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/utils/encoding/b3.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/utils/encoding/b32.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/utils/encoding/b32hex.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/utils/encoding/b64.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/utils/encoding/b85.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/utils/encoding/binascii.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/utils/encoding/snt.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/utils/entropy.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/utils/extract_names.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/utils/format.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/utils/generator/__init__.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/utils/generator/advanced.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/utils/generator/base.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/utils/generator/basic.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/utils/generator/comments.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/utils/generator/comments.txt +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/utils/generator/names.txt +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/utils/se/__init__.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/utils/se/homoglyphs.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/utils/se/homoglyphs.txt +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/utils/stegano/__init__.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/utils/stegano/ipv6encoding.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/utils/stegano/macencoding.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/utils/stegano/uuidencoding.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/pof/utils/tokens.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/python_obfuscation_framework.egg-info/dependency_links.txt +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/python_obfuscation_framework.egg-info/entry_points.txt +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/python_obfuscation_framework.egg-info/requires.txt +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/python_obfuscation_framework.egg-info/top_level.txt +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/setup.cfg +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/tests/__init__.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/tests/obfuscator/__init__.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/tests/obfuscator/test_comments.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/tests/obfuscator/test_exceptions.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/tests/obfuscator/test_names/code/out.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/tests/obfuscator/test_names/code/source.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/tests/obfuscator/test_names/test_names.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/tests/pyproject.toml +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/tests/utils/__init__.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/tests/utils/se/__init__.py +0 -0
- {python_obfuscation_framework-1.7.2 → python_obfuscation_framework-1.7.3}/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.3
|
|
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>
|
|
@@ -298,7 +298,7 @@ echo "print('Hello, world')" | pof -f obfuscator -k UUIDObfuscator | python
|
|
|
298
298
|
|
|
299
299
|
### Obfuscator
|
|
300
300
|
|
|
301
|
-
`NamesObfuscator` the most basic obfuscator is
|
|
301
|
+
`NamesObfuscator` the most basic obfuscator is renaming variables, classes, functions, and imports.
|
|
302
302
|
|
|
303
303
|
Source in `examples/source.py`.
|
|
304
304
|
|
|
@@ -253,7 +253,7 @@ echo "print('Hello, world')" | pof -f obfuscator -k UUIDObfuscator | python
|
|
|
253
253
|
|
|
254
254
|
### Obfuscator
|
|
255
255
|
|
|
256
|
-
`NamesObfuscator` the most basic obfuscator is
|
|
256
|
+
`NamesObfuscator` the most basic obfuscator is renaming variables, classes, functions, and imports.
|
|
257
257
|
|
|
258
258
|
Source in `examples/source.py`.
|
|
259
259
|
|
|
@@ -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.3}/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)
|
|
@@ -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.3
|
|
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>
|
|
@@ -298,7 +298,7 @@ echo "print('Hello, world')" | pof -f obfuscator -k UUIDObfuscator | python
|
|
|
298
298
|
|
|
299
299
|
### Obfuscator
|
|
300
300
|
|
|
301
|
-
`NamesObfuscator` the most basic obfuscator is
|
|
301
|
+
`NamesObfuscator` the most basic obfuscator is renaming variables, classes, functions, and imports.
|
|
302
302
|
|
|
303
303
|
Source in `examples/source.py`.
|
|
304
304
|
|
|
@@ -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"
|
|
@@ -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 CharFromDocObfuscator
|
|
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_CharFromDocObfuscator():
|
|
34
|
+
io_obj = io.StringIO(source)
|
|
35
|
+
tokens = list(generate_tokens(io_obj.readline))
|
|
36
|
+
tokens = CharFromDocObfuscator().obfuscate_tokens(tokens)
|
|
37
|
+
|
|
38
|
+
out = untokenize(tokens)
|
|
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 DocstringObfuscator
|
|
21
|
+
from .utils import exec_capture
|
|
21
22
|
|
|
22
23
|
source = """
|
|
23
24
|
def main_function():
|
|
@@ -35,4 +36,5 @@ def test_DocstringObfuscator():
|
|
|
35
36
|
tokens = DocstringObfuscator().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,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 IPv6Obfuscator
|
|
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_IPv6Obfuscator():
|
|
34
|
+
io_obj = io.StringIO(source)
|
|
35
|
+
tokens = list(generate_tokens(io_obj.readline))
|
|
36
|
+
tokens = IPv6Obfuscator().obfuscate_tokens(tokens)
|
|
37
|
+
|
|
38
|
+
# FIXME: test fails
|
|
39
|
+
# out = untokenize(tokens)
|
|
40
|
+
# captured_output = exec_capture(out)
|
|
41
|
+
# 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 ASCII85Obfuscator
|
|
21
|
+
from .utils import exec_capture
|
|
21
22
|
|
|
22
23
|
source = """
|
|
23
24
|
def main_function():
|
|
@@ -35,4 +36,5 @@ def test_ASCII85Obfuscator():
|
|
|
35
36
|
tokens = ASCII85Obfuscator().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 SpacenTabObfuscator
|
|
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_SpacenTabObfuscator():
|
|
34
|
+
io_obj = io.StringIO(source)
|
|
35
|
+
tokens = list(generate_tokens(io_obj.readline))
|
|
36
|
+
tokens = SpacenTabObfuscator().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 TokensObfuscator
|
|
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_TokensObfuscator():
|
|
34
|
+
io_obj = io.StringIO(source)
|
|
35
|
+
tokens = list(generate_tokens(io_obj.readline))
|
|
36
|
+
tokens = TokensObfuscator().obfuscate_tokens(tokens)
|
|
37
|
+
|
|
38
|
+
out = untokenize(tokens)
|
|
39
|
+
captured_output = exec_capture(out)
|
|
40
|
+
assert captured_output == "Hello, world!\n"
|
|
@@ -15,12 +15,14 @@
|
|
|
15
15
|
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
16
16
|
|
|
17
17
|
import io
|
|
18
|
-
from base64 import b64decode # noqa
|
|
19
18
|
|
|
20
19
|
# to fix a problem "undefined b64decode" during exec
|
|
20
|
+
from base64 import b64decode # noqa
|
|
21
|
+
|
|
21
22
|
from tokenize import generate_tokens, untokenize
|
|
22
23
|
|
|
23
24
|
from pof.obfuscator import XORObfuscator
|
|
25
|
+
from .utils import exec_capture
|
|
24
26
|
|
|
25
27
|
source = """
|
|
26
28
|
def main_function():
|
|
@@ -38,4 +40,5 @@ def test_XORObfuscator():
|
|
|
38
40
|
tokens = XORObfuscator().obfuscate_tokens(tokens)
|
|
39
41
|
|
|
40
42
|
out = untokenize(tokens)
|
|
41
|
-
|
|
43
|
+
captured_output = exec_capture(out, {"b64decode": b64decode})
|
|
44
|
+
assert captured_output == "Hello, world!\n"
|