python-obfuscation-framework 1.12.0__tar.gz → 1.13.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 (254) hide show
  1. {python_obfuscation_framework-1.12.0/python_obfuscation_framework.egg-info → python_obfuscation_framework-1.13.0}/PKG-INFO +45 -14
  2. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/README.md +44 -13
  3. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/cli.py +2 -2
  4. python_obfuscation_framework-1.13.0/pof/evasion/__init__.py +162 -0
  5. python_obfuscation_framework-1.13.0/pof/evasion/base.py +138 -0
  6. python_obfuscation_framework-1.13.0/pof/evasion/debugger/breakpoint_hook.py +46 -0
  7. python_obfuscation_framework-1.13.0/pof/evasion/debugger/coverage.py +43 -0
  8. python_obfuscation_framework-1.13.0/pof/evasion/debugger/cprofile.py +46 -0
  9. {python_obfuscation_framework-1.12.0/pof/evasion/hooks → python_obfuscation_framework-1.13.0/pof/evasion/debugger}/debugger.py +5 -1
  10. python_obfuscation_framework-1.13.0/pof/evasion/debugger/linux_debug_process.py +76 -0
  11. python_obfuscation_framework-1.12.0/pof/evasion/hooks/tracemalloc.py → python_obfuscation_framework-1.13.0/pof/evasion/debugger/tracemalloc_evasion.py +5 -1
  12. python_obfuscation_framework-1.13.0/pof/evasion/debugger/win_debug_process.py +82 -0
  13. python_obfuscation_framework-1.13.0/pof/evasion/debugger/win_debugger.py +47 -0
  14. python_obfuscation_framework-1.13.0/pof/evasion/guardrails/__init__.py +0 -0
  15. {python_obfuscation_framework-1.12.0/pof/evasion → python_obfuscation_framework-1.13.0/pof/evasion/guardrails}/argv.py +4 -2
  16. {python_obfuscation_framework-1.12.0/pof/evasion/fs → python_obfuscation_framework-1.13.0/pof/evasion/guardrails}/directory_exist.py +5 -1
  17. {python_obfuscation_framework-1.12.0/pof/evasion/fs → python_obfuscation_framework-1.13.0/pof/evasion/guardrails}/directory_list_exist.py +5 -1
  18. {python_obfuscation_framework-1.12.0/pof/evasion/fs → python_obfuscation_framework-1.13.0/pof/evasion/guardrails}/directory_list_missing.py +5 -1
  19. {python_obfuscation_framework-1.12.0/pof/evasion/fs → python_obfuscation_framework-1.13.0/pof/evasion/guardrails}/directory_missing.py +5 -1
  20. {python_obfuscation_framework-1.12.0/pof/evasion/os → python_obfuscation_framework-1.13.0/pof/evasion/guardrails}/domain.py +5 -1
  21. python_obfuscation_framework-1.13.0/pof/evasion/guardrails/env_var.py +51 -0
  22. {python_obfuscation_framework-1.12.0/pof/evasion/time → python_obfuscation_framework-1.13.0/pof/evasion/guardrails}/expire.py +5 -1
  23. python_obfuscation_framework-1.13.0/pof/evasion/guardrails/file_content.py +62 -0
  24. {python_obfuscation_framework-1.12.0/pof/evasion/fs → python_obfuscation_framework-1.13.0/pof/evasion/guardrails}/file_exist.py +5 -1
  25. {python_obfuscation_framework-1.12.0/pof/evasion/fs → python_obfuscation_framework-1.13.0/pof/evasion/guardrails}/file_list_exist.py +5 -1
  26. {python_obfuscation_framework-1.12.0/pof/evasion/fs → python_obfuscation_framework-1.13.0/pof/evasion/guardrails}/file_list_missing.py +5 -1
  27. {python_obfuscation_framework-1.12.0/pof/evasion/fs → python_obfuscation_framework-1.13.0/pof/evasion/guardrails}/file_missing.py +5 -1
  28. python_obfuscation_framework-1.13.0/pof/evasion/guardrails/file_size.py +51 -0
  29. {python_obfuscation_framework-1.12.0/pof/evasion/os → python_obfuscation_framework-1.13.0/pof/evasion/guardrails}/hostname.py +5 -1
  30. python_obfuscation_framework-1.13.0/pof/evasion/guardrails/installed_software.py +61 -0
  31. {python_obfuscation_framework-1.12.0/pof/evasion → python_obfuscation_framework-1.13.0/pof/evasion/guardrails}/integrity.py +9 -5
  32. python_obfuscation_framework-1.13.0/pof/evasion/guardrails/ip_address.py +74 -0
  33. python_obfuscation_framework-1.13.0/pof/evasion/guardrails/language_locale.py +69 -0
  34. python_obfuscation_framework-1.13.0/pof/evasion/guardrails/mac_address.py +54 -0
  35. python_obfuscation_framework-1.13.0/pof/evasion/guardrails/prompt_base.py +27 -0
  36. python_obfuscation_framework-1.13.0/pof/evasion/guardrails/timezone.py +51 -0
  37. {python_obfuscation_framework-1.12.0/pof/evasion/os → python_obfuscation_framework-1.13.0/pof/evasion/guardrails}/uid.py +5 -1
  38. {python_obfuscation_framework-1.12.0/pof/evasion/os → python_obfuscation_framework-1.13.0/pof/evasion/guardrails}/username.py +5 -1
  39. python_obfuscation_framework-1.13.0/pof/evasion/guardrails/win_ad_domain.py +56 -0
  40. python_obfuscation_framework-1.13.0/pof/evasion/guardrails/win_privilege.py +48 -0
  41. python_obfuscation_framework-1.12.0/pof/evasion/human/prompt.py → python_obfuscation_framework-1.13.0/pof/evasion/guardrails/win_prompt.py +6 -35
  42. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/evasion/multi.py +4 -4
  43. python_obfuscation_framework-1.13.0/pof/evasion/sandbox/__init__.py +0 -0
  44. {python_obfuscation_framework-1.12.0/pof/evasion/cpu → python_obfuscation_framework-1.13.0/pof/evasion/sandbox}/cpu_count.py +5 -1
  45. python_obfuscation_framework-1.13.0/pof/evasion/sandbox/disk_size.py +56 -0
  46. python_obfuscation_framework-1.13.0/pof/evasion/sandbox/edr.py +140 -0
  47. {python_obfuscation_framework-1.12.0/pof/evasion/fs → python_obfuscation_framework-1.13.0/pof/evasion/sandbox}/exec_method.py +10 -3
  48. {python_obfuscation_framework-1.12.0/pof/evasion/fs → python_obfuscation_framework-1.13.0/pof/evasion/sandbox}/executable_path.py +5 -1
  49. python_obfuscation_framework-1.13.0/pof/evasion/sandbox/linux_mouse.py +72 -0
  50. python_obfuscation_framework-1.13.0/pof/evasion/sandbox/linux_process_list.py +76 -0
  51. python_obfuscation_framework-1.13.0/pof/evasion/sandbox/linux_sandbox_artifacts.py +74 -0
  52. python_obfuscation_framework-1.13.0/pof/evasion/sandbox/linux_screen_resolution.py +90 -0
  53. python_obfuscation_framework-1.13.0/pof/evasion/sandbox/linux_tmp_count.py +56 -0
  54. {python_obfuscation_framework-1.12.0/pof/evasion/processes → python_obfuscation_framework-1.13.0/pof/evasion/sandbox}/proc_count.py +5 -1
  55. {python_obfuscation_framework-1.12.0/pof/evasion/hardware → python_obfuscation_framework-1.13.0/pof/evasion/sandbox}/ram_count.py +5 -1
  56. python_obfuscation_framework-1.13.0/pof/evasion/sandbox/sandbox_hostname.py +56 -0
  57. python_obfuscation_framework-1.13.0/pof/evasion/sandbox/sandbox_username.py +60 -0
  58. python_obfuscation_framework-1.12.0/pof/evasion/fs/tmp.py → python_obfuscation_framework-1.13.0/pof/evasion/sandbox/tmp_count.py +5 -67
  59. {python_obfuscation_framework-1.12.0/pof/evasion/time → python_obfuscation_framework-1.13.0/pof/evasion/sandbox}/uptime.py +6 -2
  60. {python_obfuscation_framework-1.12.0/pof/evasion/time → python_obfuscation_framework-1.13.0/pof/evasion/sandbox}/utc.py +5 -1
  61. python_obfuscation_framework-1.13.0/pof/evasion/sandbox/vm_hypervisor.py +68 -0
  62. python_obfuscation_framework-1.13.0/pof/evasion/sandbox/win_mouse.py +51 -0
  63. python_obfuscation_framework-1.13.0/pof/evasion/sandbox/win_proc_count.py +70 -0
  64. python_obfuscation_framework-1.13.0/pof/evasion/sandbox/win_process_list.py +81 -0
  65. python_obfuscation_framework-1.13.0/pof/evasion/sandbox/win_ram_count.py +74 -0
  66. python_obfuscation_framework-1.13.0/pof/evasion/sandbox/win_registry_vm.py +76 -0
  67. python_obfuscation_framework-1.13.0/pof/evasion/sandbox/win_sandbox_artifacts.py +77 -0
  68. python_obfuscation_framework-1.13.0/pof/evasion/sandbox/win_screen_resolution.py +55 -0
  69. python_obfuscation_framework-1.13.0/pof/evasion/sandbox/win_tmp_count.py +56 -0
  70. python_obfuscation_framework-1.13.0/pof/evasion/sandbox/win_uptime.py +52 -0
  71. python_obfuscation_framework-1.13.0/pof/evasion/special/__init__.py +0 -0
  72. python_obfuscation_framework-1.13.0/pof/evasion/special/cicd.py +77 -0
  73. python_obfuscation_framework-1.13.0/pof/evasion/special/jupyter.py +49 -0
  74. python_obfuscation_framework-1.13.0/pof/evasion/special/linux_docker.py +72 -0
  75. python_obfuscation_framework-1.13.0/pof/evasion/special/linux_kubernetes.py +62 -0
  76. python_obfuscation_framework-1.13.0/pof/evasion/special/linux_wsl.py +65 -0
  77. python_obfuscation_framework-1.13.0/pof/evasion/special/serverless.py +68 -0
  78. python_obfuscation_framework-1.13.0/pof/evasion/special/win_container.py +63 -0
  79. python_obfuscation_framework-1.13.0/pof/evasion/special/win_hyper_v.py +46 -0
  80. python_obfuscation_framework-1.13.0/pof/evasion/special/win_sandbox_env.py +50 -0
  81. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/evasion/utils.py +0 -53
  82. python_obfuscation_framework-1.13.0/pof/main.py +212 -0
  83. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/obfuscator/boolean.py +118 -5
  84. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/obfuscator/builtins.py +1 -6
  85. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/obfuscator/constants.py +43 -26
  86. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/obfuscator/esoteric/call.py +10 -7
  87. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/obfuscator/esoteric/doc.py +24 -2
  88. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/obfuscator/esoteric/globals.py +7 -4
  89. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/obfuscator/extract_variables.py +18 -1
  90. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/obfuscator/junk/add_comments.py +1 -1
  91. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/obfuscator/junk/add_newlines.py +1 -1
  92. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/obfuscator/junk/dead_code.py +1 -1
  93. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/obfuscator/names.py +19 -0
  94. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/obfuscator/numbers.py +158 -6
  95. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/obfuscator/stegano/docstrings.py +1 -8
  96. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/obfuscator/strings.py +33 -8
  97. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pyproject.toml +1 -1
  98. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0/python_obfuscation_framework.egg-info}/PKG-INFO +45 -14
  99. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/python_obfuscation_framework.egg-info/SOURCES.txt +80 -35
  100. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/tests/obfuscator/conftest.py +75 -7
  101. python_obfuscation_framework-1.13.0/tests/obfuscator/fixtures/__init__.py +0 -0
  102. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/tests/obfuscator/fixtures/booleans.py +7 -13
  103. python_obfuscation_framework-1.13.0/tests/obfuscator/fixtures/context_managers.py +53 -0
  104. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/tests/obfuscator/fixtures/docs.py +1 -1
  105. python_obfuscation_framework-1.13.0/tests/obfuscator/fixtures/generators.py +74 -0
  106. python_obfuscation_framework-1.13.0/tests/obfuscator/fixtures/inheritance.py +94 -0
  107. python_obfuscation_framework-1.13.0/tests/obfuscator/fixtures/match_case.py +85 -0
  108. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/tests/obfuscator/fixtures/numbers.py +9 -0
  109. python_obfuscation_framework-1.13.0/tests/obfuscator/fixtures/properties.py +81 -0
  110. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/tests/obfuscator/fixtures/simple.py +23 -0
  111. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/tests/obfuscator/fixtures/types.py +12 -0
  112. python_obfuscation_framework-1.12.0/pof/evasion/__init__.py +0 -73
  113. python_obfuscation_framework-1.12.0/pof/evasion/base.py +0 -64
  114. python_obfuscation_framework-1.12.0/pof/evasion/human/p.py +0 -61
  115. python_obfuscation_framework-1.12.0/pof/main.py +0 -342
  116. python_obfuscation_framework-1.12.0/pof/obfuscator/remove/__init__.py +0 -15
  117. python_obfuscation_framework-1.12.0/pof/obfuscator/stegano/__init__.py +0 -15
  118. python_obfuscation_framework-1.12.0/pof/stager/cipher/__init__.py +0 -15
  119. python_obfuscation_framework-1.12.0/pof/utils/__init__.py +0 -15
  120. python_obfuscation_framework-1.12.0/tests/__init__.py +0 -15
  121. python_obfuscation_framework-1.12.0/tests/obfuscator/__init__.py +0 -15
  122. python_obfuscation_framework-1.12.0/tests/utils/__init__.py +0 -15
  123. python_obfuscation_framework-1.12.0/tests/utils/se/__init__.py +0 -15
  124. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/LICENSE +0 -0
  125. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/MANIFEST.in +0 -0
  126. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/__init__.py +0 -0
  127. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/__main__.py +0 -0
  128. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/cli_v2.py +0 -0
  129. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/errors.py +0 -0
  130. {python_obfuscation_framework-1.12.0/tests/obfuscator/fixtures → python_obfuscation_framework-1.13.0/pof/evasion/debugger}/__init__.py +0 -0
  131. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/logger.py +0 -0
  132. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/obfuscator/__init__.py +1 -1
  133. {python_obfuscation_framework-1.12.0/pof/evasion/cpu → python_obfuscation_framework-1.13.0/pof/obfuscator/cipher}/__init__.py +0 -0
  134. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/obfuscator/cipher/deep_encryption.py +0 -0
  135. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/obfuscator/cipher/rc4.py +0 -0
  136. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/obfuscator/cipher/shift.py +0 -0
  137. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/obfuscator/cipher/xor.py +0 -0
  138. {python_obfuscation_framework-1.12.0/pof/evasion/fs → python_obfuscation_framework-1.13.0/pof/obfuscator/compression}/__init__.py +0 -0
  139. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/obfuscator/compression/bz2.py +0 -0
  140. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/obfuscator/compression/gzip.py +0 -0
  141. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/obfuscator/compression/lzma.py +0 -0
  142. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/obfuscator/compression/zlib.py +0 -0
  143. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/obfuscator/controlflow/__init__.py +0 -0
  144. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/obfuscator/controlflow/control_flow_flatten.py +0 -0
  145. {python_obfuscation_framework-1.12.0/pof/evasion/hardware → python_obfuscation_framework-1.13.0/pof/obfuscator/encoding}/__init__.py +0 -0
  146. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/obfuscator/encoding/a85.py +0 -0
  147. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/obfuscator/encoding/b16.py +0 -0
  148. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/obfuscator/encoding/b32.py +0 -0
  149. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/obfuscator/encoding/b32hex.py +0 -0
  150. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/obfuscator/encoding/b64.py +0 -0
  151. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/obfuscator/encoding/b85.py +0 -0
  152. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/obfuscator/encoding/binascii.py +0 -0
  153. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/obfuscator/encoding/snt.py +0 -0
  154. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/obfuscator/encoding/whitespace.py +0 -0
  155. {python_obfuscation_framework-1.12.0/pof/evasion/hooks → python_obfuscation_framework-1.13.0/pof/obfuscator/esoteric}/__init__.py +0 -0
  156. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/obfuscator/esoteric/imports.py +0 -0
  157. {python_obfuscation_framework-1.12.0/pof/evasion/human → python_obfuscation_framework-1.13.0/pof/obfuscator/junk}/__init__.py +0 -0
  158. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/obfuscator/junk/add_type_hints.py +0 -0
  159. {python_obfuscation_framework-1.12.0/pof/evasion/os → python_obfuscation_framework-1.13.0/pof/obfuscator/other}/__init__.py +0 -0
  160. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/obfuscator/other/tokens.py +0 -0
  161. {python_obfuscation_framework-1.12.0/pof/evasion/processes → python_obfuscation_framework-1.13.0/pof/obfuscator/remove}/__init__.py +0 -0
  162. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/obfuscator/remove/comments.py +0 -0
  163. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/obfuscator/remove/exceptions.py +0 -0
  164. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/obfuscator/remove/indents.py +0 -0
  165. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/obfuscator/remove/loggings.py +0 -0
  166. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/obfuscator/remove/loggings_old.py +0 -0
  167. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/obfuscator/remove/newline.py +0 -0
  168. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/obfuscator/remove/print.py +0 -0
  169. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/obfuscator/remove/type_hints.py +0 -0
  170. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/obfuscator/restructure.py +0 -0
  171. {python_obfuscation_framework-1.12.0/pof/evasion/time → python_obfuscation_framework-1.13.0/pof/obfuscator/stegano}/__init__.py +0 -0
  172. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/obfuscator/stegano/ipv6encoding.py +0 -0
  173. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/obfuscator/stegano/macencoding.py +0 -0
  174. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/obfuscator/stegano/uuidencoding.py +0 -0
  175. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/stager/__init__.py +0 -0
  176. {python_obfuscation_framework-1.12.0/pof/obfuscator → python_obfuscation_framework-1.13.0/pof/stager}/cipher/__init__.py +0 -0
  177. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/stager/cipher/rc4.py +0 -0
  178. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/stager/download.py +0 -0
  179. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/stager/image.py +0 -0
  180. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/stager/lots/__init__.py +0 -0
  181. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/stager/lots/cl1pnet.py +0 -0
  182. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/stager/lots/pastebin.py +0 -0
  183. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/stager/lots/pasters.py +0 -0
  184. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/stager/quine.py +0 -0
  185. {python_obfuscation_framework-1.12.0/pof/obfuscator/compression → python_obfuscation_framework-1.13.0/pof/utils}/__init__.py +0 -0
  186. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/utils/cipher/__init__.py +0 -0
  187. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/utils/cipher/rc4.py +0 -0
  188. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/utils/cipher/shift.py +0 -0
  189. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/utils/compression/__init__.py +0 -0
  190. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/utils/compression/bz2.py +0 -0
  191. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/utils/compression/gzip.py +0 -0
  192. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/utils/compression/lzma.py +0 -0
  193. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/utils/compression/zlib.py +0 -0
  194. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/utils/encoding/__init__.py +0 -0
  195. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/utils/encoding/a85.py +0 -0
  196. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/utils/encoding/b16.py +0 -0
  197. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/utils/encoding/b3.py +0 -0
  198. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/utils/encoding/b32.py +0 -0
  199. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/utils/encoding/b32hex.py +0 -0
  200. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/utils/encoding/b64.py +0 -0
  201. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/utils/encoding/b85.py +0 -0
  202. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/utils/encoding/binascii.py +0 -0
  203. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/utils/encoding/snt.py +0 -0
  204. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/utils/encoding/whitespace.py +0 -0
  205. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/utils/entropy.py +0 -0
  206. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/utils/extract_names.py +0 -0
  207. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/utils/format.py +0 -0
  208. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/utils/generator/__init__.py +0 -0
  209. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/utils/generator/advanced.py +0 -0
  210. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/utils/generator/base.py +0 -0
  211. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/utils/generator/basic.py +0 -0
  212. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/utils/generator/comments.py +0 -0
  213. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/utils/generator/comments.txt +0 -0
  214. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/utils/generator/names.txt +0 -0
  215. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/utils/generator/unicode.py +0 -0
  216. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/utils/se/__init__.py +0 -0
  217. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/utils/se/homoglyphs.py +0 -0
  218. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/utils/se/homoglyphs.txt +0 -0
  219. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/utils/stegano/__init__.py +0 -0
  220. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/utils/stegano/ipv6encoding.py +0 -0
  221. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/utils/stegano/macencoding.py +0 -0
  222. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/utils/stegano/uuidencoding.py +0 -0
  223. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/pof/utils/tokens.py +0 -0
  224. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/python_obfuscation_framework.egg-info/dependency_links.txt +0 -0
  225. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/python_obfuscation_framework.egg-info/entry_points.txt +0 -0
  226. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/python_obfuscation_framework.egg-info/requires.txt +0 -0
  227. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/python_obfuscation_framework.egg-info/top_level.txt +0 -0
  228. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/setup.cfg +0 -0
  229. {python_obfuscation_framework-1.12.0/pof/obfuscator/encoding → python_obfuscation_framework-1.13.0/tests}/__init__.py +0 -0
  230. {python_obfuscation_framework-1.12.0/pof/obfuscator/esoteric → python_obfuscation_framework-1.13.0/tests/obfuscator}/__init__.py +0 -0
  231. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/tests/obfuscator/fixtures/complex.py +0 -0
  232. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/tests/obfuscator/fixtures/compression.py +0 -0
  233. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/tests/obfuscator/fixtures/decorators.py +0 -0
  234. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/tests/obfuscator/fixtures/deepenc.py +0 -0
  235. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/tests/obfuscator/fixtures/encoding.py +0 -0
  236. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/tests/obfuscator/fixtures/esoteric.py +0 -0
  237. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/tests/obfuscator/fixtures/getattr.py +0 -0
  238. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/tests/obfuscator/fixtures/import.py +0 -0
  239. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/tests/obfuscator/fixtures/lambda.py +0 -0
  240. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/tests/obfuscator/fixtures/moderate.py +0 -0
  241. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/tests/obfuscator/fixtures/nonlocal.py +0 -0
  242. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/tests/obfuscator/fixtures/quine.py +0 -0
  243. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/tests/obfuscator/fixtures/rc4.py +0 -0
  244. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/tests/obfuscator/fixtures/strings.py +0 -0
  245. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/tests/obfuscator/fixtures/ternary.py +0 -0
  246. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/tests/obfuscator/fixtures/try.py +0 -0
  247. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/tests/obfuscator/test_edge_cases.py +0 -0
  248. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/tests/obfuscator/test_integration.py +0 -0
  249. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/tests/obfuscator/utils.py +0 -0
  250. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/tests/pyproject.toml +0 -0
  251. {python_obfuscation_framework-1.12.0/pof/obfuscator/junk → python_obfuscation_framework-1.13.0/tests/utils}/__init__.py +0 -0
  252. {python_obfuscation_framework-1.12.0/pof/obfuscator/other → python_obfuscation_framework-1.13.0/tests/utils/se}/__init__.py +0 -0
  253. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.0}/tests/utils/se/test_homoglyphs.py +0 -0
  254. {python_obfuscation_framework-1.12.0 → python_obfuscation_framework-1.13.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.12.0
3
+ Version: 1.13.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>
@@ -265,6 +265,15 @@ cat in.py | docker run --rm -i ghcr.io/deoktr/python-obfuscation-framework:lates
265
265
 
266
266
  ## Usage
267
267
 
268
+ You can select the obfuscation level with the `-f` flag, here are the levels:
269
+
270
+ - basic
271
+ - moderate
272
+ - advanced
273
+ - extreme
274
+
275
+ Or you can specify and use a single obfuscator.
276
+
268
277
  ```bash
269
278
  # pipe input and output to stdout
270
279
  echo "print('Hello, world')" | pof
@@ -278,6 +287,12 @@ pof in.py > out.py
278
287
  # pipe to python to run it
279
288
  pof in.py | python
280
289
 
290
+ # obfuscator preset, choose the level of obfuscation needed
291
+ pof in.py -o out.py -f basic
292
+ pof in.py -o out.py -f moderate
293
+ pof in.py -o out.py -f advanced
294
+ pof in.py -o out.py -f extreme
295
+
281
296
  # obfuscator
282
297
  pof in.py -o out.py -f obfuscator -k BuiltinsObfuscator
283
298
 
@@ -418,6 +433,15 @@ print(len('bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'))
418
433
 
419
434
  # Boolean
420
435
  print((True+True+True+True+True+True+True+True+True+True+True+True+True+True+True+True+True+True+True+True+True+True+True+True+True+True+True+True+True+True+True+True+True+True+True+True+True+True+True+True+True+True))
436
+
437
+ # Bitwise XOR
438
+ print((53^31))
439
+
440
+ # Bitwise shift
441
+ print((21<<1))
442
+
443
+ # Bitwise NOT complement
444
+ print((~(~42)))
421
445
  ```
422
446
 
423
447
  #### BooleanObfuscator
@@ -425,23 +449,22 @@ print((True+True+True+True+True+True+True+True+True+True+True+True+True+True+Tru
425
449
  Source: `print(True)`
426
450
 
427
451
  ```python
428
- # not False
429
452
  print(not False)
430
-
431
- # all([])
432
453
  print(all([]))
433
-
434
- # any([True])
435
454
  print(any([True]))
436
-
437
- # not not True
438
455
  print(not not True)
439
-
440
- # '' in ''
441
456
  print('' in '')
442
-
443
- # bool(1)
444
457
  print(bool(1))
458
+ print(bool(1&1))
459
+ print(bool(~0))
460
+ ```
461
+
462
+ Source: `print(False)`
463
+
464
+ ```python
465
+ print(bool(1&0))
466
+ print(bool(1^1))
467
+ print(bool(0|0))
445
468
  ```
446
469
 
447
470
  #### ConstantsObfuscator
@@ -1310,8 +1333,9 @@ times, and we finally convert the tokens back to code.
1310
1333
  By chaining multiple obfuscations techniques we can create very complex and
1311
1334
  custom output.
1312
1335
 
1313
- Pof also provide evasions methods, detailed below, they are useful for quick and
1314
- easy evasions, and can be used and customized to fit the need.
1336
+ Pof also provide evasions methods, they are useful for quick and easy evasions,
1337
+ and can be used and customized to fit the need. The full evasion documentation
1338
+ can be found in [evasion.md](./evasion.md).
1315
1339
 
1316
1340
  For more example of how to use the pof Python API check the
1317
1341
  [examples/](./examples) directory.
@@ -1393,6 +1417,13 @@ python3 -m build
1393
1417
  python3 -m twine check dist/*
1394
1418
  ```
1395
1419
 
1420
+ Update evasion documentation:
1421
+
1422
+ ```bash
1423
+ pip install .
1424
+ ./scripts/generate_evasion_docs.py > evasion.md
1425
+ ```
1426
+
1396
1427
  ## Python 2
1397
1428
 
1398
1429
  No effort is made to support Python 2, most obfuscator, stagers, and evasion
@@ -220,6 +220,15 @@ cat in.py | docker run --rm -i ghcr.io/deoktr/python-obfuscation-framework:lates
220
220
 
221
221
  ## Usage
222
222
 
223
+ You can select the obfuscation level with the `-f` flag, here are the levels:
224
+
225
+ - basic
226
+ - moderate
227
+ - advanced
228
+ - extreme
229
+
230
+ Or you can specify and use a single obfuscator.
231
+
223
232
  ```bash
224
233
  # pipe input and output to stdout
225
234
  echo "print('Hello, world')" | pof
@@ -233,6 +242,12 @@ pof in.py > out.py
233
242
  # pipe to python to run it
234
243
  pof in.py | python
235
244
 
245
+ # obfuscator preset, choose the level of obfuscation needed
246
+ pof in.py -o out.py -f basic
247
+ pof in.py -o out.py -f moderate
248
+ pof in.py -o out.py -f advanced
249
+ pof in.py -o out.py -f extreme
250
+
236
251
  # obfuscator
237
252
  pof in.py -o out.py -f obfuscator -k BuiltinsObfuscator
238
253
 
@@ -373,6 +388,15 @@ print(len('bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'))
373
388
 
374
389
  # Boolean
375
390
  print((True+True+True+True+True+True+True+True+True+True+True+True+True+True+True+True+True+True+True+True+True+True+True+True+True+True+True+True+True+True+True+True+True+True+True+True+True+True+True+True+True+True))
391
+
392
+ # Bitwise XOR
393
+ print((53^31))
394
+
395
+ # Bitwise shift
396
+ print((21<<1))
397
+
398
+ # Bitwise NOT complement
399
+ print((~(~42)))
376
400
  ```
377
401
 
378
402
  #### BooleanObfuscator
@@ -380,23 +404,22 @@ print((True+True+True+True+True+True+True+True+True+True+True+True+True+True+Tru
380
404
  Source: `print(True)`
381
405
 
382
406
  ```python
383
- # not False
384
407
  print(not False)
385
-
386
- # all([])
387
408
  print(all([]))
388
-
389
- # any([True])
390
409
  print(any([True]))
391
-
392
- # not not True
393
410
  print(not not True)
394
-
395
- # '' in ''
396
411
  print('' in '')
397
-
398
- # bool(1)
399
412
  print(bool(1))
413
+ print(bool(1&1))
414
+ print(bool(~0))
415
+ ```
416
+
417
+ Source: `print(False)`
418
+
419
+ ```python
420
+ print(bool(1&0))
421
+ print(bool(1^1))
422
+ print(bool(0|0))
400
423
  ```
401
424
 
402
425
  #### ConstantsObfuscator
@@ -1265,8 +1288,9 @@ times, and we finally convert the tokens back to code.
1265
1288
  By chaining multiple obfuscations techniques we can create very complex and
1266
1289
  custom output.
1267
1290
 
1268
- Pof also provide evasions methods, detailed below, they are useful for quick and
1269
- easy evasions, and can be used and customized to fit the need.
1291
+ Pof also provide evasions methods, they are useful for quick and easy evasions,
1292
+ and can be used and customized to fit the need. The full evasion documentation
1293
+ can be found in [evasion.md](./evasion.md).
1270
1294
 
1271
1295
  For more example of how to use the pof Python API check the
1272
1296
  [examples/](./examples) directory.
@@ -1348,6 +1372,13 @@ python3 -m build
1348
1372
  python3 -m twine check dist/*
1349
1373
  ```
1350
1374
 
1375
+ Update evasion documentation:
1376
+
1377
+ ```bash
1378
+ pip install .
1379
+ ./scripts/generate_evasion_docs.py > evasion.md
1380
+ ```
1381
+
1351
1382
  ## Python 2
1352
1383
 
1353
1384
  No effort is made to support Python 2, most obfuscator, stagers, and evasion
@@ -176,8 +176,8 @@ def _cli() -> int:
176
176
  parser.add_argument(
177
177
  "-f",
178
178
  "--function",
179
- help="obfuscation function",
180
- default="obfuscate",
179
+ help="obfuscation function, can be a specific function or preset: basic/moderate/advanced/extreme", # noqa: E501
180
+ default="moderate",
181
181
  )
182
182
  parser.add_argument(
183
183
  "--format",
@@ -0,0 +1,162 @@
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 .debugger.breakpoint_hook import BreakpointHookEvasion
18
+ from .debugger.coverage import CoverageEvasion
19
+ from .debugger.cprofile import CProfileEvasion
20
+ from .debugger.debugger import DebuggerEvasion
21
+ from .debugger.linux_debug_process import LinuxDebugProcessEvasion
22
+ from .debugger.tracemalloc_evasion import TracemallocEvasion
23
+ from .debugger.win_debug_process import WinDebugProcessEvasion
24
+ from .debugger.win_debugger import WinDebuggerEvasion
25
+ from .guardrails.argv import ArgvEvasion
26
+ from .guardrails.directory_exist import DirectoryExistEvasion
27
+ from .guardrails.directory_list_exist import DirectoryListExistEvasion
28
+ from .guardrails.directory_list_missing import DirectoryListMissingEvasion
29
+ from .guardrails.directory_missing import DirectoryMissingEvasion
30
+ from .guardrails.domain import DomainEvasion
31
+ from .guardrails.env_var import EnvVarEvasion
32
+ from .guardrails.expire import ExpireEvasion
33
+ from .guardrails.file_content import FileContentEvasion
34
+ from .guardrails.file_exist import FileExistEvasion
35
+ from .guardrails.file_list_exist import FileListExistEvasion
36
+ from .guardrails.file_list_missing import FileListMissingEvasion
37
+ from .guardrails.file_missing import FileMissingEvasion
38
+ from .guardrails.file_size import FileSizeEvasion
39
+ from .guardrails.hostname import HostnameEvasion
40
+ from .guardrails.installed_software import InstalledSoftwareEvasion
41
+ from .guardrails.integrity import IntegrityEvasion
42
+ from .guardrails.ip_address import IPAddressEvasion
43
+ from .guardrails.language_locale import LanguageLocaleEvasion
44
+ from .guardrails.mac_address import MACAddressEvasion
45
+ from .guardrails.timezone import TimezoneEvasion
46
+ from .guardrails.uid import LinuxUIDEvasion
47
+ from .guardrails.username import UsernameEvasion
48
+ from .guardrails.win_ad_domain import WinADDomainEvasion
49
+ from .guardrails.win_privilege import WinPrivilegeEvasion
50
+ from .guardrails.win_prompt import WinPromptEvasion
51
+ from .multi import MultiEvasion
52
+ from .sandbox.cpu_count import CPUCountEvasion
53
+ from .sandbox.disk_size import DiskSizeEvasion
54
+ from .sandbox.edr import LinuxEDREvasion, WinEDREvasion
55
+ from .sandbox.exec_method import ExecMethodEvasion
56
+ from .sandbox.executable_path import ExecPathEvasion
57
+ from .sandbox.linux_mouse import LinuxMouseEvasion
58
+ from .sandbox.linux_process_list import LinuxProcessListEvasion
59
+ from .sandbox.linux_sandbox_artifacts import LinuxSandboxArtifactEvasion
60
+ from .sandbox.linux_screen_resolution import LinuxScreenResolutionEvasion
61
+ from .sandbox.linux_tmp_count import LinuxTmpCountEvasion
62
+ from .sandbox.proc_count import LinuxProcCountEvasion
63
+ from .sandbox.ram_count import LinuxRAMCountEvasion
64
+ from .sandbox.sandbox_hostname import SandboxHostnameEvasion
65
+ from .sandbox.sandbox_username import SandboxUsernameEvasion
66
+ from .sandbox.tmp_count import TmpCountEvasion
67
+ from .sandbox.uptime import LinuxUptimeEvasion
68
+ from .sandbox.utc import UTCEvasion
69
+ from .sandbox.vm_hypervisor import VMHypervisorEvasion
70
+ from .sandbox.win_mouse import WinMouseEvasion
71
+ from .sandbox.win_proc_count import WinProcCountEvasion
72
+ from .sandbox.win_process_list import WinProcessListEvasion
73
+ from .sandbox.win_ram_count import WinRAMCountEvasion
74
+ from .sandbox.win_registry_vm import WinRegistryVMEvasion
75
+ from .sandbox.win_sandbox_artifacts import WinSandboxArtifactEvasion
76
+ from .sandbox.win_screen_resolution import WinScreenResolutionEvasion
77
+ from .sandbox.win_tmp_count import WinTmpCountEvasion
78
+ from .sandbox.win_uptime import WinUptimeEvasion
79
+ from .special.cicd import CICDEvasion
80
+ from .special.jupyter import JupyterEvasion
81
+ from .special.linux_docker import LinuxDockerEvasion
82
+ from .special.linux_kubernetes import LinuxKubernetesEvasion
83
+ from .special.linux_wsl import LinuxWSLEvasion
84
+ from .special.serverless import ServerlessEvasion
85
+ from .special.win_container import WinContainerEvasion
86
+ from .special.win_hyper_v import WinHyperVGuestEvasion
87
+ from .special.win_sandbox_env import WinSandboxEnvEvasion
88
+
89
+ __all__ = [
90
+ "ArgvEvasion",
91
+ "BreakpointHookEvasion",
92
+ "CICDEvasion",
93
+ "CPUCountEvasion",
94
+ "CProfileEvasion",
95
+ "CoverageEvasion",
96
+ "DebuggerEvasion",
97
+ "DirectoryExistEvasion",
98
+ "DirectoryListExistEvasion",
99
+ "DirectoryListMissingEvasion",
100
+ "DirectoryMissingEvasion",
101
+ "DiskSizeEvasion",
102
+ "DomainEvasion",
103
+ "EnvVarEvasion",
104
+ "ExecMethodEvasion",
105
+ "ExecPathEvasion",
106
+ "ExpireEvasion",
107
+ "FileContentEvasion",
108
+ "FileExistEvasion",
109
+ "FileListExistEvasion",
110
+ "FileListMissingEvasion",
111
+ "FileMissingEvasion",
112
+ "FileSizeEvasion",
113
+ "HostnameEvasion",
114
+ "IPAddressEvasion",
115
+ "InstalledSoftwareEvasion",
116
+ "IntegrityEvasion",
117
+ "JupyterEvasion",
118
+ "LanguageLocaleEvasion",
119
+ "LinuxDebugProcessEvasion",
120
+ "LinuxDockerEvasion",
121
+ "LinuxEDREvasion",
122
+ "LinuxKubernetesEvasion",
123
+ "LinuxMouseEvasion",
124
+ "LinuxProcCountEvasion",
125
+ "LinuxProcessListEvasion",
126
+ "LinuxRAMCountEvasion",
127
+ "LinuxSandboxArtifactEvasion",
128
+ "LinuxScreenResolutionEvasion",
129
+ "LinuxTmpCountEvasion",
130
+ "LinuxUIDEvasion",
131
+ "LinuxUptimeEvasion",
132
+ "LinuxWSLEvasion",
133
+ "MACAddressEvasion",
134
+ "MultiEvasion",
135
+ "SandboxHostnameEvasion",
136
+ "SandboxUsernameEvasion",
137
+ "ServerlessEvasion",
138
+ "TimezoneEvasion",
139
+ "TmpCountEvasion",
140
+ "TracemallocEvasion",
141
+ "UTCEvasion",
142
+ "UsernameEvasion",
143
+ "VMHypervisorEvasion",
144
+ "WinADDomainEvasion",
145
+ "WinContainerEvasion",
146
+ "WinDebugProcessEvasion",
147
+ "WinDebuggerEvasion",
148
+ "WinEDREvasion",
149
+ "WinHyperVGuestEvasion",
150
+ "WinMouseEvasion",
151
+ "WinPrivilegeEvasion",
152
+ "WinProcCountEvasion",
153
+ "WinProcessListEvasion",
154
+ "WinPromptEvasion",
155
+ "WinRAMCountEvasion",
156
+ "WinRegistryVMEvasion",
157
+ "WinSandboxArtifactEvasion",
158
+ "WinSandboxEnvEvasion",
159
+ "WinScreenResolutionEvasion",
160
+ "WinTmpCountEvasion",
161
+ "WinUptimeEvasion",
162
+ ]
@@ -0,0 +1,138 @@
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 __future__ import annotations
18
+
19
+ from enum import StrEnum
20
+ from tokenize import DEDENT, INDENT, LPAR, NAME, NEWLINE, OP, RPAR, STRING
21
+
22
+
23
+ class Platform(StrEnum):
24
+ """Valid platform values for evasion techniques."""
25
+
26
+ ANY = "any"
27
+ LINUX = "linux"
28
+ WINDOWS = "windows"
29
+ DARWIN = "darwin"
30
+
31
+
32
+ class Category(StrEnum):
33
+ """Valid category values for evasion techniques."""
34
+
35
+ SANDBOX = "sandbox"
36
+ GUARDRAILS = "guardrails"
37
+ DEBUGGER = "debugger"
38
+ SPECIAL = "special"
39
+
40
+
41
+ class BaseEvasion:
42
+ # add evasion class name inside the exception
43
+ ADD_CLASS_NAME: bool = True
44
+
45
+ CATEGORY: str = ""
46
+ PLATFORM: str = Platform.ANY
47
+ DESCRIPTION: str = ""
48
+
49
+ def __init_subclass__(cls, **kwargs: object) -> None:
50
+ # validate PLATFORM and CATEGORY
51
+ super().__init_subclass__(**kwargs)
52
+ if "PLATFORM" in cls.__dict__:
53
+ valid = {p.value for p in Platform}
54
+ val = cls.__dict__["PLATFORM"]
55
+ raw = val.value if isinstance(val, Platform) else val
56
+ if raw not in valid:
57
+ msg = (
58
+ f"{cls.__name__}.PLATFORM = {val!r} is invalid."
59
+ " Use Platform.{ANY,LINUX,WINDOWS,DARWIN}"
60
+ )
61
+ raise ValueError(msg)
62
+ if "CATEGORY" in cls.__dict__:
63
+ valid = {c.value for c in Category} | {""}
64
+ val = cls.__dict__["CATEGORY"]
65
+ raw = val.value if isinstance(val, Category) else val
66
+ if raw not in valid:
67
+ msg = (
68
+ f"{cls.__name__}.CATEGORY = {val!r} is invalid."
69
+ " Use Category.{SANDBOX,GUARDRAILS,DEBUGGER,SPECIAL}"
70
+ )
71
+ raise ValueError(msg)
72
+
73
+ def fail_call_tokens(self) -> list[tuple[int, str]]:
74
+ match getattr(self, "failure_mode", "exception"):
75
+ case "exit":
76
+ return [
77
+ (NAME, "import"),
78
+ (NAME, "sys"),
79
+ (NEWLINE, "\n"),
80
+ (NAME, "sys"),
81
+ (OP, "."),
82
+ (NAME, "exit"),
83
+ (LPAR, "("),
84
+ (RPAR, ")"),
85
+ ]
86
+ case "callback":
87
+ name = getattr(self, "callback_name", None) or "evasion_callback"
88
+ return [
89
+ (NAME, name),
90
+ (LPAR, "("),
91
+ (RPAR, ")"),
92
+ ]
93
+ case "return":
94
+ return [
95
+ (NAME, "exit"),
96
+ (LPAR, "("),
97
+ (RPAR, ")"),
98
+ ]
99
+ case _: # "exception" (default)
100
+ return [
101
+ (NAME, "raise"),
102
+ (NAME, "Exception"),
103
+ (LPAR, "("),
104
+ (
105
+ STRING,
106
+ (
107
+ repr(self.__class__.__name__)
108
+ if self.ADD_CLASS_NAME
109
+ else repr("evasion check triggered")
110
+ ),
111
+ ),
112
+ (RPAR, ")"),
113
+ ]
114
+
115
+ @staticmethod
116
+ def import_tokens() -> list[tuple[int, str]]:
117
+ return []
118
+
119
+ @staticmethod
120
+ def check_tokens() -> list[tuple[int, str]]:
121
+ return []
122
+
123
+ def add_evasion(self, tokens):
124
+ return [
125
+ *self.import_tokens(),
126
+ (NEWLINE, "\n"),
127
+ (NAME, "if"),
128
+ (LPAR, "("),
129
+ *self.check_tokens(),
130
+ (RPAR, ")"),
131
+ (OP, ":"),
132
+ (NEWLINE, "\n"),
133
+ (INDENT, " "),
134
+ *self.fail_call_tokens(),
135
+ (NEWLINE, "\n"),
136
+ (DEDENT, ""),
137
+ *tokens,
138
+ ]
@@ -0,0 +1,46 @@
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 tokenize import NAME, OP
18
+
19
+ from pof.evasion.base import BaseEvasion, Category, Platform
20
+
21
+
22
+ class BreakpointHookEvasion(BaseEvasion):
23
+ CATEGORY = Category.DEBUGGER
24
+ PLATFORM = Platform.ANY
25
+ DESCRIPTION = "Detects modified breakpoint hook"
26
+
27
+ @staticmethod
28
+ def import_tokens():
29
+ return [
30
+ (NAME, "import"),
31
+ (NAME, "sys"),
32
+ ]
33
+
34
+ @staticmethod
35
+ def check_tokens():
36
+ """`sys.breakpointhook is not sys.__breakpointhook__`."""
37
+ return [
38
+ (NAME, "sys"),
39
+ (OP, "."),
40
+ (NAME, "breakpointhook"),
41
+ (NAME, "is"),
42
+ (NAME, "not"),
43
+ (NAME, "sys"),
44
+ (OP, "."),
45
+ (NAME, "__breakpointhook__"),
46
+ ]
@@ -0,0 +1,43 @@
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 tokenize import NAME, OP, STRING
18
+
19
+ from pof.evasion.base import BaseEvasion, Category, Platform
20
+
21
+
22
+ class CoverageEvasion(BaseEvasion):
23
+ CATEGORY = Category.DEBUGGER
24
+ PLATFORM = Platform.ANY
25
+ DESCRIPTION = "Detects coverage.py instrumentation"
26
+
27
+ @staticmethod
28
+ def import_tokens():
29
+ return [
30
+ (NAME, "import"),
31
+ (NAME, "sys"),
32
+ ]
33
+
34
+ @staticmethod
35
+ def check_tokens():
36
+ """`"coverage" in sys.modules`."""
37
+ return [
38
+ (STRING, '"coverage"'),
39
+ (NAME, "in"),
40
+ (NAME, "sys"),
41
+ (OP, "."),
42
+ (NAME, "modules"),
43
+ ]
@@ -0,0 +1,46 @@
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 tokenize import LPAR, NAME, OP, RPAR
18
+
19
+ from pof.evasion.base import BaseEvasion, Category, Platform
20
+
21
+
22
+ class CProfileEvasion(BaseEvasion):
23
+ CATEGORY = Category.DEBUGGER
24
+ PLATFORM = Platform.ANY
25
+ DESCRIPTION = "Detects active cProfile/profile profiling"
26
+
27
+ @staticmethod
28
+ def import_tokens():
29
+ return [
30
+ (NAME, "import"),
31
+ (NAME, "sys"),
32
+ ]
33
+
34
+ @staticmethod
35
+ def check_tokens():
36
+ """`sys.getprofile() is not None`."""
37
+ return [
38
+ (NAME, "sys"),
39
+ (OP, "."),
40
+ (NAME, "getprofile"),
41
+ (LPAR, "("),
42
+ (RPAR, ")"),
43
+ (NAME, "is"),
44
+ (NAME, "not"),
45
+ (NAME, "None"),
46
+ ]
@@ -16,10 +16,14 @@
16
16
 
17
17
  from tokenize import LPAR, NAME, OP, RPAR, STRING
18
18
 
19
- from pof.evasion.base import BaseEvasion
19
+ from pof.evasion.base import BaseEvasion, Category, Platform
20
20
 
21
21
 
22
22
  class DebuggerEvasion(BaseEvasion):
23
+ CATEGORY = Category.DEBUGGER
24
+ PLATFORM = Platform.ANY
25
+ DESCRIPTION = "Detects Python debugger via sys.gettrace()"
26
+
23
27
  @staticmethod
24
28
  def import_tokens():
25
29
  return [