python-obfuscation-framework 1.7.5__tar.gz → 1.9.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 (192) hide show
  1. {python_obfuscation_framework-1.7.5/python_obfuscation_framework.egg-info → python_obfuscation_framework-1.9.0}/PKG-INFO +38 -74
  2. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/README.md +37 -73
  3. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/main.py +21 -5
  4. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/__init__.py +4 -0
  5. python_obfuscation_framework-1.9.0/pof/obfuscator/boolean.py +144 -0
  6. python_obfuscation_framework-1.9.0/pof/obfuscator/variables.py +116 -0
  7. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pyproject.toml +1 -1
  8. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0/python_obfuscation_framework.egg-info}/PKG-INFO +38 -74
  9. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/python_obfuscation_framework.egg-info/SOURCES.txt +3 -0
  10. python_obfuscation_framework-1.9.0/tests/obfuscator/test_boolean.py +35 -0
  11. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/LICENSE +0 -0
  12. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/MANIFEST.in +0 -0
  13. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/__init__.py +0 -0
  14. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/__main__.py +0 -0
  15. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/cli.py +0 -0
  16. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/cli_v2.py +0 -0
  17. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/errors.py +0 -0
  18. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/evasion/__init__.py +0 -0
  19. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/evasion/argv.py +0 -0
  20. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/evasion/base.py +0 -0
  21. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/evasion/cpu/__init__.py +0 -0
  22. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/evasion/cpu/cpu_count.py +0 -0
  23. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/evasion/fs/__init__.py +0 -0
  24. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/evasion/fs/directory_exist.py +0 -0
  25. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/evasion/fs/directory_list_exist.py +0 -0
  26. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/evasion/fs/directory_list_missing.py +0 -0
  27. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/evasion/fs/directory_missing.py +0 -0
  28. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/evasion/fs/exec_method.py +0 -0
  29. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/evasion/fs/executable_path.py +0 -0
  30. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/evasion/fs/file_exist.py +0 -0
  31. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/evasion/fs/file_list_exist.py +0 -0
  32. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/evasion/fs/file_list_missing.py +0 -0
  33. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/evasion/fs/file_missing.py +0 -0
  34. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/evasion/fs/tmp.py +0 -0
  35. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/evasion/hardware/__init__.py +0 -0
  36. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/evasion/hardware/ram_count.py +0 -0
  37. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/evasion/hooks/__init__.py +0 -0
  38. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/evasion/hooks/debugger.py +0 -0
  39. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/evasion/hooks/tracemalloc.py +0 -0
  40. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/evasion/human/__init__.py +0 -0
  41. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/evasion/human/p.py +0 -0
  42. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/evasion/human/prompt.py +0 -0
  43. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/evasion/integrity.py +0 -0
  44. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/evasion/multi.py +0 -0
  45. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/evasion/os/__init__.py +0 -0
  46. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/evasion/os/domain.py +0 -0
  47. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/evasion/os/hostname.py +0 -0
  48. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/evasion/os/uid.py +0 -0
  49. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/evasion/os/username.py +0 -0
  50. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/evasion/processes/__init__.py +0 -0
  51. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/evasion/processes/proc_count.py +0 -0
  52. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/evasion/time/__init__.py +0 -0
  53. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/evasion/time/expire.py +0 -0
  54. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/evasion/time/uptime.py +0 -0
  55. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/evasion/time/utc.py +0 -0
  56. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/evasion/utils.py +0 -0
  57. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/logger.py +0 -0
  58. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/builtins.py +0 -0
  59. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/cipher/__init__.py +0 -0
  60. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/cipher/deep_encryption.py +0 -0
  61. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/cipher/rc4.py +0 -0
  62. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/cipher/shift.py +0 -0
  63. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/cipher/xor.py +0 -0
  64. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/compression/__init__.py +0 -0
  65. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/compression/bz2.py +0 -0
  66. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/compression/gzip.py +0 -0
  67. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/compression/lzma.py +0 -0
  68. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/compression/zlib.py +0 -0
  69. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/constants.py +0 -0
  70. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/definitions.py +0 -0
  71. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/encoding/__init__.py +0 -0
  72. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/encoding/a85.py +0 -0
  73. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/encoding/b16.py +0 -0
  74. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/encoding/b32.py +0 -0
  75. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/encoding/b32hex.py +0 -0
  76. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/encoding/b64.py +0 -0
  77. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/encoding/b85.py +0 -0
  78. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/encoding/binascii.py +0 -0
  79. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/encoding/snt.py +0 -0
  80. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/encoding/whitespace.py +0 -0
  81. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/esoteric/__init__.py +0 -0
  82. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/esoteric/call.py +0 -0
  83. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/esoteric/doc.py +0 -0
  84. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/esoteric/globals.py +0 -0
  85. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/esoteric/imports.py +0 -0
  86. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/extract_variables.py +0 -0
  87. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/junk/__init__.py +0 -0
  88. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/junk/add_comments.py +0 -0
  89. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/junk/add_newlines.py +0 -0
  90. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/names.py +0 -0
  91. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/names_rope.py +0 -0
  92. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/numbers.py +0 -0
  93. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/other/__init__.py +0 -0
  94. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/other/tokens.py +0 -0
  95. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/remove/__init__.py +0 -0
  96. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/remove/comments.py +0 -0
  97. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/remove/exceptions.py +0 -0
  98. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/remove/indents.py +0 -0
  99. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/remove/loggings.py +0 -0
  100. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/remove/loggings_old.py +0 -0
  101. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/remove/newline.py +0 -0
  102. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/remove/print.py +0 -0
  103. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/restructure.py +0 -0
  104. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/stegano/__init__.py +0 -0
  105. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/stegano/docstrings.py +0 -0
  106. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/stegano/ipv6encoding.py +0 -0
  107. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/stegano/macencoding.py +0 -0
  108. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/stegano/uuidencoding.py +0 -0
  109. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/obfuscator/strings.py +0 -0
  110. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/stager/__init__.py +0 -0
  111. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/stager/cipher/__init__.py +0 -0
  112. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/stager/cipher/rc4.py +0 -0
  113. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/stager/download.py +0 -0
  114. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/stager/image.py +0 -0
  115. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/stager/lots/__init__.py +0 -0
  116. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/stager/lots/cl1pnet.py +0 -0
  117. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/stager/lots/pastebin.py +0 -0
  118. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/stager/lots/pasters.py +0 -0
  119. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/stager/quine.py +0 -0
  120. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/utils/__init__.py +0 -0
  121. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/utils/cipher/__init__.py +0 -0
  122. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/utils/cipher/rc4.py +0 -0
  123. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/utils/cipher/shift.py +0 -0
  124. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/utils/compression/__init__.py +0 -0
  125. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/utils/compression/bz2.py +0 -0
  126. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/utils/compression/gzip.py +0 -0
  127. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/utils/compression/lzma.py +0 -0
  128. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/utils/compression/zlib.py +0 -0
  129. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/utils/encoding/__init__.py +0 -0
  130. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/utils/encoding/a85.py +0 -0
  131. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/utils/encoding/b16.py +0 -0
  132. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/utils/encoding/b3.py +0 -0
  133. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/utils/encoding/b32.py +0 -0
  134. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/utils/encoding/b32hex.py +0 -0
  135. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/utils/encoding/b64.py +0 -0
  136. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/utils/encoding/b85.py +0 -0
  137. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/utils/encoding/binascii.py +0 -0
  138. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/utils/encoding/snt.py +0 -0
  139. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/utils/encoding/whitespace.py +0 -0
  140. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/utils/entropy.py +0 -0
  141. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/utils/extract_names.py +0 -0
  142. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/utils/format.py +0 -0
  143. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/utils/generator/__init__.py +0 -0
  144. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/utils/generator/advanced.py +0 -0
  145. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/utils/generator/base.py +0 -0
  146. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/utils/generator/basic.py +0 -0
  147. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/utils/generator/comments.py +0 -0
  148. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/utils/generator/comments.txt +0 -0
  149. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/utils/generator/names.txt +0 -0
  150. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/utils/generator/unicode.py +0 -0
  151. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/utils/se/__init__.py +0 -0
  152. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/utils/se/homoglyphs.py +0 -0
  153. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/utils/se/homoglyphs.txt +0 -0
  154. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/utils/stegano/__init__.py +0 -0
  155. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/utils/stegano/ipv6encoding.py +0 -0
  156. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/utils/stegano/macencoding.py +0 -0
  157. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/utils/stegano/uuidencoding.py +0 -0
  158. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/pof/utils/tokens.py +0 -0
  159. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/python_obfuscation_framework.egg-info/dependency_links.txt +0 -0
  160. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/python_obfuscation_framework.egg-info/entry_points.txt +0 -0
  161. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/python_obfuscation_framework.egg-info/requires.txt +0 -0
  162. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/python_obfuscation_framework.egg-info/top_level.txt +0 -0
  163. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/setup.cfg +0 -0
  164. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/tests/__init__.py +0 -0
  165. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/tests/obfuscator/__init__.py +0 -0
  166. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/tests/obfuscator/test_a85.py +0 -0
  167. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/tests/obfuscator/test_b16.py +0 -0
  168. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/tests/obfuscator/test_b32.py +0 -0
  169. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/tests/obfuscator/test_b32hex.py +0 -0
  170. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/tests/obfuscator/test_b64.py +0 -0
  171. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/tests/obfuscator/test_b85.py +0 -0
  172. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/tests/obfuscator/test_binascii.py +0 -0
  173. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/tests/obfuscator/test_call.py +0 -0
  174. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/tests/obfuscator/test_comments.py +0 -0
  175. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/tests/obfuscator/test_doc.py +0 -0
  176. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/tests/obfuscator/test_docstrings.py +0 -0
  177. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/tests/obfuscator/test_exceptions.py +0 -0
  178. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/tests/obfuscator/test_ipv6encoding.py +0 -0
  179. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/tests/obfuscator/test_names/code/out.py +0 -0
  180. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/tests/obfuscator/test_names/code/source.py +0 -0
  181. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/tests/obfuscator/test_names/test_names.py +0 -0
  182. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/tests/obfuscator/test_number.py +0 -0
  183. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/tests/obfuscator/test_print.py +0 -0
  184. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/tests/obfuscator/test_snt.py +0 -0
  185. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/tests/obfuscator/test_tokens.py +0 -0
  186. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/tests/obfuscator/test_xor.py +0 -0
  187. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/tests/obfuscator/utils.py +0 -0
  188. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/tests/pyproject.toml +0 -0
  189. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/tests/utils/__init__.py +0 -0
  190. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/tests/utils/se/__init__.py +0 -0
  191. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.0}/tests/utils/se/test_homoglyphs.py +0 -0
  192. {python_obfuscation_framework-1.7.5 → python_obfuscation_framework-1.9.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.7.5
3
+ Version: 1.9.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>
@@ -190,6 +190,15 @@ to
190
190
  on virus total:
191
191
  ![](./examples/images/lazarus.png)
192
192
 
193
+ Obfuscating
194
+ [RedTigerStealer](https://bazaar.abuse.ch/sample/9b4c37e3e994ad0222740e4c51dae48cc415957f8ad066da25e977e5031fa374/)
195
+ we go from
196
+ [26/63](https://www.virustotal.com/gui/file/9b4c37e3e994ad0222740e4c51dae48cc415957f8ad066da25e977e5031fa374)
197
+ to
198
+ [1/62](https://www.virustotal.com/gui/file/5616cb69576b11fa4a024023bcf0f66e66b84f426067e597075dfcbba945d5e3)
199
+ on virus total:
200
+ ![](./examples/images/red_tiger_stealer.png)
201
+
193
202
  Obfuscating [BTC-Clipper](https://github.com/NightfallGT/BTC-Clipper), we go
194
203
  from
195
204
  [13/64](https://www.virustotal.com/gui/file/9817d8de9bf7d2740b5b66e30ec1afdd98d7d119074a61cbba05514d4ebdc149)
@@ -217,17 +226,13 @@ on virus total:
217
226
 
218
227
  ## Install
219
228
 
220
- There are multiple installation options, with PIP, a virtualenv, a container, or with Nix.
221
-
222
- There is also the option to run the web server, see [server/README.md](./server/README.md).
223
-
224
- And you can try it without installing anything:
229
+ You can install POF with pip install, inside a container or try it online at [pof.run](https://pof.run):
225
230
 
226
231
  ```bash
227
232
  echo 'print("Hello, world!")' | curl -X POST -d @- https://pof.run
228
233
  ```
229
234
 
230
- ### 1. PIP
235
+ ### PIP
231
236
 
232
237
  From [pypi](https://pypi.org/project/python-obfuscation-framework):
233
238
 
@@ -235,31 +240,16 @@ From [pypi](https://pypi.org/project/python-obfuscation-framework):
235
240
  pip install python-obfuscation-framework
236
241
  ```
237
242
 
238
- ### 2. Source
239
-
240
- Install from source inside a virtual env:
243
+ ### Docker
241
244
 
242
245
  ```bash
243
- git clone https://github.com/deoktr/pof
244
- cd pof
245
- python -m venv venv
246
- source ./venv/bin/activate
247
- pip install .
248
- ```
249
-
250
- This will install pof inside a virtual env, so you'll need to activate it every time you want to use it.
251
-
252
- ### 3. Docker
253
-
254
- ```bash
255
- docker pull ghcr.io/deoktr/pof:latest
256
246
  docker run --rm ghcr.io/deoktr/pof:latest --help
257
247
  ```
258
248
 
259
249
  Run inside Docker from a local file `in.py`:
260
250
 
261
251
  ```bash
262
- docker run --rm -v $(pwd):/tmp ghcr.io/deoktr/pof:latest /tmp/in.py -o /tmp/out.py
252
+ docker run --rm -v $(pwd):/tmp -w /tmp ghcr.io/deoktr/pof:latest in.py -o out.py
263
253
  ```
264
254
 
265
255
  Or pipe input and output:
@@ -268,29 +258,6 @@ Or pipe input and output:
268
258
  cat in.py | docker run --rm -i ghcr.io/deoktr/pof:latest > out.py
269
259
  ```
270
260
 
271
- ### 4. Docker Source
272
-
273
- ```bash
274
- git clone https://github.com/deoktr/pof
275
- cd pof
276
- docker build -t pof .
277
- docker run --rm pof --help
278
- ```
279
-
280
- Run inside Docker from a local file `in.py`:
281
-
282
- ```bash
283
- docker run --rm -v $(pwd):/tmp pof /tmp/in.py -o /tmp/out.py
284
- ```
285
-
286
- ### 5. Nix
287
-
288
- From [github.com/onix-sec/nixsecpkgs](https://github.com/onix-sec/nixsecpkgs):
289
-
290
- ```bash
291
- nix shell github:onix-sec/nixsecpkgs#pof
292
- ```
293
-
294
261
  ## Usage
295
262
 
296
263
  ```bash
@@ -346,51 +313,48 @@ echo "print('Hello, world')" | pof -f obfuscator -k UUIDObfuscator | python
346
313
 
347
314
  ### Obfuscator
348
315
 
349
- `NamesObfuscator` the most basic obfuscator is renaming variables, classes, functions, and imports.
316
+ `VariablesObfuscator` the most basic obfuscator will rename variables.
350
317
 
351
318
  Source in `examples/source.py`.
352
319
 
353
320
  ```python
354
- import os as pT2Ic6
321
+ import os
355
322
 
356
- def SeIpTxc():
323
+ def get_linux_release_info():
357
324
  """Get Linux release info from /etc/os-release."""
358
- pDkFbLZO = '/etc/os-release'
359
- if not pT2Ic6.path.exists(pDkFbLZO):
325
+ uggNx = '/etc/os-release'
326
+ if not os.path.exists(uggNx):
360
327
  print('OS release file not found. This might not be a Linux system.')
361
328
  return None
362
- rDq = {}
329
+ LY3mN = {}
363
330
  try:
364
- with open(pDkFbLZO, 'r') as bpBm:
365
- for UOFvQ in bpBm:
366
- if not UOFvQ or '=' not in UOFvQ:
331
+ with open(uggNx, 'r') as kj0:
332
+ for Stv9o in kj0:
333
+ if not Stv9o or '=' not in Stv9o:
367
334
  continue
368
- aSFP, UUka_V_7 = UOFvQ.ObwKdQ6LVz().g54Qp('=', 1)
369
- UUka_V_7 = UUka_V_7.ObwKdQ6LVz('"\'\n')
370
- rDq[aSFP] = UUka_V_7
335
+ l0j, QE5kCKYwMe = Stv9o.strip().split('=', 1)
336
+ QE5kCKYwMe = QE5kCKYwMe.strip('"\'\n')
337
+ LY3mN[l0j] = QE5kCKYwMe
371
338
  print('\nLinux Release Information:')
372
- print(f"Distribution: {rDq.IDiXt2('NAME', 'Unknown')}")
373
- print(f"Version: {rDq.IDiXt2('VERSION', 'Unknown')}")
374
- print(f"Version ID: {rDq.IDiXt2('VERSION_ID', 'Unknown')}")
375
- print(f"Pretty Name: {rDq.IDiXt2('PRETTY_NAME', 'Unknown')}")
376
- return rDq
377
- except Exception as FXfc:
378
- print(f'Error reading release file: {FXfc}')
339
+ print(f"Distribution: {LY3mN.get('NAME', 'Unknown')}")
340
+ print(f"Version: {LY3mN.get('VERSION', 'Unknown')}")
341
+ print(f"Version ID: {LY3mN.get('VERSION_ID', 'Unknown')}")
342
+ print(f"Pretty Name: {LY3mN.get('PRETTY_NAME', 'Unknown')}")
343
+ return LY3mN
344
+ except Exception as e:
345
+ print(f'Error reading release file: {e}')
379
346
  return None
380
347
  if __name__ == '__main__':
381
- if pT2Ic6.name == 'posix' and pT2Ic6.path.exists('/etc/os-release'):
382
- Sd65C = SeIpTxc()
348
+ if os.name == 'posix' and os.path.exists('/etc/os-release'):
349
+ E_R72 = get_linux_release_info()
383
350
  else:
384
351
  print('This script is designed for Linux systems.')
385
352
  ```
386
353
 
387
- > [!WARNING]
388
- > Right now this obfuscator can fail under very specific circumstances, see `pof/obfuscator/names.py`.
389
-
390
- An alternative is `DefinitionsObfuscator`, that will only obfuscate function declarations.
354
+ `DefinitionsObfuscator` obfuscate function names.
391
355
 
392
- > [!NOTE]
393
- > There is an alternative implementation at `NamesRopeObfuscator` that uses `rope`, it's a work in progress and currently does not obfuscate variables declared inside functions.
356
+ > [!WARNING]
357
+ > `NamesObfuscator` obfuscator is renaming variables, classes, functions, and imports. Right now this obfuscator can fail under very specific circumstances, see `pof/obfuscator/names.py`. There is an alternative implementation at `NamesRopeObfuscator` that uses `rope`, it's a work in progress and currently does not obfuscate variables declared inside functions.
394
358
 
395
359
  Other very basic obfuscation functions are done by specific obfuscators like:
396
360
 
@@ -145,6 +145,15 @@ to
145
145
  on virus total:
146
146
  ![](./examples/images/lazarus.png)
147
147
 
148
+ Obfuscating
149
+ [RedTigerStealer](https://bazaar.abuse.ch/sample/9b4c37e3e994ad0222740e4c51dae48cc415957f8ad066da25e977e5031fa374/)
150
+ we go from
151
+ [26/63](https://www.virustotal.com/gui/file/9b4c37e3e994ad0222740e4c51dae48cc415957f8ad066da25e977e5031fa374)
152
+ to
153
+ [1/62](https://www.virustotal.com/gui/file/5616cb69576b11fa4a024023bcf0f66e66b84f426067e597075dfcbba945d5e3)
154
+ on virus total:
155
+ ![](./examples/images/red_tiger_stealer.png)
156
+
148
157
  Obfuscating [BTC-Clipper](https://github.com/NightfallGT/BTC-Clipper), we go
149
158
  from
150
159
  [13/64](https://www.virustotal.com/gui/file/9817d8de9bf7d2740b5b66e30ec1afdd98d7d119074a61cbba05514d4ebdc149)
@@ -172,17 +181,13 @@ on virus total:
172
181
 
173
182
  ## Install
174
183
 
175
- There are multiple installation options, with PIP, a virtualenv, a container, or with Nix.
176
-
177
- There is also the option to run the web server, see [server/README.md](./server/README.md).
178
-
179
- And you can try it without installing anything:
184
+ You can install POF with pip install, inside a container or try it online at [pof.run](https://pof.run):
180
185
 
181
186
  ```bash
182
187
  echo 'print("Hello, world!")' | curl -X POST -d @- https://pof.run
183
188
  ```
184
189
 
185
- ### 1. PIP
190
+ ### PIP
186
191
 
187
192
  From [pypi](https://pypi.org/project/python-obfuscation-framework):
188
193
 
@@ -190,31 +195,16 @@ From [pypi](https://pypi.org/project/python-obfuscation-framework):
190
195
  pip install python-obfuscation-framework
191
196
  ```
192
197
 
193
- ### 2. Source
194
-
195
- Install from source inside a virtual env:
198
+ ### Docker
196
199
 
197
200
  ```bash
198
- git clone https://github.com/deoktr/pof
199
- cd pof
200
- python -m venv venv
201
- source ./venv/bin/activate
202
- pip install .
203
- ```
204
-
205
- This will install pof inside a virtual env, so you'll need to activate it every time you want to use it.
206
-
207
- ### 3. Docker
208
-
209
- ```bash
210
- docker pull ghcr.io/deoktr/pof:latest
211
201
  docker run --rm ghcr.io/deoktr/pof:latest --help
212
202
  ```
213
203
 
214
204
  Run inside Docker from a local file `in.py`:
215
205
 
216
206
  ```bash
217
- docker run --rm -v $(pwd):/tmp ghcr.io/deoktr/pof:latest /tmp/in.py -o /tmp/out.py
207
+ docker run --rm -v $(pwd):/tmp -w /tmp ghcr.io/deoktr/pof:latest in.py -o out.py
218
208
  ```
219
209
 
220
210
  Or pipe input and output:
@@ -223,29 +213,6 @@ Or pipe input and output:
223
213
  cat in.py | docker run --rm -i ghcr.io/deoktr/pof:latest > out.py
224
214
  ```
225
215
 
226
- ### 4. Docker Source
227
-
228
- ```bash
229
- git clone https://github.com/deoktr/pof
230
- cd pof
231
- docker build -t pof .
232
- docker run --rm pof --help
233
- ```
234
-
235
- Run inside Docker from a local file `in.py`:
236
-
237
- ```bash
238
- docker run --rm -v $(pwd):/tmp pof /tmp/in.py -o /tmp/out.py
239
- ```
240
-
241
- ### 5. Nix
242
-
243
- From [github.com/onix-sec/nixsecpkgs](https://github.com/onix-sec/nixsecpkgs):
244
-
245
- ```bash
246
- nix shell github:onix-sec/nixsecpkgs#pof
247
- ```
248
-
249
216
  ## Usage
250
217
 
251
218
  ```bash
@@ -301,51 +268,48 @@ echo "print('Hello, world')" | pof -f obfuscator -k UUIDObfuscator | python
301
268
 
302
269
  ### Obfuscator
303
270
 
304
- `NamesObfuscator` the most basic obfuscator is renaming variables, classes, functions, and imports.
271
+ `VariablesObfuscator` the most basic obfuscator will rename variables.
305
272
 
306
273
  Source in `examples/source.py`.
307
274
 
308
275
  ```python
309
- import os as pT2Ic6
276
+ import os
310
277
 
311
- def SeIpTxc():
278
+ def get_linux_release_info():
312
279
  """Get Linux release info from /etc/os-release."""
313
- pDkFbLZO = '/etc/os-release'
314
- if not pT2Ic6.path.exists(pDkFbLZO):
280
+ uggNx = '/etc/os-release'
281
+ if not os.path.exists(uggNx):
315
282
  print('OS release file not found. This might not be a Linux system.')
316
283
  return None
317
- rDq = {}
284
+ LY3mN = {}
318
285
  try:
319
- with open(pDkFbLZO, 'r') as bpBm:
320
- for UOFvQ in bpBm:
321
- if not UOFvQ or '=' not in UOFvQ:
286
+ with open(uggNx, 'r') as kj0:
287
+ for Stv9o in kj0:
288
+ if not Stv9o or '=' not in Stv9o:
322
289
  continue
323
- aSFP, UUka_V_7 = UOFvQ.ObwKdQ6LVz().g54Qp('=', 1)
324
- UUka_V_7 = UUka_V_7.ObwKdQ6LVz('"\'\n')
325
- rDq[aSFP] = UUka_V_7
290
+ l0j, QE5kCKYwMe = Stv9o.strip().split('=', 1)
291
+ QE5kCKYwMe = QE5kCKYwMe.strip('"\'\n')
292
+ LY3mN[l0j] = QE5kCKYwMe
326
293
  print('\nLinux Release Information:')
327
- print(f"Distribution: {rDq.IDiXt2('NAME', 'Unknown')}")
328
- print(f"Version: {rDq.IDiXt2('VERSION', 'Unknown')}")
329
- print(f"Version ID: {rDq.IDiXt2('VERSION_ID', 'Unknown')}")
330
- print(f"Pretty Name: {rDq.IDiXt2('PRETTY_NAME', 'Unknown')}")
331
- return rDq
332
- except Exception as FXfc:
333
- print(f'Error reading release file: {FXfc}')
294
+ print(f"Distribution: {LY3mN.get('NAME', 'Unknown')}")
295
+ print(f"Version: {LY3mN.get('VERSION', 'Unknown')}")
296
+ print(f"Version ID: {LY3mN.get('VERSION_ID', 'Unknown')}")
297
+ print(f"Pretty Name: {LY3mN.get('PRETTY_NAME', 'Unknown')}")
298
+ return LY3mN
299
+ except Exception as e:
300
+ print(f'Error reading release file: {e}')
334
301
  return None
335
302
  if __name__ == '__main__':
336
- if pT2Ic6.name == 'posix' and pT2Ic6.path.exists('/etc/os-release'):
337
- Sd65C = SeIpTxc()
303
+ if os.name == 'posix' and os.path.exists('/etc/os-release'):
304
+ E_R72 = get_linux_release_info()
338
305
  else:
339
306
  print('This script is designed for Linux systems.')
340
307
  ```
341
308
 
342
- > [!WARNING]
343
- > Right now this obfuscator can fail under very specific circumstances, see `pof/obfuscator/names.py`.
344
-
345
- An alternative is `DefinitionsObfuscator`, that will only obfuscate function declarations.
309
+ `DefinitionsObfuscator` obfuscate function names.
346
310
 
347
- > [!NOTE]
348
- > There is an alternative implementation at `NamesRopeObfuscator` that uses `rope`, it's a work in progress and currently does not obfuscate variables declared inside functions.
311
+ > [!WARNING]
312
+ > `NamesObfuscator` obfuscator is renaming variables, classes, functions, and imports. Right now this obfuscator can fail under very specific circumstances, see `pof/obfuscator/names.py`. There is an alternative implementation at `NamesRopeObfuscator` that uses `rope`, it's a work in progress and currently does not obfuscate variables declared inside functions.
349
313
 
350
314
  Other very basic obfuscation functions are done by specific obfuscators like:
351
315
 
@@ -41,6 +41,7 @@ from pof.evasion.utils import FILE_SYSTEM
41
41
  from pof.logger import logger
42
42
  from pof.obfuscator import (
43
43
  AddCommentsObfuscator,
44
+ BooleanObfuscator,
44
45
  BuiltinsObfuscator,
45
46
  CommentsObfuscator,
46
47
  ConstantsObfuscator,
@@ -55,6 +56,7 @@ from pof.obfuscator import (
55
56
  NumberObfuscator,
56
57
  PrintObfuscator,
57
58
  StringsObfuscator,
59
+ VariablesObfuscator,
58
60
  XORObfuscator,
59
61
  )
60
62
  from pof.stager import ImageStager, RC4Stager
@@ -177,6 +179,8 @@ class Obfuscator(BaseObfuscator):
177
179
  # In this context, `baz` would be obfuscated, but it shouldn't because
178
180
  # the function is part of the `foo` imported module
179
181
  # tokens = NamesObfuscator(generator=generator).obfuscate_tokens(tokens)
182
+ # TODO: use alternative variable obfuscator using the AST
183
+ # tokens = VariablesObfuscator().obfuscate_tokens(tokens)
180
184
 
181
185
  tokens = GlobalsObfuscator().obfuscate_tokens(tokens)
182
186
  tokens = BuiltinsObfuscator().obfuscate_tokens(tokens)
@@ -195,9 +199,16 @@ class Obfuscator(BaseObfuscator):
195
199
 
196
200
  for _ in range(2):
197
201
  tokens = NumberObfuscator().obfuscate_tokens(tokens)
202
+
198
203
  tokens = BuiltinsObfuscator().obfuscate_tokens(tokens)
204
+
199
205
  for _ in range(2):
200
206
  tokens = string_obfuscator.obfuscate_tokens(tokens)
207
+
208
+ # TODO (deoktr): enable once fully tested
209
+ # for _ in range(2):
210
+ # tokens = BooleanObfuscator().obfuscate_tokens(tokens)
211
+
201
212
  tokens = AddCommentsObfuscator().obfuscate_tokens(tokens)
202
213
 
203
214
  # clean output
@@ -230,7 +241,9 @@ class Obfuscator(BaseObfuscator):
230
241
  tokens = self._get_tokens(source)
231
242
  tokens = CommentsObfuscator().obfuscate_tokens(tokens)
232
243
  generator = BasicGenerator.alphabet_generator()
233
- tokens = NamesObfuscator(generator=generator).obfuscate_tokens(tokens)
244
+ # tokens = NamesObfuscator(generator=generator).obfuscate_tokens(tokens)
245
+ tokens = VariablesObfuscator(generator=generator).obfuscate_tokens(tokens)
246
+ tokens = DefinitionsObfuscator(generator=generator).obfuscate_tokens(tokens)
234
247
  tokens = IndentsObfuscator().obfuscate_tokens(tokens)
235
248
  tokens = NewlineObfuscator().obfuscate_tokens(tokens)
236
249
  return self._untokenize(tokens)
@@ -305,7 +318,9 @@ class Obfuscator(BaseObfuscator):
305
318
  # # FIXME (deoktr): breaks if obf_builtins_rate=1 with NamesObfuscator
306
319
  # obf_builtins_rate=0,
307
320
  # ).obfuscate_tokens(tokens)
308
- tokens = NamesObfuscator(generator=generator).obfuscate_tokens(tokens)
321
+ # tokens = NamesObfuscator(generator=generator).obfuscate_tokens(tokens)
322
+ tokens = VariablesObfuscator(generator=generator).obfuscate_tokens(tokens)
323
+ tokens = DefinitionsObfuscator(generator=generator).obfuscate_tokens(tokens)
309
324
  tokens = ConstantsObfuscator(
310
325
  generator=generator,
311
326
  obf_number_rate=1,
@@ -370,9 +385,10 @@ class Obfuscator(BaseObfuscator):
370
385
 
371
386
  tokens = CommentsObfuscator().obfuscate_tokens(tokens)
372
387
  # tokens = DeepEncryptionEvasion().add_evasion(tokens) # TODO (deoktr): fix
373
- tokens = NamesObfuscator(
374
- generator=AdvancedGenerator.fixed_length_generator(),
375
- ).obfuscate_tokens(tokens)
388
+ # tokens = NamesObfuscator(
389
+ # generator=AdvancedGenerator.fixed_length_generator(),
390
+ # ).obfuscate_tokens(tokens)
391
+ tokens = BooleanObfuscator().obfuscate_tokens(tokens)
376
392
  tokens = IndentsObfuscator().obfuscate_tokens(tokens)
377
393
  tokens = NewlineObfuscator().obfuscate_tokens(tokens)
378
394
 
@@ -14,6 +14,7 @@
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
+ from .boolean import BooleanObfuscator
17
18
  from .builtins import BuiltinsObfuscator
18
19
  from .cipher.deep_encryption import DeepEncryptionObfuscator
19
20
  from .cipher.rc4 import RC4Obfuscator
@@ -56,6 +57,7 @@ from .stegano.ipv6encoding import IPv6Obfuscator
56
57
  from .stegano.macencoding import MACObfuscator
57
58
  from .stegano.uuidencoding import UUIDObfuscator
58
59
  from .strings import StringsObfuscator
60
+ from .variables import VariablesObfuscator
59
61
 
60
62
  __all__ = [
61
63
  "ASCII85Obfuscator",
@@ -67,6 +69,7 @@ __all__ = [
67
69
  "Base64Obfuscator",
68
70
  "Base85Obfuscator",
69
71
  "BinasciiObfuscator",
72
+ "BooleanObfuscator",
70
73
  "BuiltinsObfuscator",
71
74
  "Bz2Obfuscator",
72
75
  "CallObfuscator",
@@ -98,6 +101,7 @@ __all__ = [
98
101
  "StringsObfuscator",
99
102
  "TokensObfuscator",
100
103
  "UUIDObfuscator",
104
+ "VariablesObfuscator",
101
105
  "WhitespaceObfuscator",
102
106
  "XORObfuscator",
103
107
  "ZlibObfuscator",
@@ -0,0 +1,144 @@
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 random
18
+ from tokenize import LPAR, LSQB, NAME, NUMBER, RPAR, RSQB, STRING
19
+
20
+
21
+ class BooleanObfuscator:
22
+ """Obfuscate booleans with multiple methods."""
23
+
24
+ @staticmethod
25
+ def obf_true():
26
+ match random.randint(1, 6):
27
+ case 1:
28
+ # all([])
29
+ return [
30
+ (NAME, "all"),
31
+ (LPAR, "("),
32
+ (LSQB, "["),
33
+ (RSQB, "]"),
34
+ (RPAR, ")"),
35
+ ]
36
+ case 2:
37
+ # any([True])
38
+ return [
39
+ (NAME, "any"),
40
+ (LPAR, "("),
41
+ (LSQB, "["),
42
+ (NAME, "True"),
43
+ (RSQB, "]"),
44
+ (RPAR, ")"),
45
+ ]
46
+ case 3:
47
+ # not False
48
+ return [
49
+ (NAME, "not"),
50
+ (NAME, "False"),
51
+ ]
52
+ case 4:
53
+ # not not True
54
+ return [
55
+ (NAME, "not"),
56
+ (NAME, "not"),
57
+ (NAME, "True"),
58
+ ]
59
+ case 5:
60
+ # "" in ""
61
+ return [
62
+ (STRING, "''"),
63
+ (NAME, "in"),
64
+ (STRING, "''"),
65
+ ]
66
+ case 6:
67
+ # bool(1)
68
+ return [
69
+ (NAME, "bool"),
70
+ (LPAR, "("),
71
+ (NUMBER, "1"),
72
+ (RPAR, ")"),
73
+ ]
74
+
75
+ @staticmethod
76
+ def obf_false():
77
+ match random.randint(1, 6):
78
+ case 1:
79
+ # False = all([[]])
80
+ return [
81
+ (NAME, "all"),
82
+ (LPAR, "("),
83
+ (LSQB, "["),
84
+ (LSQB, "["),
85
+ (RSQB, "]"),
86
+ (RSQB, "]"),
87
+ (RPAR, ")"),
88
+ ]
89
+ case 2:
90
+ # all([False])
91
+ return [
92
+ (NAME, "all"),
93
+ (LPAR, "("),
94
+ (LSQB, "["),
95
+ (NAME, "False"),
96
+ (RSQB, "]"),
97
+ (RPAR, ")"),
98
+ ]
99
+ case 3:
100
+ # not True
101
+ return [
102
+ (NAME, "not"),
103
+ (NAME, "True"),
104
+ ]
105
+ case 4:
106
+ # not not False
107
+ return [
108
+ (NAME, "not"),
109
+ (NAME, "not"),
110
+ (NAME, "False"),
111
+ ]
112
+ case 5:
113
+ # "" not in ""
114
+ return [
115
+ (STRING, "''"),
116
+ (NAME, "not"),
117
+ (NAME, "in"),
118
+ (STRING, "''"),
119
+ ]
120
+ case 6:
121
+ # bool(0)
122
+ return [
123
+ (NAME, "bool"),
124
+ (LPAR, "("),
125
+ (NUMBER, "0"),
126
+ (RPAR, ")"),
127
+ ]
128
+
129
+ def obfuscate_boolean(self, tokval):
130
+ if tokval == "True":
131
+ return self.obf_true()
132
+ return self.obf_false()
133
+
134
+ def obfuscate_tokens(self, tokens):
135
+ result = []
136
+ for toknum, tokval, *_ in tokens:
137
+ new_tokens = [(toknum, tokval)]
138
+
139
+ if toknum == NAME and tokval in ["True", "False"]:
140
+ new_tokens = self.obfuscate_boolean(tokval)
141
+
142
+ if new_tokens:
143
+ result.extend(new_tokens)
144
+ return result