python-obfuscation-framework 1.9.2__tar.gz → 1.9.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (181) hide show
  1. {python_obfuscation_framework-1.9.2/python_obfuscation_framework.egg-info → python_obfuscation_framework-1.9.4}/PKG-INFO +41 -4
  2. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/README.md +40 -3
  3. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/obfuscator/__init__.py +4 -0
  4. python_obfuscation_framework-1.9.4/pof/obfuscator/controlflow/__init__.py +19 -0
  5. python_obfuscation_framework-1.9.4/pof/obfuscator/controlflow/control_flow_flatten.py +208 -0
  6. python_obfuscation_framework-1.9.4/pof/obfuscator/junk/dead_code.py +332 -0
  7. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pyproject.toml +1 -1
  8. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4/python_obfuscation_framework.egg-info}/PKG-INFO +41 -4
  9. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/python_obfuscation_framework.egg-info/SOURCES.txt +3 -0
  10. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/tests/obfuscator/conftest.py +9 -6
  11. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/tests/obfuscator/fixtures/multiline_strings.py +0 -8
  12. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/LICENSE +0 -0
  13. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/MANIFEST.in +0 -0
  14. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/__init__.py +0 -0
  15. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/__main__.py +0 -0
  16. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/cli.py +0 -0
  17. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/cli_v2.py +0 -0
  18. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/errors.py +0 -0
  19. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/evasion/__init__.py +0 -0
  20. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/evasion/argv.py +0 -0
  21. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/evasion/base.py +0 -0
  22. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/evasion/cpu/__init__.py +0 -0
  23. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/evasion/cpu/cpu_count.py +0 -0
  24. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/evasion/fs/__init__.py +0 -0
  25. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/evasion/fs/directory_exist.py +0 -0
  26. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/evasion/fs/directory_list_exist.py +0 -0
  27. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/evasion/fs/directory_list_missing.py +0 -0
  28. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/evasion/fs/directory_missing.py +0 -0
  29. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/evasion/fs/exec_method.py +0 -0
  30. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/evasion/fs/executable_path.py +0 -0
  31. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/evasion/fs/file_exist.py +0 -0
  32. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/evasion/fs/file_list_exist.py +0 -0
  33. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/evasion/fs/file_list_missing.py +0 -0
  34. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/evasion/fs/file_missing.py +0 -0
  35. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/evasion/fs/tmp.py +0 -0
  36. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/evasion/hardware/__init__.py +0 -0
  37. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/evasion/hardware/ram_count.py +0 -0
  38. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/evasion/hooks/__init__.py +0 -0
  39. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/evasion/hooks/debugger.py +0 -0
  40. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/evasion/hooks/tracemalloc.py +0 -0
  41. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/evasion/human/__init__.py +0 -0
  42. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/evasion/human/p.py +0 -0
  43. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/evasion/human/prompt.py +0 -0
  44. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/evasion/integrity.py +0 -0
  45. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/evasion/multi.py +0 -0
  46. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/evasion/os/__init__.py +0 -0
  47. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/evasion/os/domain.py +0 -0
  48. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/evasion/os/hostname.py +0 -0
  49. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/evasion/os/uid.py +0 -0
  50. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/evasion/os/username.py +0 -0
  51. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/evasion/processes/__init__.py +0 -0
  52. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/evasion/processes/proc_count.py +0 -0
  53. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/evasion/time/__init__.py +0 -0
  54. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/evasion/time/expire.py +0 -0
  55. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/evasion/time/uptime.py +0 -0
  56. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/evasion/time/utc.py +0 -0
  57. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/evasion/utils.py +0 -0
  58. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/logger.py +0 -0
  59. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/main.py +0 -0
  60. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/obfuscator/boolean.py +0 -0
  61. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/obfuscator/builtins.py +0 -0
  62. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/obfuscator/cipher/__init__.py +0 -0
  63. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/obfuscator/cipher/deep_encryption.py +0 -0
  64. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/obfuscator/cipher/rc4.py +0 -0
  65. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/obfuscator/cipher/shift.py +0 -0
  66. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/obfuscator/cipher/xor.py +0 -0
  67. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/obfuscator/compression/__init__.py +0 -0
  68. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/obfuscator/compression/bz2.py +0 -0
  69. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/obfuscator/compression/gzip.py +0 -0
  70. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/obfuscator/compression/lzma.py +0 -0
  71. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/obfuscator/compression/zlib.py +0 -0
  72. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/obfuscator/constants.py +0 -0
  73. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/obfuscator/definitions.py +0 -0
  74. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/obfuscator/encoding/__init__.py +0 -0
  75. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/obfuscator/encoding/a85.py +0 -0
  76. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/obfuscator/encoding/b16.py +0 -0
  77. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/obfuscator/encoding/b32.py +0 -0
  78. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/obfuscator/encoding/b32hex.py +0 -0
  79. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/obfuscator/encoding/b64.py +0 -0
  80. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/obfuscator/encoding/b85.py +0 -0
  81. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/obfuscator/encoding/binascii.py +0 -0
  82. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/obfuscator/encoding/snt.py +0 -0
  83. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/obfuscator/encoding/whitespace.py +0 -0
  84. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/obfuscator/esoteric/__init__.py +0 -0
  85. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/obfuscator/esoteric/call.py +0 -0
  86. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/obfuscator/esoteric/doc.py +0 -0
  87. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/obfuscator/esoteric/globals.py +0 -0
  88. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/obfuscator/esoteric/imports.py +0 -0
  89. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/obfuscator/extract_variables.py +0 -0
  90. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/obfuscator/junk/__init__.py +0 -0
  91. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/obfuscator/junk/add_comments.py +0 -0
  92. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/obfuscator/junk/add_newlines.py +0 -0
  93. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/obfuscator/names.py +0 -0
  94. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/obfuscator/names_rope.py +0 -0
  95. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/obfuscator/numbers.py +0 -0
  96. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/obfuscator/other/__init__.py +0 -0
  97. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/obfuscator/other/tokens.py +0 -0
  98. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/obfuscator/remove/__init__.py +0 -0
  99. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/obfuscator/remove/comments.py +0 -0
  100. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/obfuscator/remove/exceptions.py +0 -0
  101. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/obfuscator/remove/indents.py +0 -0
  102. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/obfuscator/remove/loggings.py +0 -0
  103. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/obfuscator/remove/loggings_old.py +0 -0
  104. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/obfuscator/remove/newline.py +0 -0
  105. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/obfuscator/remove/print.py +0 -0
  106. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/obfuscator/restructure.py +0 -0
  107. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/obfuscator/stegano/__init__.py +0 -0
  108. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/obfuscator/stegano/docstrings.py +0 -0
  109. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/obfuscator/stegano/ipv6encoding.py +0 -0
  110. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/obfuscator/stegano/macencoding.py +0 -0
  111. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/obfuscator/stegano/uuidencoding.py +0 -0
  112. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/obfuscator/strings.py +0 -0
  113. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/obfuscator/variables.py +0 -0
  114. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/stager/__init__.py +0 -0
  115. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/stager/cipher/__init__.py +0 -0
  116. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/stager/cipher/rc4.py +0 -0
  117. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/stager/download.py +0 -0
  118. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/stager/image.py +0 -0
  119. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/stager/lots/__init__.py +0 -0
  120. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/stager/lots/cl1pnet.py +0 -0
  121. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/stager/lots/pastebin.py +0 -0
  122. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/stager/lots/pasters.py +0 -0
  123. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/stager/quine.py +0 -0
  124. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/utils/__init__.py +0 -0
  125. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/utils/cipher/__init__.py +0 -0
  126. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/utils/cipher/rc4.py +0 -0
  127. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/utils/cipher/shift.py +0 -0
  128. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/utils/compression/__init__.py +0 -0
  129. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/utils/compression/bz2.py +0 -0
  130. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/utils/compression/gzip.py +0 -0
  131. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/utils/compression/lzma.py +0 -0
  132. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/utils/compression/zlib.py +0 -0
  133. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/utils/encoding/__init__.py +0 -0
  134. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/utils/encoding/a85.py +0 -0
  135. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/utils/encoding/b16.py +0 -0
  136. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/utils/encoding/b3.py +0 -0
  137. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/utils/encoding/b32.py +0 -0
  138. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/utils/encoding/b32hex.py +0 -0
  139. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/utils/encoding/b64.py +0 -0
  140. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/utils/encoding/b85.py +0 -0
  141. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/utils/encoding/binascii.py +0 -0
  142. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/utils/encoding/snt.py +0 -0
  143. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/utils/encoding/whitespace.py +0 -0
  144. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/utils/entropy.py +0 -0
  145. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/utils/extract_names.py +0 -0
  146. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/utils/format.py +0 -0
  147. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/utils/generator/__init__.py +0 -0
  148. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/utils/generator/advanced.py +0 -0
  149. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/utils/generator/base.py +0 -0
  150. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/utils/generator/basic.py +0 -0
  151. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/utils/generator/comments.py +0 -0
  152. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/utils/generator/comments.txt +0 -0
  153. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/utils/generator/names.txt +0 -0
  154. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/utils/generator/unicode.py +0 -0
  155. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/utils/se/__init__.py +0 -0
  156. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/utils/se/homoglyphs.py +0 -0
  157. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/utils/se/homoglyphs.txt +0 -0
  158. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/utils/stegano/__init__.py +0 -0
  159. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/utils/stegano/ipv6encoding.py +0 -0
  160. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/utils/stegano/macencoding.py +0 -0
  161. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/utils/stegano/uuidencoding.py +0 -0
  162. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/pof/utils/tokens.py +0 -0
  163. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/python_obfuscation_framework.egg-info/dependency_links.txt +0 -0
  164. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/python_obfuscation_framework.egg-info/entry_points.txt +0 -0
  165. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/python_obfuscation_framework.egg-info/requires.txt +0 -0
  166. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/python_obfuscation_framework.egg-info/top_level.txt +0 -0
  167. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/setup.cfg +0 -0
  168. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/tests/__init__.py +0 -0
  169. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/tests/obfuscator/__init__.py +0 -0
  170. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/tests/obfuscator/fixtures/__init__.py +0 -0
  171. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/tests/obfuscator/fixtures/complex.py +0 -0
  172. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/tests/obfuscator/fixtures/moderate.py +0 -0
  173. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/tests/obfuscator/fixtures/simple.py +0 -0
  174. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/tests/obfuscator/test_edge_cases.py +0 -0
  175. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/tests/obfuscator/test_integration.py +0 -0
  176. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/tests/obfuscator/utils.py +0 -0
  177. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/tests/pyproject.toml +0 -0
  178. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/tests/utils/__init__.py +0 -0
  179. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/tests/utils/se/__init__.py +0 -0
  180. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/tests/utils/se/test_homoglyphs.py +0 -0
  181. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.4}/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.9.2
3
+ Version: 1.9.4
4
4
  Summary: Python Obfuscation Framework
5
5
  Author-email: deoktr <35725720+deoktr@users.noreply.github.com>
6
6
  Maintainer-email: deoktr <35725720+deoktr@users.noreply.github.com>
@@ -838,6 +838,41 @@ print("Hello, world!")
838
838
 
839
839
  ```
840
840
 
841
+ #### ControlFlowFlattenObfuscator
842
+
843
+ Classic control flow flattening.
844
+
845
+ Source:
846
+
847
+ ```python
848
+ def greet(name):
849
+ msg = "Hello, "
850
+ msg = msg + name
851
+ return msg
852
+ ```
853
+
854
+ Output:
855
+
856
+ ```python
857
+ def greet(name):
858
+ _state=936
859
+ _ret=None
860
+ while _state!=435:
861
+ if _state==995:
862
+ msg=msg+name
863
+ _state=528
864
+ elif _state==936:
865
+ msg='Hello, '
866
+ _state=995
867
+ elif _state==528:
868
+ _ret=msg
869
+ _state=435
870
+ return _ret
871
+ ```
872
+
873
+ > [!NOTE]
874
+ > Functions containing `yield`, `async`, or `try/except` are skipped and left unchanged.
875
+
841
876
  ### Stager
842
877
 
843
878
  #### DownloadStager
@@ -1233,9 +1268,12 @@ interesting strings in Python source code. To check rules against source files
1233
1268
  and/or obfuscated files run:
1234
1269
 
1235
1270
  ```bash
1236
- yara --no-warnings yara/python.yar file.py
1271
+ yara --no-warnings yara/python.yar examples/out/custom_complete_format.py
1237
1272
  ```
1238
1273
 
1274
+ > [!NOTE]
1275
+ > The rules are far from perfect, but they are a starting point.
1276
+
1239
1277
  ## Development
1240
1278
 
1241
1279
  Project directory structure:
@@ -1328,8 +1366,7 @@ Other Python obfuscation projects:
1328
1366
 
1329
1367
  ## TODO
1330
1368
 
1331
- - Add control flow obfuscation, add dead code, opaque predicates, control flow
1332
- flattening.
1369
+ - Add dead code, opaque predicates.
1333
1370
  - Fix `NamesObfuscator`.
1334
1371
  - Add option to prepend a shebang, and add ability to customize it.
1335
1372
 
@@ -793,6 +793,41 @@ print("Hello, world!")
793
793
 
794
794
  ```
795
795
 
796
+ #### ControlFlowFlattenObfuscator
797
+
798
+ Classic control flow flattening.
799
+
800
+ Source:
801
+
802
+ ```python
803
+ def greet(name):
804
+ msg = "Hello, "
805
+ msg = msg + name
806
+ return msg
807
+ ```
808
+
809
+ Output:
810
+
811
+ ```python
812
+ def greet(name):
813
+ _state=936
814
+ _ret=None
815
+ while _state!=435:
816
+ if _state==995:
817
+ msg=msg+name
818
+ _state=528
819
+ elif _state==936:
820
+ msg='Hello, '
821
+ _state=995
822
+ elif _state==528:
823
+ _ret=msg
824
+ _state=435
825
+ return _ret
826
+ ```
827
+
828
+ > [!NOTE]
829
+ > Functions containing `yield`, `async`, or `try/except` are skipped and left unchanged.
830
+
796
831
  ### Stager
797
832
 
798
833
  #### DownloadStager
@@ -1188,9 +1223,12 @@ interesting strings in Python source code. To check rules against source files
1188
1223
  and/or obfuscated files run:
1189
1224
 
1190
1225
  ```bash
1191
- yara --no-warnings yara/python.yar file.py
1226
+ yara --no-warnings yara/python.yar examples/out/custom_complete_format.py
1192
1227
  ```
1193
1228
 
1229
+ > [!NOTE]
1230
+ > The rules are far from perfect, but they are a starting point.
1231
+
1194
1232
  ## Development
1195
1233
 
1196
1234
  Project directory structure:
@@ -1283,8 +1321,7 @@ Other Python obfuscation projects:
1283
1321
 
1284
1322
  ## TODO
1285
1323
 
1286
- - Add control flow obfuscation, add dead code, opaque predicates, control flow
1287
- flattening.
1324
+ - Add dead code, opaque predicates.
1288
1325
  - Fix `NamesObfuscator`.
1289
1326
  - Add option to prepend a shebang, and add ability to customize it.
1290
1327
 
@@ -25,6 +25,7 @@ from .compression.gzip import GzipObfuscator
25
25
  from .compression.lzma import LzmaObfuscator
26
26
  from .compression.zlib import ZlibObfuscator
27
27
  from .constants import ConstantsObfuscator
28
+ from .controlflow.control_flow_flatten import ControlFlowFlattenObfuscator
28
29
  from .definitions import DefinitionsObfuscator
29
30
  from .encoding.a85 import ASCII85Obfuscator
30
31
  from .encoding.b16 import Base16Obfuscator
@@ -42,6 +43,7 @@ from .esoteric.imports import ImportsObfuscator
42
43
  from .extract_variables import ExtractVariablesObfuscator
43
44
  from .junk.add_comments import AddCommentsObfuscator
44
45
  from .junk.add_newlines import AddNewlinesObfuscator
46
+ from .junk.dead_code import DeadCodeObfuscator
45
47
  from .names import NamesObfuscator
46
48
  from .names_rope import NamesRopeObfuscator
47
49
  from .numbers import NumberObfuscator
@@ -76,6 +78,8 @@ __all__ = [
76
78
  "CharFromDocObfuscator",
77
79
  "CommentsObfuscator",
78
80
  "ConstantsObfuscator",
81
+ "ControlFlowFlattenObfuscator",
82
+ "DeadCodeObfuscator",
79
83
  "DeepEncryptionObfuscator",
80
84
  "DefinitionsObfuscator",
81
85
  "DocstringObfuscator",
@@ -0,0 +1,19 @@
1
+ # POF, a free and open source Python obfuscation framework.
2
+ # Copyright (C) 2022 - 2026 Deoktr
3
+ #
4
+ # This program is free software: you can redistribute it and/or modify
5
+ # it under the terms of the GNU General Public License as published by
6
+ # the Free Software Foundation, either version 3 of the License, or
7
+ # (at your option) any later version.
8
+ #
9
+ # This program is distributed in the hope that it will be useful,
10
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+ # GNU General Public License for more details.
13
+ #
14
+ # You should have received a copy of the GNU General Public License
15
+ # along with this program. If not, see <https://www.gnu.org/licenses/>.
16
+
17
+ from .control_flow_flatten import ControlFlowFlattenObfuscator
18
+
19
+ __all__ = ["ControlFlowFlattenObfuscator"]
@@ -0,0 +1,208 @@
1
+ # POF, a free and open source Python obfuscation framework.
2
+ # Copyright (C) 2022 - 2026 Deoktr
3
+ #
4
+ # This program is free software: you can redistribute it and/or modify
5
+ # it under the terms of the GNU General Public License as published by
6
+ # the Free Software Foundation, either version 3 of the License, or
7
+ # (at your option) any later version.
8
+ #
9
+ # This program is distributed in the hope that it will be useful,
10
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+ # GNU General Public License for more details.
13
+ #
14
+ # You should have received a copy of the GNU General Public License
15
+ # along with this program. If not, see <https://www.gnu.org/licenses/>.
16
+
17
+ import ast
18
+ import io
19
+ import random
20
+ from tokenize import ENCODING, ENDMARKER, generate_tokens
21
+
22
+ from pof.utils.tokens import untokenize
23
+
24
+
25
+ class ControlFlowFlattenObfuscator:
26
+ """Transform sequential function code into a state-machine dispatcher."""
27
+
28
+ def __init__(self, min_statements: int = 3) -> None:
29
+ self.min_statements = min_statements
30
+
31
+ @staticmethod
32
+ def _should_skip_function(body: list[ast.stmt]) -> bool:
33
+ """Return True if the function body contains unsupported constructs."""
34
+ for node in ast.walk(ast.Module(body=body, type_ignores=[])):
35
+ if isinstance(
36
+ node,
37
+ (
38
+ ast.Yield,
39
+ ast.YieldFrom,
40
+ ast.AsyncFor,
41
+ ast.AsyncWith,
42
+ ast.Await,
43
+ ),
44
+ ):
45
+ return True
46
+ return False
47
+
48
+ @staticmethod
49
+ def _has_return(stmts: list[ast.stmt]) -> bool:
50
+ """Check if any statement in the list is or contains a return."""
51
+ for node in ast.walk(ast.Module(body=stmts, type_ignores=[])):
52
+ if isinstance(node, ast.Return):
53
+ return True
54
+ return False
55
+
56
+ @classmethod
57
+ def _flatten_body(cls, body: list[ast.stmt]) -> list[ast.stmt]:
58
+ """Transform a list of sequential statements into a state-machine dispatcher."""
59
+ num_blocks = len(body)
60
+ all_states = random.sample(range(100, 999), num_blocks + 1)
61
+ exit_state = all_states[-1]
62
+ block_states = all_states[:num_blocks]
63
+
64
+ state_var = "_state"
65
+ ret_var = "_ret"
66
+ has_ret = cls._has_return(body)
67
+
68
+ dispatcher_cases: list[ast.If | None] = []
69
+
70
+ for idx, (state_num, stmt) in enumerate(zip(block_states, body, strict=True)):
71
+ next_state = block_states[idx + 1] if idx + 1 < num_blocks else exit_state
72
+
73
+ case_body: list[ast.stmt] = []
74
+
75
+ if isinstance(stmt, ast.Return):
76
+ # return value -> _ret = value; _state = exit
77
+ if stmt.value is not None:
78
+ case_body.append(
79
+ ast.Assign(
80
+ targets=[ast.Name(id=ret_var, ctx=ast.Store())],
81
+ value=stmt.value,
82
+ lineno=0,
83
+ ),
84
+ )
85
+ case_body.append(
86
+ ast.Assign(
87
+ targets=[ast.Name(id=state_var, ctx=ast.Store())],
88
+ value=ast.Constant(value=exit_state),
89
+ lineno=0,
90
+ ),
91
+ )
92
+ elif isinstance(stmt, ast.If):
93
+ # if/else -> execute block, then set state based on which branch
94
+ # for simplicity, keep the if/else inside the state block and
95
+ # set next state after
96
+ case_body.append(stmt)
97
+ case_body.append(
98
+ ast.Assign(
99
+ targets=[ast.Name(id=state_var, ctx=ast.Store())],
100
+ value=ast.Constant(value=next_state),
101
+ lineno=0,
102
+ ),
103
+ )
104
+ else:
105
+ case_body.append(stmt)
106
+ case_body.append(
107
+ ast.Assign(
108
+ targets=[ast.Name(id=state_var, ctx=ast.Store())],
109
+ value=ast.Constant(value=next_state),
110
+ lineno=0,
111
+ ),
112
+ )
113
+
114
+ test = ast.Compare(
115
+ left=ast.Name(id=state_var, ctx=ast.Load()),
116
+ ops=[ast.Eq()],
117
+ comparators=[ast.Constant(value=state_num)],
118
+ )
119
+ dispatcher_cases.append((test, case_body))
120
+
121
+ if not dispatcher_cases:
122
+ return body
123
+
124
+ random.shuffle(dispatcher_cases)
125
+
126
+ current: ast.stmt | None = None
127
+ for test, case_body in reversed(dispatcher_cases):
128
+ if current is None:
129
+ current = ast.If(test=test, body=case_body, orelse=[])
130
+ else:
131
+ current = ast.If(test=test, body=case_body, orelse=[current])
132
+
133
+ init_state = ast.Assign(
134
+ targets=[ast.Name(id=state_var, ctx=ast.Store())],
135
+ value=ast.Constant(value=block_states[0]),
136
+ lineno=0,
137
+ )
138
+
139
+ init_ret: list[ast.stmt] = []
140
+ if has_ret:
141
+ init_ret.append(
142
+ ast.Assign(
143
+ targets=[ast.Name(id=ret_var, ctx=ast.Store())],
144
+ value=ast.Constant(value=None),
145
+ lineno=0,
146
+ ),
147
+ )
148
+
149
+ while_loop = ast.While(
150
+ test=ast.Compare(
151
+ left=ast.Name(id=state_var, ctx=ast.Load()),
152
+ ops=[ast.NotEq()],
153
+ comparators=[ast.Constant(value=exit_state)],
154
+ ),
155
+ body=[current],
156
+ orelse=[],
157
+ )
158
+
159
+ result: list[ast.stmt] = [init_state, *init_ret, while_loop]
160
+
161
+ if has_ret:
162
+ result.append(ast.Return(value=ast.Name(id=ret_var, ctx=ast.Load())))
163
+
164
+ return result
165
+
166
+ def obfuscate_tokens(self, tokens: list) -> list:
167
+ source = untokenize(tokens)
168
+
169
+ try:
170
+ tree = ast.parse(source)
171
+ except SyntaxError:
172
+ return tokens
173
+
174
+ modified = False
175
+
176
+ for node in ast.walk(tree):
177
+ if not isinstance(node, ast.FunctionDef):
178
+ continue
179
+
180
+ body = node.body
181
+ if len(body) < self.min_statements:
182
+ continue
183
+
184
+ if self._should_skip_function(body):
185
+ continue
186
+
187
+ node.body = self._flatten_body(body)
188
+ modified = True
189
+
190
+ if not modified:
191
+ return tokens
192
+
193
+ ast.fix_missing_locations(tree)
194
+ new_source = ast.unparse(tree)
195
+
196
+ try:
197
+ new_tokens = list(generate_tokens(io.StringIO(new_source + "\n").readline))
198
+ except Exception: # noqa: BLE001
199
+ return tokens
200
+
201
+ # strip ENCODING and ENDMARKER
202
+ result: list[tuple[int, str]] = []
203
+ for toknum, tokval, *_ in new_tokens:
204
+ if toknum in (ENCODING, ENDMARKER):
205
+ continue
206
+ result.append((toknum, tokval))
207
+
208
+ return result