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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (180) hide show
  1. {python_obfuscation_framework-1.9.2/python_obfuscation_framework.egg-info → python_obfuscation_framework-1.9.3}/PKG-INFO +36 -1
  2. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/README.md +35 -0
  3. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/obfuscator/__init__.py +2 -0
  4. python_obfuscation_framework-1.9.3/pof/obfuscator/controlflow/__init__.py +19 -0
  5. python_obfuscation_framework-1.9.3/pof/obfuscator/controlflow/control_flow_flatten.py +208 -0
  6. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pyproject.toml +1 -1
  7. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3/python_obfuscation_framework.egg-info}/PKG-INFO +36 -1
  8. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/python_obfuscation_framework.egg-info/SOURCES.txt +2 -0
  9. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/tests/obfuscator/conftest.py +7 -6
  10. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/LICENSE +0 -0
  11. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/MANIFEST.in +0 -0
  12. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/__init__.py +0 -0
  13. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/__main__.py +0 -0
  14. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/cli.py +0 -0
  15. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/cli_v2.py +0 -0
  16. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/errors.py +0 -0
  17. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/evasion/__init__.py +0 -0
  18. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/evasion/argv.py +0 -0
  19. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/evasion/base.py +0 -0
  20. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/evasion/cpu/__init__.py +0 -0
  21. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/evasion/cpu/cpu_count.py +0 -0
  22. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/evasion/fs/__init__.py +0 -0
  23. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/evasion/fs/directory_exist.py +0 -0
  24. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/evasion/fs/directory_list_exist.py +0 -0
  25. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/evasion/fs/directory_list_missing.py +0 -0
  26. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/evasion/fs/directory_missing.py +0 -0
  27. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/evasion/fs/exec_method.py +0 -0
  28. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/evasion/fs/executable_path.py +0 -0
  29. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/evasion/fs/file_exist.py +0 -0
  30. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/evasion/fs/file_list_exist.py +0 -0
  31. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/evasion/fs/file_list_missing.py +0 -0
  32. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/evasion/fs/file_missing.py +0 -0
  33. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/evasion/fs/tmp.py +0 -0
  34. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/evasion/hardware/__init__.py +0 -0
  35. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/evasion/hardware/ram_count.py +0 -0
  36. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/evasion/hooks/__init__.py +0 -0
  37. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/evasion/hooks/debugger.py +0 -0
  38. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/evasion/hooks/tracemalloc.py +0 -0
  39. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/evasion/human/__init__.py +0 -0
  40. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/evasion/human/p.py +0 -0
  41. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/evasion/human/prompt.py +0 -0
  42. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/evasion/integrity.py +0 -0
  43. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/evasion/multi.py +0 -0
  44. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/evasion/os/__init__.py +0 -0
  45. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/evasion/os/domain.py +0 -0
  46. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/evasion/os/hostname.py +0 -0
  47. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/evasion/os/uid.py +0 -0
  48. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/evasion/os/username.py +0 -0
  49. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/evasion/processes/__init__.py +0 -0
  50. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/evasion/processes/proc_count.py +0 -0
  51. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/evasion/time/__init__.py +0 -0
  52. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/evasion/time/expire.py +0 -0
  53. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/evasion/time/uptime.py +0 -0
  54. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/evasion/time/utc.py +0 -0
  55. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/evasion/utils.py +0 -0
  56. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/logger.py +0 -0
  57. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/main.py +0 -0
  58. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/obfuscator/boolean.py +0 -0
  59. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/obfuscator/builtins.py +0 -0
  60. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/obfuscator/cipher/__init__.py +0 -0
  61. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/obfuscator/cipher/deep_encryption.py +0 -0
  62. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/obfuscator/cipher/rc4.py +0 -0
  63. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/obfuscator/cipher/shift.py +0 -0
  64. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/obfuscator/cipher/xor.py +0 -0
  65. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/obfuscator/compression/__init__.py +0 -0
  66. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/obfuscator/compression/bz2.py +0 -0
  67. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/obfuscator/compression/gzip.py +0 -0
  68. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/obfuscator/compression/lzma.py +0 -0
  69. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/obfuscator/compression/zlib.py +0 -0
  70. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/obfuscator/constants.py +0 -0
  71. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/obfuscator/definitions.py +0 -0
  72. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/obfuscator/encoding/__init__.py +0 -0
  73. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/obfuscator/encoding/a85.py +0 -0
  74. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/obfuscator/encoding/b16.py +0 -0
  75. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/obfuscator/encoding/b32.py +0 -0
  76. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/obfuscator/encoding/b32hex.py +0 -0
  77. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/obfuscator/encoding/b64.py +0 -0
  78. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/obfuscator/encoding/b85.py +0 -0
  79. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/obfuscator/encoding/binascii.py +0 -0
  80. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/obfuscator/encoding/snt.py +0 -0
  81. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/obfuscator/encoding/whitespace.py +0 -0
  82. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/obfuscator/esoteric/__init__.py +0 -0
  83. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/obfuscator/esoteric/call.py +0 -0
  84. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/obfuscator/esoteric/doc.py +0 -0
  85. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/obfuscator/esoteric/globals.py +0 -0
  86. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/obfuscator/esoteric/imports.py +0 -0
  87. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/obfuscator/extract_variables.py +0 -0
  88. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/obfuscator/junk/__init__.py +0 -0
  89. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/obfuscator/junk/add_comments.py +0 -0
  90. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/obfuscator/junk/add_newlines.py +0 -0
  91. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/obfuscator/names.py +0 -0
  92. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/obfuscator/names_rope.py +0 -0
  93. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/obfuscator/numbers.py +0 -0
  94. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/obfuscator/other/__init__.py +0 -0
  95. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/obfuscator/other/tokens.py +0 -0
  96. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/obfuscator/remove/__init__.py +0 -0
  97. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/obfuscator/remove/comments.py +0 -0
  98. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/obfuscator/remove/exceptions.py +0 -0
  99. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/obfuscator/remove/indents.py +0 -0
  100. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/obfuscator/remove/loggings.py +0 -0
  101. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/obfuscator/remove/loggings_old.py +0 -0
  102. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/obfuscator/remove/newline.py +0 -0
  103. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/obfuscator/remove/print.py +0 -0
  104. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/obfuscator/restructure.py +0 -0
  105. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/obfuscator/stegano/__init__.py +0 -0
  106. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/obfuscator/stegano/docstrings.py +0 -0
  107. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/obfuscator/stegano/ipv6encoding.py +0 -0
  108. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/obfuscator/stegano/macencoding.py +0 -0
  109. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/obfuscator/stegano/uuidencoding.py +0 -0
  110. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/obfuscator/strings.py +0 -0
  111. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/obfuscator/variables.py +0 -0
  112. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/stager/__init__.py +0 -0
  113. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/stager/cipher/__init__.py +0 -0
  114. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/stager/cipher/rc4.py +0 -0
  115. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/stager/download.py +0 -0
  116. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/stager/image.py +0 -0
  117. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/stager/lots/__init__.py +0 -0
  118. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/stager/lots/cl1pnet.py +0 -0
  119. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/stager/lots/pastebin.py +0 -0
  120. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/stager/lots/pasters.py +0 -0
  121. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/stager/quine.py +0 -0
  122. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/utils/__init__.py +0 -0
  123. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/utils/cipher/__init__.py +0 -0
  124. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/utils/cipher/rc4.py +0 -0
  125. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/utils/cipher/shift.py +0 -0
  126. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/utils/compression/__init__.py +0 -0
  127. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/utils/compression/bz2.py +0 -0
  128. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/utils/compression/gzip.py +0 -0
  129. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/utils/compression/lzma.py +0 -0
  130. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/utils/compression/zlib.py +0 -0
  131. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/utils/encoding/__init__.py +0 -0
  132. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/utils/encoding/a85.py +0 -0
  133. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/utils/encoding/b16.py +0 -0
  134. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/utils/encoding/b3.py +0 -0
  135. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/utils/encoding/b32.py +0 -0
  136. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/utils/encoding/b32hex.py +0 -0
  137. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/utils/encoding/b64.py +0 -0
  138. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/utils/encoding/b85.py +0 -0
  139. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/utils/encoding/binascii.py +0 -0
  140. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/utils/encoding/snt.py +0 -0
  141. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/utils/encoding/whitespace.py +0 -0
  142. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/utils/entropy.py +0 -0
  143. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/utils/extract_names.py +0 -0
  144. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/utils/format.py +0 -0
  145. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/utils/generator/__init__.py +0 -0
  146. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/utils/generator/advanced.py +0 -0
  147. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/utils/generator/base.py +0 -0
  148. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/utils/generator/basic.py +0 -0
  149. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/utils/generator/comments.py +0 -0
  150. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/utils/generator/comments.txt +0 -0
  151. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/utils/generator/names.txt +0 -0
  152. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/utils/generator/unicode.py +0 -0
  153. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/utils/se/__init__.py +0 -0
  154. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/utils/se/homoglyphs.py +0 -0
  155. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/utils/se/homoglyphs.txt +0 -0
  156. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/utils/stegano/__init__.py +0 -0
  157. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/utils/stegano/ipv6encoding.py +0 -0
  158. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/utils/stegano/macencoding.py +0 -0
  159. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/utils/stegano/uuidencoding.py +0 -0
  160. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/pof/utils/tokens.py +0 -0
  161. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/python_obfuscation_framework.egg-info/dependency_links.txt +0 -0
  162. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/python_obfuscation_framework.egg-info/entry_points.txt +0 -0
  163. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/python_obfuscation_framework.egg-info/requires.txt +0 -0
  164. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/python_obfuscation_framework.egg-info/top_level.txt +0 -0
  165. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/setup.cfg +0 -0
  166. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/tests/__init__.py +0 -0
  167. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/tests/obfuscator/__init__.py +0 -0
  168. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/tests/obfuscator/fixtures/__init__.py +0 -0
  169. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/tests/obfuscator/fixtures/complex.py +0 -0
  170. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/tests/obfuscator/fixtures/moderate.py +0 -0
  171. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/tests/obfuscator/fixtures/multiline_strings.py +0 -0
  172. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/tests/obfuscator/fixtures/simple.py +0 -0
  173. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/tests/obfuscator/test_edge_cases.py +0 -0
  174. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/tests/obfuscator/test_integration.py +0 -0
  175. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/tests/obfuscator/utils.py +0 -0
  176. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/tests/pyproject.toml +0 -0
  177. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/tests/utils/__init__.py +0 -0
  178. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/tests/utils/se/__init__.py +0 -0
  179. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/tests/utils/se/test_homoglyphs.py +0 -0
  180. {python_obfuscation_framework-1.9.2 → python_obfuscation_framework-1.9.3}/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.3
4
4
  Summary: Python Obfuscation Framework
5
5
  Author-email: deoktr <35725720+deoktr@users.noreply.github.com>
6
6
  Maintainer-email: deoktr <35725720+deoktr@users.noreply.github.com>
@@ -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
@@ -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
@@ -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
@@ -76,6 +77,7 @@ __all__ = [
76
77
  "CharFromDocObfuscator",
77
78
  "CommentsObfuscator",
78
79
  "ConstantsObfuscator",
80
+ "ControlFlowFlattenObfuscator",
79
81
  "DeepEncryptionObfuscator",
80
82
  "DefinitionsObfuscator",
81
83
  "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)):
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
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "python-obfuscation-framework"
7
- version = "1.9.2"
7
+ version = "1.9.3"
8
8
  description = "Python Obfuscation Framework"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -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.3
4
4
  Summary: Python Obfuscation Framework
5
5
  Author-email: deoktr <35725720+deoktr@users.noreply.github.com>
6
6
  Maintainer-email: deoktr <35725720+deoktr@users.noreply.github.com>
@@ -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
@@ -70,6 +70,8 @@ pof/obfuscator/compression/bz2.py
70
70
  pof/obfuscator/compression/gzip.py
71
71
  pof/obfuscator/compression/lzma.py
72
72
  pof/obfuscator/compression/zlib.py
73
+ pof/obfuscator/controlflow/__init__.py
74
+ pof/obfuscator/controlflow/control_flow_flatten.py
73
75
  pof/obfuscator/encoding/__init__.py
74
76
  pof/obfuscator/encoding/a85.py
75
77
  pof/obfuscator/encoding/b16.py
@@ -31,6 +31,7 @@ from pof.obfuscator import (
31
31
  CharFromDocObfuscator,
32
32
  CommentsObfuscator,
33
33
  ConstantsObfuscator,
34
+ ControlFlowFlattenObfuscator,
34
35
  DeepEncryptionObfuscator,
35
36
  DefinitionsObfuscator,
36
37
  DocstringObfuscator,
@@ -222,6 +223,11 @@ OBFUSCATOR_REGISTRY: list[ObfuscatorEntry] = [
222
223
  ObfuscatorEntry(BuiltinsObfuscator, "BuiltinsObfuscator", "other"),
223
224
  ObfuscatorEntry(NumberObfuscator, "NumberObfuscator", "other"),
224
225
  ObfuscatorEntry(StringsObfuscator, "StringsObfuscator", "other"),
226
+ ObfuscatorEntry(
227
+ ControlFlowFlattenObfuscator,
228
+ "ControlFlowFlattenObfuscator",
229
+ "other",
230
+ ),
225
231
  # other
226
232
  ObfuscatorEntry(TokensObfuscator, "TokensObfuscator", "other"),
227
233
  ]
@@ -267,12 +273,7 @@ FIXTURES: list[SourceFixture] = [
267
273
  name="multiline_strings",
268
274
  path=str(FIXTURES_DIR / "multiline_strings.py"),
269
275
  expected_output=(
270
- "helloworld\n"
271
- "foobar\n"
272
- "onetwothree\n"
273
- "helloworld\n"
274
- "helloworld\n"
275
- "abc\n"
276
+ "helloworld\nfoobar\nonetwothree\nhelloworld\nhelloworld\nabc\n"
276
277
  ),
277
278
  ),
278
279
  ]