python-obfuscation-framework 1.11.1__tar.gz → 1.12.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.
Files changed (200) hide show
  1. {python_obfuscation_framework-1.11.1/python_obfuscation_framework.egg-info → python_obfuscation_framework-1.12.0}/PKG-INFO +29 -10
  2. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/README.md +27 -8
  3. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/obfuscator/__init__.py +4 -0
  4. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/obfuscator/builtins.py +20 -2
  5. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/obfuscator/constants.py +20 -3
  6. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/obfuscator/controlflow/control_flow_flatten.py +2 -0
  7. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/obfuscator/esoteric/call.py +8 -1
  8. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/obfuscator/extract_variables.py +24 -4
  9. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/obfuscator/junk/add_newlines.py +0 -2
  10. python_obfuscation_framework-1.12.0/pof/obfuscator/junk/add_type_hints.py +450 -0
  11. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/obfuscator/junk/dead_code.py +0 -2
  12. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/obfuscator/names.py +0 -1
  13. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/obfuscator/numbers.py +20 -2
  14. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/obfuscator/other/tokens.py +37 -1
  15. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/obfuscator/remove/print.py +6 -1
  16. python_obfuscation_framework-1.12.0/pof/obfuscator/remove/type_hints.py +285 -0
  17. python_obfuscation_framework-1.12.0/pof/obfuscator/stegano/docstrings.py +164 -0
  18. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/obfuscator/strings.py +3 -3
  19. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pyproject.toml +2 -2
  20. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0/python_obfuscation_framework.egg-info}/PKG-INFO +29 -10
  21. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/python_obfuscation_framework.egg-info/SOURCES.txt +6 -0
  22. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/tests/obfuscator/conftest.py +51 -68
  23. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/tests/obfuscator/fixtures/booleans.py +1 -1
  24. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/tests/obfuscator/fixtures/complex.py +78 -0
  25. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/tests/obfuscator/fixtures/decorators.py +8 -0
  26. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/tests/obfuscator/fixtures/deepenc.py +7 -4
  27. python_obfuscation_framework-1.12.0/tests/obfuscator/fixtures/docs.py +11 -0
  28. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/tests/obfuscator/fixtures/getattr.py +1 -0
  29. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/tests/obfuscator/fixtures/import.py +2 -0
  30. python_obfuscation_framework-1.12.0/tests/obfuscator/fixtures/lambda.py +24 -0
  31. python_obfuscation_framework-1.12.0/tests/obfuscator/fixtures/nonlocal.py +16 -0
  32. python_obfuscation_framework-1.12.0/tests/obfuscator/fixtures/quine.py +10 -0
  33. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/tests/obfuscator/fixtures/simple.py +2 -2
  34. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/tests/obfuscator/fixtures/strings.py +10 -0
  35. python_obfuscation_framework-1.12.0/tests/obfuscator/fixtures/ternary.py +14 -0
  36. python_obfuscation_framework-1.12.0/tests/obfuscator/fixtures/types.py +54 -0
  37. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/tests/obfuscator/test_edge_cases.py +0 -1
  38. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/tests/obfuscator/test_integration.py +6 -0
  39. python_obfuscation_framework-1.11.1/pof/obfuscator/stegano/docstrings.py +0 -127
  40. python_obfuscation_framework-1.11.1/tests/obfuscator/fixtures/docs.py +0 -10
  41. python_obfuscation_framework-1.11.1/tests/obfuscator/fixtures/lambda.py +0 -4
  42. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/LICENSE +0 -0
  43. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/MANIFEST.in +0 -0
  44. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/__init__.py +0 -0
  45. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/__main__.py +0 -0
  46. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/cli.py +0 -0
  47. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/cli_v2.py +0 -0
  48. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/errors.py +0 -0
  49. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/evasion/__init__.py +0 -0
  50. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/evasion/argv.py +0 -0
  51. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/evasion/base.py +0 -0
  52. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/evasion/cpu/__init__.py +0 -0
  53. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/evasion/cpu/cpu_count.py +0 -0
  54. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/evasion/fs/__init__.py +0 -0
  55. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/evasion/fs/directory_exist.py +0 -0
  56. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/evasion/fs/directory_list_exist.py +0 -0
  57. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/evasion/fs/directory_list_missing.py +0 -0
  58. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/evasion/fs/directory_missing.py +0 -0
  59. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/evasion/fs/exec_method.py +0 -0
  60. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/evasion/fs/executable_path.py +0 -0
  61. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/evasion/fs/file_exist.py +0 -0
  62. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/evasion/fs/file_list_exist.py +0 -0
  63. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/evasion/fs/file_list_missing.py +0 -0
  64. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/evasion/fs/file_missing.py +0 -0
  65. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/evasion/fs/tmp.py +0 -0
  66. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/evasion/hardware/__init__.py +0 -0
  67. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/evasion/hardware/ram_count.py +0 -0
  68. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/evasion/hooks/__init__.py +0 -0
  69. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/evasion/hooks/debugger.py +0 -0
  70. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/evasion/hooks/tracemalloc.py +0 -0
  71. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/evasion/human/__init__.py +0 -0
  72. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/evasion/human/p.py +0 -0
  73. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/evasion/human/prompt.py +0 -0
  74. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/evasion/integrity.py +0 -0
  75. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/evasion/multi.py +0 -0
  76. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/evasion/os/__init__.py +0 -0
  77. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/evasion/os/domain.py +0 -0
  78. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/evasion/os/hostname.py +0 -0
  79. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/evasion/os/uid.py +0 -0
  80. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/evasion/os/username.py +0 -0
  81. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/evasion/processes/__init__.py +0 -0
  82. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/evasion/processes/proc_count.py +0 -0
  83. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/evasion/time/__init__.py +0 -0
  84. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/evasion/time/expire.py +0 -0
  85. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/evasion/time/uptime.py +0 -0
  86. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/evasion/time/utc.py +0 -0
  87. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/evasion/utils.py +0 -0
  88. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/logger.py +0 -0
  89. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/main.py +0 -0
  90. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/obfuscator/boolean.py +0 -0
  91. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/obfuscator/cipher/__init__.py +0 -0
  92. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/obfuscator/cipher/deep_encryption.py +0 -0
  93. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/obfuscator/cipher/rc4.py +0 -0
  94. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/obfuscator/cipher/shift.py +0 -0
  95. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/obfuscator/cipher/xor.py +0 -0
  96. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/obfuscator/compression/__init__.py +0 -0
  97. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/obfuscator/compression/bz2.py +0 -0
  98. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/obfuscator/compression/gzip.py +0 -0
  99. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/obfuscator/compression/lzma.py +0 -0
  100. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/obfuscator/compression/zlib.py +0 -0
  101. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/obfuscator/controlflow/__init__.py +0 -0
  102. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/obfuscator/encoding/__init__.py +0 -0
  103. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/obfuscator/encoding/a85.py +0 -0
  104. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/obfuscator/encoding/b16.py +0 -0
  105. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/obfuscator/encoding/b32.py +0 -0
  106. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/obfuscator/encoding/b32hex.py +0 -0
  107. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/obfuscator/encoding/b64.py +0 -0
  108. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/obfuscator/encoding/b85.py +0 -0
  109. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/obfuscator/encoding/binascii.py +0 -0
  110. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/obfuscator/encoding/snt.py +0 -0
  111. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/obfuscator/encoding/whitespace.py +0 -0
  112. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/obfuscator/esoteric/__init__.py +0 -0
  113. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/obfuscator/esoteric/doc.py +0 -0
  114. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/obfuscator/esoteric/globals.py +0 -0
  115. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/obfuscator/esoteric/imports.py +0 -0
  116. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/obfuscator/junk/__init__.py +0 -0
  117. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/obfuscator/junk/add_comments.py +0 -0
  118. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/obfuscator/other/__init__.py +0 -0
  119. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/obfuscator/remove/__init__.py +0 -0
  120. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/obfuscator/remove/comments.py +0 -0
  121. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/obfuscator/remove/exceptions.py +0 -0
  122. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/obfuscator/remove/indents.py +0 -0
  123. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/obfuscator/remove/loggings.py +0 -0
  124. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/obfuscator/remove/loggings_old.py +0 -0
  125. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/obfuscator/remove/newline.py +0 -0
  126. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/obfuscator/restructure.py +0 -0
  127. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/obfuscator/stegano/__init__.py +0 -0
  128. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/obfuscator/stegano/ipv6encoding.py +0 -0
  129. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/obfuscator/stegano/macencoding.py +0 -0
  130. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/obfuscator/stegano/uuidencoding.py +0 -0
  131. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/stager/__init__.py +0 -0
  132. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/stager/cipher/__init__.py +0 -0
  133. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/stager/cipher/rc4.py +0 -0
  134. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/stager/download.py +0 -0
  135. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/stager/image.py +0 -0
  136. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/stager/lots/__init__.py +0 -0
  137. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/stager/lots/cl1pnet.py +0 -0
  138. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/stager/lots/pastebin.py +0 -0
  139. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/stager/lots/pasters.py +0 -0
  140. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/stager/quine.py +0 -0
  141. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/utils/__init__.py +0 -0
  142. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/utils/cipher/__init__.py +0 -0
  143. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/utils/cipher/rc4.py +0 -0
  144. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/utils/cipher/shift.py +0 -0
  145. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/utils/compression/__init__.py +0 -0
  146. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/utils/compression/bz2.py +0 -0
  147. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/utils/compression/gzip.py +0 -0
  148. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/utils/compression/lzma.py +0 -0
  149. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/utils/compression/zlib.py +0 -0
  150. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/utils/encoding/__init__.py +0 -0
  151. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/utils/encoding/a85.py +0 -0
  152. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/utils/encoding/b16.py +0 -0
  153. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/utils/encoding/b3.py +0 -0
  154. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/utils/encoding/b32.py +0 -0
  155. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/utils/encoding/b32hex.py +0 -0
  156. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/utils/encoding/b64.py +0 -0
  157. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/utils/encoding/b85.py +0 -0
  158. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/utils/encoding/binascii.py +0 -0
  159. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/utils/encoding/snt.py +0 -0
  160. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/utils/encoding/whitespace.py +0 -0
  161. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/utils/entropy.py +0 -0
  162. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/utils/extract_names.py +0 -0
  163. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/utils/format.py +0 -0
  164. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/utils/generator/__init__.py +0 -0
  165. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/utils/generator/advanced.py +0 -0
  166. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/utils/generator/base.py +0 -0
  167. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/utils/generator/basic.py +0 -0
  168. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/utils/generator/comments.py +0 -0
  169. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/utils/generator/comments.txt +0 -0
  170. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/utils/generator/names.txt +0 -0
  171. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/utils/generator/unicode.py +0 -0
  172. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/utils/se/__init__.py +0 -0
  173. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/utils/se/homoglyphs.py +0 -0
  174. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/utils/se/homoglyphs.txt +0 -0
  175. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/utils/stegano/__init__.py +0 -0
  176. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/utils/stegano/ipv6encoding.py +0 -0
  177. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/utils/stegano/macencoding.py +0 -0
  178. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/utils/stegano/uuidencoding.py +0 -0
  179. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/pof/utils/tokens.py +0 -0
  180. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/python_obfuscation_framework.egg-info/dependency_links.txt +0 -0
  181. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/python_obfuscation_framework.egg-info/entry_points.txt +0 -0
  182. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/python_obfuscation_framework.egg-info/requires.txt +0 -0
  183. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/python_obfuscation_framework.egg-info/top_level.txt +0 -0
  184. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/setup.cfg +0 -0
  185. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/tests/__init__.py +0 -0
  186. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/tests/obfuscator/__init__.py +0 -0
  187. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/tests/obfuscator/fixtures/__init__.py +0 -0
  188. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/tests/obfuscator/fixtures/compression.py +0 -0
  189. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/tests/obfuscator/fixtures/encoding.py +0 -0
  190. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/tests/obfuscator/fixtures/esoteric.py +0 -0
  191. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/tests/obfuscator/fixtures/moderate.py +0 -0
  192. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/tests/obfuscator/fixtures/numbers.py +0 -0
  193. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/tests/obfuscator/fixtures/rc4.py +0 -0
  194. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/tests/obfuscator/fixtures/try.py +0 -0
  195. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/tests/obfuscator/utils.py +0 -0
  196. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/tests/pyproject.toml +0 -0
  197. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/tests/utils/__init__.py +0 -0
  198. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/tests/utils/se/__init__.py +0 -0
  199. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.0}/tests/utils/se/test_homoglyphs.py +0 -0
  200. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.12.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.11.1
3
+ Version: 1.12.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>
@@ -24,7 +24,7 @@ Classifier: Programming Language :: Python :: 3.12
24
24
  Classifier: Programming Language :: Python :: 3.13
25
25
  Classifier: Programming Language :: Python :: 3.14
26
26
  Classifier: Topic :: Security
27
- Requires-Python: >=3.10
27
+ Requires-Python: >=3.12
28
28
  Description-Content-Type: text/markdown
29
29
  License-File: LICENSE
30
30
  Requires-Dist: rope>=1.0.0
@@ -367,6 +367,7 @@ Other very basic obfuscation functions are done by specific obfuscators like:
367
367
  `LoggingRemoveObfuscator`.
368
368
  - Remove empty lines with `NewlineObfuscator`.
369
369
  - Remove print statements with `PrintObfuscator`.
370
+ - Remove type hints with `TypeHintsObfuscator`.
370
371
 
371
372
  #### StringsObfuscator
372
373
 
@@ -584,16 +585,16 @@ exec("".join([chr(ord(i)-3)for i in'sulqw+*Khoor/#zruog*,\r']))
584
585
 
585
586
  #### DocstringObfuscator
586
587
 
588
+ Store original code inside functions and classes comments as base64.
589
+
587
590
  ```python
588
591
  from base64 import b64decode
589
- class Foo:
590
- """
591
- cHJpbnQoJ0hlbGxvLCB3b3JsZCcpCg==
592
- """
593
- pass
594
592
 
593
+ class L8EU:
594
+ """cHJpbnQoIkhlbGxvLCB3b3JsZCEiKQo="""
595
+ pass
595
596
 
596
- exec(b64decode(Foo.__doc__.replace('\n','').replace(' ','')))
597
+ exec(b64decode("".join([L8EU.__doc__]).replace('\\n','').replace(' ','')))
597
598
  ```
598
599
 
599
600
  #### SpacenTabObfuscator
@@ -898,8 +899,6 @@ def greet(name):
898
899
 
899
900
  Insert dead (unreachable/unused) code blocks into the source.
900
901
 
901
- Source: `print('Hello, world')`
902
-
903
902
  ```python
904
903
  while False:
905
904
  Etb4inx6B1=[21,7,46,2]
@@ -909,6 +908,26 @@ while False:
909
908
  print('Hello, world')
910
909
  ```
911
910
 
911
+ #### AddTypeHintsObfuscator
912
+
913
+ Insert random type hints.
914
+
915
+ Source:
916
+
917
+ ```python
918
+ def foo(x):
919
+ z = x + 2
920
+ print(z)
921
+ ```
922
+
923
+ Obfuscated:
924
+
925
+ ```python
926
+ def foo(x: dict[dict[bytearray, None], frozenset[complex]])-> str | type:
927
+ z: complex | dict[memoryview, complex]=x+2
928
+ print(z)
929
+ ```
930
+
912
931
  ### Stager
913
932
 
914
933
  #### DownloadStager
@@ -322,6 +322,7 @@ Other very basic obfuscation functions are done by specific obfuscators like:
322
322
  `LoggingRemoveObfuscator`.
323
323
  - Remove empty lines with `NewlineObfuscator`.
324
324
  - Remove print statements with `PrintObfuscator`.
325
+ - Remove type hints with `TypeHintsObfuscator`.
325
326
 
326
327
  #### StringsObfuscator
327
328
 
@@ -539,16 +540,16 @@ exec("".join([chr(ord(i)-3)for i in'sulqw+*Khoor/#zruog*,\r']))
539
540
 
540
541
  #### DocstringObfuscator
541
542
 
543
+ Store original code inside functions and classes comments as base64.
544
+
542
545
  ```python
543
546
  from base64 import b64decode
544
- class Foo:
545
- """
546
- cHJpbnQoJ0hlbGxvLCB3b3JsZCcpCg==
547
- """
548
- pass
549
547
 
548
+ class L8EU:
549
+ """cHJpbnQoIkhlbGxvLCB3b3JsZCEiKQo="""
550
+ pass
550
551
 
551
- exec(b64decode(Foo.__doc__.replace('\n','').replace(' ','')))
552
+ exec(b64decode("".join([L8EU.__doc__]).replace('\\n','').replace(' ','')))
552
553
  ```
553
554
 
554
555
  #### SpacenTabObfuscator
@@ -853,8 +854,6 @@ def greet(name):
853
854
 
854
855
  Insert dead (unreachable/unused) code blocks into the source.
855
856
 
856
- Source: `print('Hello, world')`
857
-
858
857
  ```python
859
858
  while False:
860
859
  Etb4inx6B1=[21,7,46,2]
@@ -864,6 +863,26 @@ while False:
864
863
  print('Hello, world')
865
864
  ```
866
865
 
866
+ #### AddTypeHintsObfuscator
867
+
868
+ Insert random type hints.
869
+
870
+ Source:
871
+
872
+ ```python
873
+ def foo(x):
874
+ z = x + 2
875
+ print(z)
876
+ ```
877
+
878
+ Obfuscated:
879
+
880
+ ```python
881
+ def foo(x: dict[dict[bytearray, None], frozenset[complex]])-> str | type:
882
+ z: complex | dict[memoryview, complex]=x+2
883
+ print(z)
884
+ ```
885
+
867
886
  ### Stager
868
887
 
869
888
  #### DownloadStager
@@ -41,6 +41,7 @@ from .esoteric.globals import GlobalsObfuscator
41
41
  from .esoteric.imports import ImportsObfuscator
42
42
  from .extract_variables import ExtractVariablesObfuscator
43
43
  from .junk.add_comments import AddCommentsObfuscator
44
+ from .junk.add_type_hints import AddTypeHintsObfuscator
44
45
  from .junk.add_newlines import AddNewlinesObfuscator
45
46
  from .junk.dead_code import DeadCodeObfuscator
46
47
  from .names import NamesObfuscator
@@ -52,6 +53,7 @@ from .remove.indents import IndentsObfuscator
52
53
  from .remove.loggings import LoggingObfuscator, LoggingRemoveObfuscator
53
54
  from .remove.newline import NewlineObfuscator
54
55
  from .remove.print import PrintObfuscator
56
+ from .remove.type_hints import TypeHintsObfuscator
55
57
  from .stegano.docstrings import DocstringObfuscator
56
58
  from .stegano.ipv6encoding import IPv6Obfuscator
57
59
  from .stegano.macencoding import MACObfuscator
@@ -62,6 +64,7 @@ __all__ = [
62
64
  "ASCII85Obfuscator",
63
65
  "AddCommentsObfuscator",
64
66
  "AddNewlinesObfuscator",
67
+ "AddTypeHintsObfuscator",
65
68
  "Base16Obfuscator",
66
69
  "Base32HexObfuscator",
67
70
  "Base32Obfuscator",
@@ -99,6 +102,7 @@ __all__ = [
99
102
  "SpacenTabObfuscator",
100
103
  "StringsObfuscator",
101
104
  "TokensObfuscator",
105
+ "TypeHintsObfuscator",
102
106
  "UUIDObfuscator",
103
107
  "WhitespaceObfuscator",
104
108
  "XORObfuscator",
@@ -18,7 +18,18 @@
18
18
  # TODO (deoktr): add `__name__.__class__.__class__.__base__.__subclasses__()` variant
19
19
 
20
20
  import random
21
- from tokenize import LPAR, LSQB, NAME, NUMBER, OP, RPAR, RSQB, STRING
21
+ from tokenize import (
22
+ FSTRING_END,
23
+ FSTRING_START,
24
+ LPAR,
25
+ LSQB,
26
+ NAME,
27
+ NUMBER,
28
+ OP,
29
+ RPAR,
30
+ RSQB,
31
+ STRING,
32
+ )
22
33
  from typing import ClassVar
23
34
 
24
35
  from pof.logger import logger
@@ -470,6 +481,7 @@ class BuiltinsObfuscator:
470
481
  def obfuscate_tokens(self, tokens):
471
482
  result = []
472
483
  parenthesis_depth = 0 # parenthesis depth
484
+ fstring_depth = 0
473
485
  prev_tokval = None
474
486
  for index, (toknum, tokval, *_) in enumerate(tokens):
475
487
  new_tokens = [(toknum, tokval)]
@@ -482,14 +494,20 @@ class BuiltinsObfuscator:
482
494
  elif toknum == OP and tokval == ")":
483
495
  parenthesis_depth -= 1
484
496
 
497
+ if toknum == FSTRING_START:
498
+ fstring_depth += 1
499
+ elif toknum == FSTRING_END:
500
+ fstring_depth -= 1
501
+
485
502
  if (
486
503
  toknum == NAME
487
504
  and tokval in self.BUILTINS
488
- and prev_tokval != "." # avoid changing class/imports functions
505
+ and prev_tokval not in (".", "def", "class")
489
506
  and (
490
507
  parenthesis_depth == 0
491
508
  or (parenthesis_depth > 0 and next_tokval != "=")
492
509
  )
510
+ and fstring_depth == 0
493
511
  ):
494
512
  new_tokens = self.obfuscate_builtins(tokval)
495
513
 
@@ -38,7 +38,18 @@ Can extract:
38
38
  #
39
39
 
40
40
  import random
41
- from tokenize import DEDENT, ENCODING, INDENT, NAME, NEWLINE, NUMBER, OP, STRING
41
+ from tokenize import (
42
+ DEDENT,
43
+ ENCODING,
44
+ FSTRING_END,
45
+ FSTRING_START,
46
+ INDENT,
47
+ NAME,
48
+ NEWLINE,
49
+ NUMBER,
50
+ OP,
51
+ STRING,
52
+ )
42
53
 
43
54
  from pof.utils.generator import BasicGenerator
44
55
  from pof.utils.tokens import merge_implicit_strings
@@ -238,6 +249,7 @@ class ConstantsObfuscator:
238
249
  variables = {}
239
250
  result = []
240
251
  parenthesis_depth = 0 # parenthesis depth
252
+ fstring_depth = 0
241
253
  prev_tokval = None
242
254
  prev_toknum = None
243
255
  for index, (toknum, tokval, *_) in enumerate(tokens):
@@ -252,12 +264,17 @@ class ConstantsObfuscator:
252
264
  elif toknum == OP and tokval == ")":
253
265
  parenthesis_depth -= 1
254
266
 
267
+ if toknum == FSTRING_START:
268
+ fstring_depth += 1
269
+ elif toknum == FSTRING_END:
270
+ fstring_depth -= 1
271
+
255
272
  # obfuscation
256
- if (
273
+ if fstring_depth == 0 and (
257
274
  (
258
275
  toknum == NAME
259
276
  and tokval in self.BUILTINS
260
- and prev_tokval != "." # avoid changing class/imports functions
277
+ and prev_tokval not in (".", "def", "class")
261
278
  and (
262
279
  parenthesis_depth == 0
263
280
  or (parenthesis_depth > 0 and next_tokval != "=")
@@ -40,6 +40,8 @@ class ControlFlowFlattenObfuscator:
40
40
  ast.AsyncFor,
41
41
  ast.AsyncWith,
42
42
  ast.Await,
43
+ ast.Nonlocal,
44
+ ast.Global,
43
45
  ),
44
46
  ):
45
47
  return True
@@ -15,7 +15,7 @@
15
15
  # along with this program. If not, see <https://www.gnu.org/licenses/>.
16
16
 
17
17
  import keyword
18
- from tokenize import NAME, OP
18
+ from tokenize import FSTRING_END, FSTRING_START, NAME, OP
19
19
 
20
20
 
21
21
  # TODO (deoktr): add frequency
@@ -39,18 +39,25 @@ class CallObfuscator:
39
39
  def obfuscate_tokens(cls, tokens):
40
40
  result = [] # obfuscated tokens
41
41
  prev_tokval = None
42
+ fstring_depth = 0
42
43
  for index, (toknum, tokval, *_) in enumerate(tokens):
43
44
  new_tokens = [(toknum, tokval)]
44
45
  next_tokval = None
45
46
  if len(tokens) > index + 1:
46
47
  _, next_tokval, *__ = tokens[index + 1]
47
48
 
49
+ if toknum == FSTRING_START:
50
+ fstring_depth += 1
51
+ elif toknum == FSTRING_END:
52
+ fstring_depth -= 1
53
+
48
54
  if (
49
55
  # ensure it's not a definition
50
56
  (prev_tokval is None or prev_tokval not in ["def", "class"])
51
57
  and toknum == NAME
52
58
  and tokval not in cls.RESERVED
53
59
  and next_tokval == "("
60
+ and fstring_depth == 0
54
61
  ):
55
62
  new_tokens.extend(
56
63
  [
@@ -15,7 +15,19 @@
15
15
  # along with this program. If not, see <https://www.gnu.org/licenses/>.
16
16
 
17
17
  import keyword
18
- from tokenize import DEDENT, ENCODING, INDENT, NAME, NEWLINE, NL, NUMBER, OP, STRING
18
+ from tokenize import (
19
+ DEDENT,
20
+ ENCODING,
21
+ FSTRING_END,
22
+ FSTRING_START,
23
+ INDENT,
24
+ NAME,
25
+ NEWLINE,
26
+ NL,
27
+ NUMBER,
28
+ OP,
29
+ STRING,
30
+ )
19
31
 
20
32
  from pof.utils.generator import BasicGenerator
21
33
  from pof.utils.tokens import merge_implicit_strings
@@ -207,12 +219,13 @@ class ExtractVariablesObfuscator:
207
219
  def generate_new_name(self):
208
220
  return next(self.generator)
209
221
 
210
- def obfuscate_tokens(self, tokens): # noqa: C901
222
+ def obfuscate_tokens(self, tokens): # noqa: C901, PLR0912
211
223
  tokens = merge_implicit_strings(tokens)
212
224
  result = []
213
225
  new_line_buffer = []
214
226
  line_buffer = []
215
227
  parenthesis_depth = 0
228
+ fstring_depth = 0
216
229
  prev_toknum = None
217
230
  in_decorator = False
218
231
 
@@ -224,6 +237,11 @@ class ExtractVariablesObfuscator:
224
237
  elif toknum == OP and tokval == ")":
225
238
  parenthesis_depth -= 1
226
239
 
240
+ if toknum == FSTRING_START:
241
+ fstring_depth += 1
242
+ elif toknum == FSTRING_END:
243
+ fstring_depth -= 1
244
+
227
245
  # track decorator context, suppress flushing between @ and def/class
228
246
  if toknum == OP and tokval == "@":
229
247
  in_decorator = True
@@ -244,8 +262,10 @@ class ExtractVariablesObfuscator:
244
262
  on_continuation_line = first_name_in_line in self.CONTINUATION_KEYWORDS
245
263
 
246
264
  if (
247
- (toknum == STRING and not is_docstring) or toknum == NUMBER
248
- ) and not on_continuation_line:
265
+ ((toknum == STRING and not is_docstring) or toknum == NUMBER)
266
+ and not on_continuation_line
267
+ and fstring_depth == 0
268
+ ):
249
269
  random_name = self.generate_new_name()
250
270
  new_line_buffer.extend(
251
271
  [
@@ -14,7 +14,6 @@
14
14
  # You should have received a copy of the GNU General Public License
15
15
  # along with this program. If not, see <https://www.gnu.org/licenses/>.
16
16
 
17
- # TODO (deoktr): add parameter to disable spacing imports
18
17
  import random
19
18
  from tokenize import DEDENT, INDENT, NEWLINE
20
19
 
@@ -35,7 +34,6 @@ class AddNewlinesObfuscator:
35
34
  new_tokens.extend([(NEWLINE, "\n")])
36
35
 
37
36
  else:
38
- # FIXME (deoktr): add newlines BEFORE class/function decorators
39
37
  next_non_indent_tokval = None
40
38
  for i in range(index, len(tokens)):
41
39
  tn, tv, *__ = tokens[i]