python-obfuscation-framework 1.9.4__tar.gz → 1.11.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {python_obfuscation_framework-1.9.4/python_obfuscation_framework.egg-info → python_obfuscation_framework-1.11.0}/PKG-INFO +67 -33
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/README.md +66 -32
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/cli_v2.py +0 -6
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/main.py +6 -59
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/obfuscator/__init__.py +0 -6
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/obfuscator/esoteric/doc.py +6 -6
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/obfuscator/esoteric/globals.py +2 -2
- python_obfuscation_framework-1.11.0/pof/obfuscator/esoteric/imports.py +257 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/obfuscator/junk/dead_code.py +37 -11
- python_obfuscation_framework-1.11.0/pof/obfuscator/names.py +417 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/utils/stegano/ipv6encoding.py +9 -5
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/utils/stegano/macencoding.py +9 -5
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/utils/stegano/uuidencoding.py +15 -5
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pyproject.toml +1 -1
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0/python_obfuscation_framework.egg-info}/PKG-INFO +67 -33
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/python_obfuscation_framework.egg-info/SOURCES.txt +7 -4
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/tests/obfuscator/conftest.py +33 -86
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/tests/obfuscator/fixtures/complex.py +0 -21
- python_obfuscation_framework-1.11.0/tests/obfuscator/fixtures/decorators.py +54 -0
- python_obfuscation_framework-1.11.0/tests/obfuscator/fixtures/getattr.py +27 -0
- python_obfuscation_framework-1.11.0/tests/obfuscator/fixtures/import.py +21 -0
- python_obfuscation_framework-1.11.0/tests/obfuscator/fixtures/lambda.py +4 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/tests/obfuscator/fixtures/moderate.py +0 -27
- python_obfuscation_framework-1.11.0/tests/obfuscator/fixtures/numbers.py +12 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/tests/obfuscator/fixtures/simple.py +0 -4
- python_obfuscation_framework-1.9.4/tests/obfuscator/fixtures/multiline_strings.py → python_obfuscation_framework-1.11.0/tests/obfuscator/fixtures/strings.py +6 -1
- python_obfuscation_framework-1.11.0/tests/obfuscator/fixtures/try.py +6 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/tests/obfuscator/test_edge_cases.py +0 -6
- python_obfuscation_framework-1.9.4/pof/obfuscator/definitions.py +0 -356
- python_obfuscation_framework-1.9.4/pof/obfuscator/esoteric/imports.py +0 -71
- python_obfuscation_framework-1.9.4/pof/obfuscator/names.py +0 -490
- python_obfuscation_framework-1.9.4/pof/obfuscator/names_rope.py +0 -397
- python_obfuscation_framework-1.9.4/pof/obfuscator/variables.py +0 -116
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/LICENSE +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/MANIFEST.in +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/__init__.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/__main__.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/cli.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/errors.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/evasion/__init__.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/evasion/argv.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/evasion/base.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/evasion/cpu/__init__.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/evasion/cpu/cpu_count.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/evasion/fs/__init__.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/evasion/fs/directory_exist.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/evasion/fs/directory_list_exist.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/evasion/fs/directory_list_missing.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/evasion/fs/directory_missing.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/evasion/fs/exec_method.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/evasion/fs/executable_path.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/evasion/fs/file_exist.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/evasion/fs/file_list_exist.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/evasion/fs/file_list_missing.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/evasion/fs/file_missing.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/evasion/fs/tmp.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/evasion/hardware/__init__.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/evasion/hardware/ram_count.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/evasion/hooks/__init__.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/evasion/hooks/debugger.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/evasion/hooks/tracemalloc.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/evasion/human/__init__.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/evasion/human/p.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/evasion/human/prompt.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/evasion/integrity.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/evasion/multi.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/evasion/os/__init__.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/evasion/os/domain.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/evasion/os/hostname.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/evasion/os/uid.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/evasion/os/username.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/evasion/processes/__init__.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/evasion/processes/proc_count.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/evasion/time/__init__.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/evasion/time/expire.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/evasion/time/uptime.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/evasion/time/utc.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/evasion/utils.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/logger.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/obfuscator/boolean.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/obfuscator/builtins.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/obfuscator/cipher/__init__.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/obfuscator/cipher/deep_encryption.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/obfuscator/cipher/rc4.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/obfuscator/cipher/shift.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/obfuscator/cipher/xor.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/obfuscator/compression/__init__.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/obfuscator/compression/bz2.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/obfuscator/compression/gzip.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/obfuscator/compression/lzma.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/obfuscator/compression/zlib.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/obfuscator/constants.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/obfuscator/controlflow/__init__.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/obfuscator/controlflow/control_flow_flatten.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/obfuscator/encoding/__init__.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/obfuscator/encoding/a85.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/obfuscator/encoding/b16.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/obfuscator/encoding/b32.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/obfuscator/encoding/b32hex.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/obfuscator/encoding/b64.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/obfuscator/encoding/b85.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/obfuscator/encoding/binascii.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/obfuscator/encoding/snt.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/obfuscator/encoding/whitespace.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/obfuscator/esoteric/__init__.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/obfuscator/esoteric/call.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/obfuscator/extract_variables.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/obfuscator/junk/__init__.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/obfuscator/junk/add_comments.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/obfuscator/junk/add_newlines.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/obfuscator/numbers.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/obfuscator/other/__init__.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/obfuscator/other/tokens.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/obfuscator/remove/__init__.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/obfuscator/remove/comments.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/obfuscator/remove/exceptions.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/obfuscator/remove/indents.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/obfuscator/remove/loggings.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/obfuscator/remove/loggings_old.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/obfuscator/remove/newline.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/obfuscator/remove/print.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/obfuscator/restructure.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/obfuscator/stegano/__init__.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/obfuscator/stegano/docstrings.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/obfuscator/stegano/ipv6encoding.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/obfuscator/stegano/macencoding.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/obfuscator/stegano/uuidencoding.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/obfuscator/strings.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/stager/__init__.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/stager/cipher/__init__.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/stager/cipher/rc4.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/stager/download.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/stager/image.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/stager/lots/__init__.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/stager/lots/cl1pnet.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/stager/lots/pastebin.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/stager/lots/pasters.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/stager/quine.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/utils/__init__.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/utils/cipher/__init__.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/utils/cipher/rc4.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/utils/cipher/shift.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/utils/compression/__init__.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/utils/compression/bz2.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/utils/compression/gzip.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/utils/compression/lzma.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/utils/compression/zlib.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/utils/encoding/__init__.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/utils/encoding/a85.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/utils/encoding/b16.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/utils/encoding/b3.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/utils/encoding/b32.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/utils/encoding/b32hex.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/utils/encoding/b64.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/utils/encoding/b85.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/utils/encoding/binascii.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/utils/encoding/snt.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/utils/encoding/whitespace.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/utils/entropy.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/utils/extract_names.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/utils/format.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/utils/generator/__init__.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/utils/generator/advanced.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/utils/generator/base.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/utils/generator/basic.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/utils/generator/comments.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/utils/generator/comments.txt +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/utils/generator/names.txt +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/utils/generator/unicode.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/utils/se/__init__.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/utils/se/homoglyphs.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/utils/se/homoglyphs.txt +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/utils/stegano/__init__.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/pof/utils/tokens.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/python_obfuscation_framework.egg-info/dependency_links.txt +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/python_obfuscation_framework.egg-info/entry_points.txt +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/python_obfuscation_framework.egg-info/requires.txt +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/python_obfuscation_framework.egg-info/top_level.txt +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/setup.cfg +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/tests/__init__.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/tests/obfuscator/__init__.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/tests/obfuscator/fixtures/__init__.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/tests/obfuscator/test_integration.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/tests/obfuscator/utils.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/tests/pyproject.toml +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/tests/utils/__init__.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/tests/utils/se/__init__.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/tests/utils/se/test_homoglyphs.py +0 -0
- {python_obfuscation_framework-1.9.4 → python_obfuscation_framework-1.11.0}/tests/utils/test_generator.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-obfuscation-framework
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.11.0
|
|
4
4
|
Summary: Python Obfuscation Framework
|
|
5
5
|
Author-email: deoktr <35725720+deoktr@users.noreply.github.com>
|
|
6
6
|
Maintainer-email: deoktr <35725720+deoktr@users.noreply.github.com>
|
|
@@ -320,53 +320,44 @@ echo "print('Hello, world')" | pof -f obfuscator -k UUIDObfuscator | python
|
|
|
320
320
|
|
|
321
321
|
### Obfuscator
|
|
322
322
|
|
|
323
|
-
`
|
|
323
|
+
`NamesObfuscator` obfuscator is renaming variables, classes, and functions.
|
|
324
324
|
|
|
325
325
|
Source in `examples/source.py`.
|
|
326
326
|
|
|
327
327
|
```python
|
|
328
328
|
import os
|
|
329
329
|
|
|
330
|
-
def
|
|
330
|
+
def BJM4FaQJf1():
|
|
331
331
|
"""Get Linux release info from /etc/os-release."""
|
|
332
|
-
|
|
333
|
-
if not os.path.exists(
|
|
332
|
+
h77 = '/etc/os-release'
|
|
333
|
+
if not os.path.exists(h77):
|
|
334
334
|
print('OS release file not found. This might not be a Linux system.')
|
|
335
335
|
return None
|
|
336
|
-
|
|
336
|
+
jkFr = {}
|
|
337
337
|
try:
|
|
338
|
-
with open(
|
|
339
|
-
for
|
|
340
|
-
if not
|
|
338
|
+
with open(h77, 'r') as LfQ:
|
|
339
|
+
for GIVt40c7RR in LfQ:
|
|
340
|
+
if not GIVt40c7RR or '=' not in GIVt40c7RR:
|
|
341
341
|
continue
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
342
|
+
KPO5j, RQvTXmL = GIVt40c7RR.strip().split('=', 1)
|
|
343
|
+
RQvTXmL = RQvTXmL.strip('"\'\n')
|
|
344
|
+
jkFr[KPO5j] = RQvTXmL
|
|
345
345
|
print('\nLinux Release Information:')
|
|
346
|
-
print(f"Distribution: {
|
|
347
|
-
print(f"Version: {
|
|
348
|
-
print(f"Version ID: {
|
|
349
|
-
print(f"Pretty Name: {
|
|
350
|
-
return
|
|
351
|
-
except Exception as
|
|
352
|
-
print(f'Error reading release file: {
|
|
346
|
+
print(f"Distribution: {jkFr.get('NAME', 'Unknown')}")
|
|
347
|
+
print(f"Version: {jkFr.get('VERSION', 'Unknown')}")
|
|
348
|
+
print(f"Version ID: {jkFr.get('VERSION_ID', 'Unknown')}")
|
|
349
|
+
print(f"Pretty Name: {jkFr.get('PRETTY_NAME', 'Unknown')}")
|
|
350
|
+
return jkFr
|
|
351
|
+
except Exception as LzYLqi_:
|
|
352
|
+
print(f'Error reading release file: {LzYLqi_}')
|
|
353
353
|
return None
|
|
354
354
|
if __name__ == '__main__':
|
|
355
355
|
if os.name == 'posix' and os.path.exists('/etc/os-release'):
|
|
356
|
-
|
|
356
|
+
yv4HAqmn = BJM4FaQJf1()
|
|
357
357
|
else:
|
|
358
358
|
print('This script is designed for Linux systems.')
|
|
359
359
|
```
|
|
360
360
|
|
|
361
|
-
`DefinitionsObfuscator` obfuscate function names.
|
|
362
|
-
|
|
363
|
-
> [!WARNING]
|
|
364
|
-
> `NamesObfuscator` obfuscator is renaming variables, classes, functions, and
|
|
365
|
-
> imports. Right now this obfuscator can fail under very specific circumstances,
|
|
366
|
-
> see `pof/obfuscator/names.py`. There is an alternative implementation at
|
|
367
|
-
> `NamesRopeObfuscator` that uses `rope`, it's a work in progress and currently
|
|
368
|
-
> does not obfuscate variables declared inside functions.
|
|
369
|
-
|
|
370
361
|
Other very basic obfuscation functions are done by specific obfuscators like:
|
|
371
362
|
|
|
372
363
|
- Removing comments with `CommentsObfuscator`.
|
|
@@ -804,20 +795,50 @@ exec(binascii.a2b_hex("".join(['7072696e-7428-2748-656c-6c6f2c20776f','726c6427-
|
|
|
804
795
|
|
|
805
796
|
#### ImportsObfuscator
|
|
806
797
|
|
|
807
|
-
|
|
798
|
+
Remove keyword `import`.
|
|
808
799
|
|
|
809
800
|
```python
|
|
810
|
-
|
|
801
|
+
# import X
|
|
802
|
+
X = __import__("X")
|
|
803
|
+
|
|
804
|
+
# import X as Y
|
|
805
|
+
Y = __import__("X")
|
|
806
|
+
|
|
807
|
+
# import X, Y
|
|
808
|
+
X = __import__("X")
|
|
809
|
+
Y = __import__("Y")
|
|
810
|
+
|
|
811
|
+
# import X.Y
|
|
812
|
+
X = __import__("X.Y")
|
|
813
|
+
|
|
814
|
+
# from X import Y
|
|
815
|
+
Y = __import__("X", fromlist=["Y"]).Y
|
|
816
|
+
|
|
817
|
+
# from X import Y as Z
|
|
818
|
+
Z = __import__("X", fromlist=["Y"]).Y
|
|
819
|
+
|
|
820
|
+
# from X import Y, Z
|
|
821
|
+
Y = __import__("X", fromlist=["Y"]).Y
|
|
822
|
+
Z = __import__("X", fromlist=["Z"]).Z
|
|
811
823
|
```
|
|
812
824
|
|
|
825
|
+
> [!NOTE]
|
|
826
|
+
> Does not support wildcard imports `*`, or local imports `from . import`.
|
|
827
|
+
|
|
813
828
|
#### CharFromDocObfuscator
|
|
814
829
|
|
|
830
|
+
Get a single character from a documentation.
|
|
831
|
+
|
|
815
832
|
Source: `print('h')`
|
|
816
833
|
|
|
817
834
|
```python
|
|
818
835
|
print(oct.__doc__[8])
|
|
819
836
|
```
|
|
820
837
|
|
|
838
|
+
> [!WARNING]
|
|
839
|
+
> This is highly prone to error, if the documentation change between Python
|
|
840
|
+
> versions, then this may break.
|
|
841
|
+
|
|
821
842
|
#### AddCommentsObfuscator
|
|
822
843
|
|
|
823
844
|
```python
|
|
@@ -873,6 +894,21 @@ def greet(name):
|
|
|
873
894
|
> [!NOTE]
|
|
874
895
|
> Functions containing `yield`, `async`, or `try/except` are skipped and left unchanged.
|
|
875
896
|
|
|
897
|
+
#### DeadCodeObfuscator
|
|
898
|
+
|
|
899
|
+
Insert dead (unreachable/unused) code blocks into the source.
|
|
900
|
+
|
|
901
|
+
Source: `print('Hello, world')`
|
|
902
|
+
|
|
903
|
+
```python
|
|
904
|
+
while False:
|
|
905
|
+
Etb4inx6B1=[21,7,46,2]
|
|
906
|
+
agw_QLOu=283-42
|
|
907
|
+
FwQ2='msg'
|
|
908
|
+
|
|
909
|
+
print('Hello, world')
|
|
910
|
+
```
|
|
911
|
+
|
|
876
912
|
### Stager
|
|
877
913
|
|
|
878
914
|
#### DownloadStager
|
|
@@ -1366,8 +1402,6 @@ Other Python obfuscation projects:
|
|
|
1366
1402
|
|
|
1367
1403
|
## TODO
|
|
1368
1404
|
|
|
1369
|
-
- Add dead code, opaque predicates.
|
|
1370
|
-
- Fix `NamesObfuscator`.
|
|
1371
1405
|
- Add option to prepend a shebang, and add ability to customize it.
|
|
1372
1406
|
|
|
1373
1407
|
## License
|
|
@@ -275,53 +275,44 @@ echo "print('Hello, world')" | pof -f obfuscator -k UUIDObfuscator | python
|
|
|
275
275
|
|
|
276
276
|
### Obfuscator
|
|
277
277
|
|
|
278
|
-
`
|
|
278
|
+
`NamesObfuscator` obfuscator is renaming variables, classes, and functions.
|
|
279
279
|
|
|
280
280
|
Source in `examples/source.py`.
|
|
281
281
|
|
|
282
282
|
```python
|
|
283
283
|
import os
|
|
284
284
|
|
|
285
|
-
def
|
|
285
|
+
def BJM4FaQJf1():
|
|
286
286
|
"""Get Linux release info from /etc/os-release."""
|
|
287
|
-
|
|
288
|
-
if not os.path.exists(
|
|
287
|
+
h77 = '/etc/os-release'
|
|
288
|
+
if not os.path.exists(h77):
|
|
289
289
|
print('OS release file not found. This might not be a Linux system.')
|
|
290
290
|
return None
|
|
291
|
-
|
|
291
|
+
jkFr = {}
|
|
292
292
|
try:
|
|
293
|
-
with open(
|
|
294
|
-
for
|
|
295
|
-
if not
|
|
293
|
+
with open(h77, 'r') as LfQ:
|
|
294
|
+
for GIVt40c7RR in LfQ:
|
|
295
|
+
if not GIVt40c7RR or '=' not in GIVt40c7RR:
|
|
296
296
|
continue
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
297
|
+
KPO5j, RQvTXmL = GIVt40c7RR.strip().split('=', 1)
|
|
298
|
+
RQvTXmL = RQvTXmL.strip('"\'\n')
|
|
299
|
+
jkFr[KPO5j] = RQvTXmL
|
|
300
300
|
print('\nLinux Release Information:')
|
|
301
|
-
print(f"Distribution: {
|
|
302
|
-
print(f"Version: {
|
|
303
|
-
print(f"Version ID: {
|
|
304
|
-
print(f"Pretty Name: {
|
|
305
|
-
return
|
|
306
|
-
except Exception as
|
|
307
|
-
print(f'Error reading release file: {
|
|
301
|
+
print(f"Distribution: {jkFr.get('NAME', 'Unknown')}")
|
|
302
|
+
print(f"Version: {jkFr.get('VERSION', 'Unknown')}")
|
|
303
|
+
print(f"Version ID: {jkFr.get('VERSION_ID', 'Unknown')}")
|
|
304
|
+
print(f"Pretty Name: {jkFr.get('PRETTY_NAME', 'Unknown')}")
|
|
305
|
+
return jkFr
|
|
306
|
+
except Exception as LzYLqi_:
|
|
307
|
+
print(f'Error reading release file: {LzYLqi_}')
|
|
308
308
|
return None
|
|
309
309
|
if __name__ == '__main__':
|
|
310
310
|
if os.name == 'posix' and os.path.exists('/etc/os-release'):
|
|
311
|
-
|
|
311
|
+
yv4HAqmn = BJM4FaQJf1()
|
|
312
312
|
else:
|
|
313
313
|
print('This script is designed for Linux systems.')
|
|
314
314
|
```
|
|
315
315
|
|
|
316
|
-
`DefinitionsObfuscator` obfuscate function names.
|
|
317
|
-
|
|
318
|
-
> [!WARNING]
|
|
319
|
-
> `NamesObfuscator` obfuscator is renaming variables, classes, functions, and
|
|
320
|
-
> imports. Right now this obfuscator can fail under very specific circumstances,
|
|
321
|
-
> see `pof/obfuscator/names.py`. There is an alternative implementation at
|
|
322
|
-
> `NamesRopeObfuscator` that uses `rope`, it's a work in progress and currently
|
|
323
|
-
> does not obfuscate variables declared inside functions.
|
|
324
|
-
|
|
325
316
|
Other very basic obfuscation functions are done by specific obfuscators like:
|
|
326
317
|
|
|
327
318
|
- Removing comments with `CommentsObfuscator`.
|
|
@@ -759,20 +750,50 @@ exec(binascii.a2b_hex("".join(['7072696e-7428-2748-656c-6c6f2c20776f','726c6427-
|
|
|
759
750
|
|
|
760
751
|
#### ImportsObfuscator
|
|
761
752
|
|
|
762
|
-
|
|
753
|
+
Remove keyword `import`.
|
|
763
754
|
|
|
764
755
|
```python
|
|
765
|
-
|
|
756
|
+
# import X
|
|
757
|
+
X = __import__("X")
|
|
758
|
+
|
|
759
|
+
# import X as Y
|
|
760
|
+
Y = __import__("X")
|
|
761
|
+
|
|
762
|
+
# import X, Y
|
|
763
|
+
X = __import__("X")
|
|
764
|
+
Y = __import__("Y")
|
|
765
|
+
|
|
766
|
+
# import X.Y
|
|
767
|
+
X = __import__("X.Y")
|
|
768
|
+
|
|
769
|
+
# from X import Y
|
|
770
|
+
Y = __import__("X", fromlist=["Y"]).Y
|
|
771
|
+
|
|
772
|
+
# from X import Y as Z
|
|
773
|
+
Z = __import__("X", fromlist=["Y"]).Y
|
|
774
|
+
|
|
775
|
+
# from X import Y, Z
|
|
776
|
+
Y = __import__("X", fromlist=["Y"]).Y
|
|
777
|
+
Z = __import__("X", fromlist=["Z"]).Z
|
|
766
778
|
```
|
|
767
779
|
|
|
780
|
+
> [!NOTE]
|
|
781
|
+
> Does not support wildcard imports `*`, or local imports `from . import`.
|
|
782
|
+
|
|
768
783
|
#### CharFromDocObfuscator
|
|
769
784
|
|
|
785
|
+
Get a single character from a documentation.
|
|
786
|
+
|
|
770
787
|
Source: `print('h')`
|
|
771
788
|
|
|
772
789
|
```python
|
|
773
790
|
print(oct.__doc__[8])
|
|
774
791
|
```
|
|
775
792
|
|
|
793
|
+
> [!WARNING]
|
|
794
|
+
> This is highly prone to error, if the documentation change between Python
|
|
795
|
+
> versions, then this may break.
|
|
796
|
+
|
|
776
797
|
#### AddCommentsObfuscator
|
|
777
798
|
|
|
778
799
|
```python
|
|
@@ -828,6 +849,21 @@ def greet(name):
|
|
|
828
849
|
> [!NOTE]
|
|
829
850
|
> Functions containing `yield`, `async`, or `try/except` are skipped and left unchanged.
|
|
830
851
|
|
|
852
|
+
#### DeadCodeObfuscator
|
|
853
|
+
|
|
854
|
+
Insert dead (unreachable/unused) code blocks into the source.
|
|
855
|
+
|
|
856
|
+
Source: `print('Hello, world')`
|
|
857
|
+
|
|
858
|
+
```python
|
|
859
|
+
while False:
|
|
860
|
+
Etb4inx6B1=[21,7,46,2]
|
|
861
|
+
agw_QLOu=283-42
|
|
862
|
+
FwQ2='msg'
|
|
863
|
+
|
|
864
|
+
print('Hello, world')
|
|
865
|
+
```
|
|
866
|
+
|
|
831
867
|
### Stager
|
|
832
868
|
|
|
833
869
|
#### DownloadStager
|
|
@@ -1321,8 +1357,6 @@ Other Python obfuscation projects:
|
|
|
1321
1357
|
|
|
1322
1358
|
## TODO
|
|
1323
1359
|
|
|
1324
|
-
- Add dead code, opaque predicates.
|
|
1325
|
-
- Fix `NamesObfuscator`.
|
|
1326
1360
|
- Add option to prepend a shebang, and add ability to customize it.
|
|
1327
1361
|
|
|
1328
1362
|
## License
|
|
@@ -92,9 +92,6 @@ def add_obfuscation(tokens, args):
|
|
|
92
92
|
if args.obf_constants:
|
|
93
93
|
logger.debug("obfuscating constants")
|
|
94
94
|
tokens = ConstantsObfuscator().obfuscate_tokens(tokens)
|
|
95
|
-
if args.obf_definitions:
|
|
96
|
-
logger.debug("obfuscating definitions")
|
|
97
|
-
tokens = DefinitionsObfuscator().obfuscate_tokens(tokens)
|
|
98
95
|
if args.obf_a85:
|
|
99
96
|
logger.debug("obfuscating a85")
|
|
100
97
|
tokens = ASCII85Obfuscator().obfuscate_tokens(tokens)
|
|
@@ -146,9 +143,6 @@ def add_obfuscation(tokens, args):
|
|
|
146
143
|
if args.obf_names:
|
|
147
144
|
logger.debug("obfuscating names")
|
|
148
145
|
tokens = NamesObfuscator().obfuscate_tokens(tokens)
|
|
149
|
-
if args.obf_names_rope:
|
|
150
|
-
logger.debug("obfuscating names_rope")
|
|
151
|
-
tokens = NamesRopeObfuscator().obfuscate_tokens(tokens)
|
|
152
146
|
if args.obf_numbers:
|
|
153
147
|
logger.debug("obfuscating numbers")
|
|
154
148
|
tokens = NumberObfuscator().obfuscate_tokens(tokens)
|
|
@@ -45,7 +45,6 @@ from pof.obfuscator import (
|
|
|
45
45
|
BuiltinsObfuscator,
|
|
46
46
|
CommentsObfuscator,
|
|
47
47
|
ConstantsObfuscator,
|
|
48
|
-
DefinitionsObfuscator,
|
|
49
48
|
DocstringObfuscator,
|
|
50
49
|
ExceptionObfuscator,
|
|
51
50
|
GlobalsObfuscator,
|
|
@@ -56,7 +55,6 @@ from pof.obfuscator import (
|
|
|
56
55
|
NumberObfuscator,
|
|
57
56
|
PrintObfuscator,
|
|
58
57
|
StringsObfuscator,
|
|
59
|
-
VariablesObfuscator,
|
|
60
58
|
XORObfuscator,
|
|
61
59
|
)
|
|
62
60
|
from pof.stager import ImageStager, RC4Stager
|
|
@@ -123,8 +121,6 @@ class Obfuscator(BaseObfuscator):
|
|
|
123
121
|
generator=ex_generator,
|
|
124
122
|
).obfuscate_tokens(tokens)
|
|
125
123
|
|
|
126
|
-
tokens = DefinitionsObfuscator().obfuscate_tokens(tokens)
|
|
127
|
-
|
|
128
124
|
# configure generator
|
|
129
125
|
# generator = alphabet_generator()
|
|
130
126
|
gen_dict = {
|
|
@@ -145,42 +141,7 @@ class Obfuscator(BaseObfuscator):
|
|
|
145
141
|
obf_builtins_rate=0.3,
|
|
146
142
|
).obfuscate_tokens(tokens)
|
|
147
143
|
|
|
148
|
-
|
|
149
|
-
# for detailed explanation just consider the following:
|
|
150
|
-
# ```
|
|
151
|
-
# import module
|
|
152
|
-
# class Bar:
|
|
153
|
-
# def __init__(self):
|
|
154
|
-
# self.foo = getattr(config, "FOO", True)
|
|
155
|
-
# module.imported.function(self.foo)
|
|
156
|
-
# ```
|
|
157
|
-
# in this case the first instance of `foo` will successfully be
|
|
158
|
-
# obfuscated (as it should) but then with the getattr it's marked has
|
|
159
|
-
# "imported" because it's the result of a builtin function, but notice
|
|
160
|
-
# that it's not a "simple" variable but rather it's a class attribute
|
|
161
|
-
# and has a 'self' behind it, so if the variable is marked has imported
|
|
162
|
-
# and a `.` is placed behind it, it won't be changed, this is the case
|
|
163
|
-
# in the function call, which is itself imported, and thus set the
|
|
164
|
-
# imported attribute for itself and all the parameters given to it
|
|
165
|
-
# this is because we don't keep track of the level of the imported
|
|
166
|
-
#
|
|
167
|
-
# FIXME (deoktr): breaks !
|
|
168
|
-
# Another problem is related to result of function, this is, ofc very
|
|
169
|
-
# hard to deal with, but if a function returns an object, such has for
|
|
170
|
-
# example an object of an imported class, which attribute are not
|
|
171
|
-
# obfuscatable, then it breaks.
|
|
172
|
-
# ```
|
|
173
|
-
# import foo
|
|
174
|
-
# def a():
|
|
175
|
-
# return foo.bar()
|
|
176
|
-
# x = a()
|
|
177
|
-
# x.baz()
|
|
178
|
-
# ```
|
|
179
|
-
# In this context, `baz` would be obfuscated, but it shouldn't because
|
|
180
|
-
# the function is part of the `foo` imported module
|
|
181
|
-
# tokens = NamesObfuscator(generator=generator).obfuscate_tokens(tokens)
|
|
182
|
-
# TODO (deoktr): use alternative variable obfuscator using the AST
|
|
183
|
-
# tokens = VariablesObfuscator().obfuscate_tokens(tokens)
|
|
144
|
+
tokens = NamesObfuscator(generator=generator).obfuscate_tokens(tokens)
|
|
184
145
|
|
|
185
146
|
tokens = GlobalsObfuscator().obfuscate_tokens(tokens)
|
|
186
147
|
tokens = BuiltinsObfuscator().obfuscate_tokens(tokens)
|
|
@@ -241,9 +202,7 @@ class Obfuscator(BaseObfuscator):
|
|
|
241
202
|
tokens = self._get_tokens(source)
|
|
242
203
|
tokens = CommentsObfuscator().obfuscate_tokens(tokens)
|
|
243
204
|
generator = BasicGenerator.alphabet_generator()
|
|
244
|
-
|
|
245
|
-
tokens = VariablesObfuscator(generator=generator).obfuscate_tokens(tokens)
|
|
246
|
-
tokens = DefinitionsObfuscator(generator=generator).obfuscate_tokens(tokens)
|
|
205
|
+
tokens = NamesObfuscator(generator=generator).obfuscate_tokens(tokens)
|
|
247
206
|
tokens = IndentsObfuscator().obfuscate_tokens(tokens)
|
|
248
207
|
tokens = NewlineObfuscator().obfuscate_tokens(tokens)
|
|
249
208
|
return self._untokenize(tokens)
|
|
@@ -309,18 +268,7 @@ class Obfuscator(BaseObfuscator):
|
|
|
309
268
|
tokens = CommentsObfuscator().obfuscate_tokens(tokens)
|
|
310
269
|
tokens = ExceptionObfuscator(generator=generator).obfuscate_tokens(tokens)
|
|
311
270
|
tokens = LoggingObfuscator(generator=generator).obfuscate_tokens(tokens)
|
|
312
|
-
|
|
313
|
-
# tokens = ConstantsObfuscator(
|
|
314
|
-
# generator=generator,
|
|
315
|
-
# obf_number_rate=1,
|
|
316
|
-
# # FIXME (deoktr): breaks if obf_string_rate=1 with NamesObfuscator
|
|
317
|
-
# obf_string_rate=0,
|
|
318
|
-
# # FIXME (deoktr): breaks if obf_builtins_rate=1 with NamesObfuscator
|
|
319
|
-
# obf_builtins_rate=0,
|
|
320
|
-
# ).obfuscate_tokens(tokens)
|
|
321
|
-
# tokens = NamesObfuscator(generator=generator).obfuscate_tokens(tokens)
|
|
322
|
-
tokens = VariablesObfuscator(generator=generator).obfuscate_tokens(tokens)
|
|
323
|
-
tokens = DefinitionsObfuscator(generator=generator).obfuscate_tokens(tokens)
|
|
271
|
+
tokens = NamesObfuscator(generator=generator).obfuscate_tokens(tokens)
|
|
324
272
|
tokens = ConstantsObfuscator(
|
|
325
273
|
generator=generator,
|
|
326
274
|
obf_number_rate=1,
|
|
@@ -384,10 +332,9 @@ class Obfuscator(BaseObfuscator):
|
|
|
384
332
|
# tokens = ConstantsObfuscator(generator=generator).obfuscate_tokens(tokens)
|
|
385
333
|
|
|
386
334
|
tokens = CommentsObfuscator().obfuscate_tokens(tokens)
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
# ).obfuscate_tokens(tokens)
|
|
335
|
+
tokens = NamesObfuscator(
|
|
336
|
+
generator=AdvancedGenerator.fixed_length_generator(),
|
|
337
|
+
).obfuscate_tokens(tokens)
|
|
391
338
|
tokens = BooleanObfuscator().obfuscate_tokens(tokens)
|
|
392
339
|
tokens = IndentsObfuscator().obfuscate_tokens(tokens)
|
|
393
340
|
tokens = NewlineObfuscator().obfuscate_tokens(tokens)
|
|
@@ -26,7 +26,6 @@ from .compression.lzma import LzmaObfuscator
|
|
|
26
26
|
from .compression.zlib import ZlibObfuscator
|
|
27
27
|
from .constants import ConstantsObfuscator
|
|
28
28
|
from .controlflow.control_flow_flatten import ControlFlowFlattenObfuscator
|
|
29
|
-
from .definitions import DefinitionsObfuscator
|
|
30
29
|
from .encoding.a85 import ASCII85Obfuscator
|
|
31
30
|
from .encoding.b16 import Base16Obfuscator
|
|
32
31
|
from .encoding.b32 import Base32Obfuscator
|
|
@@ -45,7 +44,6 @@ from .junk.add_comments import AddCommentsObfuscator
|
|
|
45
44
|
from .junk.add_newlines import AddNewlinesObfuscator
|
|
46
45
|
from .junk.dead_code import DeadCodeObfuscator
|
|
47
46
|
from .names import NamesObfuscator
|
|
48
|
-
from .names_rope import NamesRopeObfuscator
|
|
49
47
|
from .numbers import NumberObfuscator
|
|
50
48
|
from .other.tokens import TokensObfuscator
|
|
51
49
|
from .remove.comments import CommentsObfuscator
|
|
@@ -59,7 +57,6 @@ from .stegano.ipv6encoding import IPv6Obfuscator
|
|
|
59
57
|
from .stegano.macencoding import MACObfuscator
|
|
60
58
|
from .stegano.uuidencoding import UUIDObfuscator
|
|
61
59
|
from .strings import StringsObfuscator
|
|
62
|
-
from .variables import VariablesObfuscator
|
|
63
60
|
|
|
64
61
|
__all__ = [
|
|
65
62
|
"ASCII85Obfuscator",
|
|
@@ -81,7 +78,6 @@ __all__ = [
|
|
|
81
78
|
"ControlFlowFlattenObfuscator",
|
|
82
79
|
"DeadCodeObfuscator",
|
|
83
80
|
"DeepEncryptionObfuscator",
|
|
84
|
-
"DefinitionsObfuscator",
|
|
85
81
|
"DocstringObfuscator",
|
|
86
82
|
"ExceptionObfuscator",
|
|
87
83
|
"ExtractVariablesObfuscator",
|
|
@@ -95,7 +91,6 @@ __all__ = [
|
|
|
95
91
|
"LzmaObfuscator",
|
|
96
92
|
"MACObfuscator",
|
|
97
93
|
"NamesObfuscator",
|
|
98
|
-
"NamesRopeObfuscator",
|
|
99
94
|
"NewlineObfuscator",
|
|
100
95
|
"NumberObfuscator",
|
|
101
96
|
"PrintObfuscator",
|
|
@@ -105,7 +100,6 @@ __all__ = [
|
|
|
105
100
|
"StringsObfuscator",
|
|
106
101
|
"TokensObfuscator",
|
|
107
102
|
"UUIDObfuscator",
|
|
108
|
-
"VariablesObfuscator",
|
|
109
103
|
"WhitespaceObfuscator",
|
|
110
104
|
"XORObfuscator",
|
|
111
105
|
"ZlibObfuscator",
|
|
@@ -183,31 +183,31 @@ class CharFromDocObfuscator:
|
|
|
183
183
|
)
|
|
184
184
|
|
|
185
185
|
@staticmethod
|
|
186
|
-
def
|
|
186
|
+
def _get_char_indexes(string, char):
|
|
187
187
|
return [pos for pos, c in enumerate(string) if c == char]
|
|
188
188
|
|
|
189
189
|
@classmethod
|
|
190
|
-
def
|
|
190
|
+
def _try_find_doc_index(cls, char):
|
|
191
191
|
# take a random builtin doc and search for index in it
|
|
192
192
|
builtin = random.choice(cls.BUILTINS)
|
|
193
193
|
doc = __builtins__[builtin].__doc__
|
|
194
194
|
if not doc:
|
|
195
195
|
msg = f"doc for {builtin} is not a string"
|
|
196
196
|
raise PofError(msg)
|
|
197
|
-
indexes = cls.
|
|
197
|
+
indexes = cls._get_char_indexes(doc, char)
|
|
198
198
|
if len(indexes) == 0:
|
|
199
199
|
msg = "char not present"
|
|
200
200
|
raise PofError(msg)
|
|
201
201
|
index = random.choice(indexes)
|
|
202
202
|
return builtin, index
|
|
203
203
|
|
|
204
|
-
def
|
|
204
|
+
def _obfuscate_char(self, char):
|
|
205
205
|
builtin = None
|
|
206
206
|
index = None
|
|
207
207
|
retry = 3
|
|
208
208
|
for _ in range(retry):
|
|
209
209
|
try:
|
|
210
|
-
builtin, index = self.
|
|
210
|
+
builtin, index = self._try_find_doc_index(char)
|
|
211
211
|
except PofError:
|
|
212
212
|
pass
|
|
213
213
|
else:
|
|
@@ -239,7 +239,7 @@ class CharFromDocObfuscator:
|
|
|
239
239
|
string = ast.literal_eval(tokval)
|
|
240
240
|
if len(string) == 1:
|
|
241
241
|
try:
|
|
242
|
-
new_tokens = self.
|
|
242
|
+
new_tokens = self._obfuscate_char(string)
|
|
243
243
|
except PofError as e:
|
|
244
244
|
logger.debug(str(e))
|
|
245
245
|
except Exception: # noqa: BLE001
|
|
@@ -47,7 +47,7 @@ class GlobalsObfuscator:
|
|
|
47
47
|
local_functions.append(tokval)
|
|
48
48
|
prev_tokval = tokval
|
|
49
49
|
|
|
50
|
-
result = []
|
|
50
|
+
result = []
|
|
51
51
|
prev_tokval = None
|
|
52
52
|
for index, (toknum, tokval, *_) in enumerate(tokens):
|
|
53
53
|
new_tokens = [(toknum, tokval)]
|
|
@@ -60,7 +60,7 @@ class GlobalsObfuscator:
|
|
|
60
60
|
# ensure it's not a definition
|
|
61
61
|
and prev_tokval not in ["def", "class", "."]
|
|
62
62
|
# ensure it's not an argument of a call
|
|
63
|
-
and next_tokval
|
|
63
|
+
and next_tokval != "="
|
|
64
64
|
and tokval not in cls.RESERVED
|
|
65
65
|
):
|
|
66
66
|
new_tokens = [
|