python-obfuscation-framework 1.11.1__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 (258) hide show
  1. {python_obfuscation_framework-1.11.1/python_obfuscation_framework.egg-info → python_obfuscation_framework-1.13.0}/PKG-INFO +73 -23
  2. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/README.md +71 -21
  3. {python_obfuscation_framework-1.11.1 → 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.11.1/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.11.1/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.11.1/pof/evasion → python_obfuscation_framework-1.13.0/pof/evasion/guardrails}/argv.py +4 -2
  16. {python_obfuscation_framework-1.11.1/pof/evasion/fs → python_obfuscation_framework-1.13.0/pof/evasion/guardrails}/directory_exist.py +5 -1
  17. {python_obfuscation_framework-1.11.1/pof/evasion/fs → python_obfuscation_framework-1.13.0/pof/evasion/guardrails}/directory_list_exist.py +5 -1
  18. {python_obfuscation_framework-1.11.1/pof/evasion/fs → python_obfuscation_framework-1.13.0/pof/evasion/guardrails}/directory_list_missing.py +5 -1
  19. {python_obfuscation_framework-1.11.1/pof/evasion/fs → python_obfuscation_framework-1.13.0/pof/evasion/guardrails}/directory_missing.py +5 -1
  20. {python_obfuscation_framework-1.11.1/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.11.1/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.11.1/pof/evasion/fs → python_obfuscation_framework-1.13.0/pof/evasion/guardrails}/file_exist.py +5 -1
  25. {python_obfuscation_framework-1.11.1/pof/evasion/fs → python_obfuscation_framework-1.13.0/pof/evasion/guardrails}/file_list_exist.py +5 -1
  26. {python_obfuscation_framework-1.11.1/pof/evasion/fs → python_obfuscation_framework-1.13.0/pof/evasion/guardrails}/file_list_missing.py +5 -1
  27. {python_obfuscation_framework-1.11.1/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.11.1/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.11.1/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.11.1/pof/evasion/os → python_obfuscation_framework-1.13.0/pof/evasion/guardrails}/uid.py +5 -1
  38. {python_obfuscation_framework-1.11.1/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.11.1/pof/evasion/human/prompt.py → python_obfuscation_framework-1.13.0/pof/evasion/guardrails/win_prompt.py +6 -35
  42. {python_obfuscation_framework-1.11.1 → 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.11.1/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.11.1/pof/evasion/fs → python_obfuscation_framework-1.13.0/pof/evasion/sandbox}/exec_method.py +10 -3
  48. {python_obfuscation_framework-1.11.1/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.11.1/pof/evasion/processes → python_obfuscation_framework-1.13.0/pof/evasion/sandbox}/proc_count.py +5 -1
  55. {python_obfuscation_framework-1.11.1/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.11.1/pof/evasion/fs/tmp.py → python_obfuscation_framework-1.13.0/pof/evasion/sandbox/tmp_count.py +5 -67
  59. {python_obfuscation_framework-1.11.1/pof/evasion/time → python_obfuscation_framework-1.13.0/pof/evasion/sandbox}/uptime.py +6 -2
  60. {python_obfuscation_framework-1.11.1/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.11.1 → 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.11.1 → python_obfuscation_framework-1.13.0}/pof/obfuscator/__init__.py +4 -0
  84. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/obfuscator/boolean.py +118 -5
  85. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/obfuscator/builtins.py +21 -8
  86. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/obfuscator/constants.py +60 -26
  87. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/obfuscator/controlflow/control_flow_flatten.py +2 -0
  88. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/obfuscator/esoteric/call.py +18 -8
  89. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/obfuscator/esoteric/doc.py +24 -2
  90. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/obfuscator/esoteric/globals.py +7 -4
  91. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/obfuscator/extract_variables.py +41 -4
  92. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/obfuscator/junk/add_comments.py +1 -1
  93. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/obfuscator/junk/add_newlines.py +1 -3
  94. python_obfuscation_framework-1.13.0/pof/obfuscator/junk/add_type_hints.py +450 -0
  95. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/obfuscator/junk/dead_code.py +1 -3
  96. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/obfuscator/names.py +19 -1
  97. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/obfuscator/numbers.py +177 -7
  98. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/obfuscator/other/tokens.py +37 -1
  99. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/obfuscator/remove/print.py +6 -1
  100. python_obfuscation_framework-1.13.0/pof/obfuscator/remove/type_hints.py +285 -0
  101. python_obfuscation_framework-1.13.0/pof/obfuscator/stegano/docstrings.py +157 -0
  102. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/obfuscator/strings.py +36 -11
  103. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pyproject.toml +2 -2
  104. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0/python_obfuscation_framework.egg-info}/PKG-INFO +73 -23
  105. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/python_obfuscation_framework.egg-info/SOURCES.txt +86 -35
  106. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/tests/obfuscator/conftest.py +119 -68
  107. python_obfuscation_framework-1.13.0/tests/obfuscator/fixtures/__init__.py +0 -0
  108. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/tests/obfuscator/fixtures/booleans.py +6 -12
  109. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/tests/obfuscator/fixtures/complex.py +78 -0
  110. python_obfuscation_framework-1.13.0/tests/obfuscator/fixtures/context_managers.py +53 -0
  111. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/tests/obfuscator/fixtures/decorators.py +8 -0
  112. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/tests/obfuscator/fixtures/deepenc.py +7 -4
  113. python_obfuscation_framework-1.13.0/tests/obfuscator/fixtures/docs.py +11 -0
  114. python_obfuscation_framework-1.13.0/tests/obfuscator/fixtures/generators.py +74 -0
  115. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/tests/obfuscator/fixtures/getattr.py +1 -0
  116. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/tests/obfuscator/fixtures/import.py +2 -0
  117. python_obfuscation_framework-1.13.0/tests/obfuscator/fixtures/inheritance.py +94 -0
  118. python_obfuscation_framework-1.13.0/tests/obfuscator/fixtures/lambda.py +24 -0
  119. python_obfuscation_framework-1.13.0/tests/obfuscator/fixtures/match_case.py +85 -0
  120. python_obfuscation_framework-1.13.0/tests/obfuscator/fixtures/nonlocal.py +16 -0
  121. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/tests/obfuscator/fixtures/numbers.py +9 -0
  122. python_obfuscation_framework-1.13.0/tests/obfuscator/fixtures/properties.py +81 -0
  123. python_obfuscation_framework-1.13.0/tests/obfuscator/fixtures/quine.py +10 -0
  124. python_obfuscation_framework-1.13.0/tests/obfuscator/fixtures/simple.py +54 -0
  125. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/tests/obfuscator/fixtures/strings.py +10 -0
  126. python_obfuscation_framework-1.13.0/tests/obfuscator/fixtures/ternary.py +14 -0
  127. python_obfuscation_framework-1.13.0/tests/obfuscator/fixtures/types.py +66 -0
  128. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/tests/obfuscator/test_edge_cases.py +0 -1
  129. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/tests/obfuscator/test_integration.py +6 -0
  130. python_obfuscation_framework-1.11.1/pof/evasion/__init__.py +0 -73
  131. python_obfuscation_framework-1.11.1/pof/evasion/base.py +0 -64
  132. python_obfuscation_framework-1.11.1/pof/evasion/human/p.py +0 -61
  133. python_obfuscation_framework-1.11.1/pof/main.py +0 -342
  134. python_obfuscation_framework-1.11.1/pof/obfuscator/remove/__init__.py +0 -15
  135. python_obfuscation_framework-1.11.1/pof/obfuscator/stegano/__init__.py +0 -15
  136. python_obfuscation_framework-1.11.1/pof/obfuscator/stegano/docstrings.py +0 -127
  137. python_obfuscation_framework-1.11.1/pof/stager/cipher/__init__.py +0 -15
  138. python_obfuscation_framework-1.11.1/pof/utils/__init__.py +0 -15
  139. python_obfuscation_framework-1.11.1/tests/__init__.py +0 -15
  140. python_obfuscation_framework-1.11.1/tests/obfuscator/__init__.py +0 -15
  141. python_obfuscation_framework-1.11.1/tests/obfuscator/fixtures/docs.py +0 -10
  142. python_obfuscation_framework-1.11.1/tests/obfuscator/fixtures/lambda.py +0 -4
  143. python_obfuscation_framework-1.11.1/tests/obfuscator/fixtures/simple.py +0 -31
  144. python_obfuscation_framework-1.11.1/tests/utils/__init__.py +0 -15
  145. python_obfuscation_framework-1.11.1/tests/utils/se/__init__.py +0 -15
  146. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/LICENSE +0 -0
  147. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/MANIFEST.in +0 -0
  148. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/__init__.py +0 -0
  149. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/__main__.py +0 -0
  150. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/cli_v2.py +0 -0
  151. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/errors.py +0 -0
  152. {python_obfuscation_framework-1.11.1/tests/obfuscator/fixtures → python_obfuscation_framework-1.13.0/pof/evasion/debugger}/__init__.py +0 -0
  153. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/logger.py +0 -0
  154. {python_obfuscation_framework-1.11.1/pof/evasion/cpu → python_obfuscation_framework-1.13.0/pof/obfuscator/cipher}/__init__.py +0 -0
  155. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/obfuscator/cipher/deep_encryption.py +0 -0
  156. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/obfuscator/cipher/rc4.py +0 -0
  157. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/obfuscator/cipher/shift.py +0 -0
  158. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/obfuscator/cipher/xor.py +0 -0
  159. {python_obfuscation_framework-1.11.1/pof/evasion/fs → python_obfuscation_framework-1.13.0/pof/obfuscator/compression}/__init__.py +0 -0
  160. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/obfuscator/compression/bz2.py +0 -0
  161. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/obfuscator/compression/gzip.py +0 -0
  162. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/obfuscator/compression/lzma.py +0 -0
  163. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/obfuscator/compression/zlib.py +0 -0
  164. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/obfuscator/controlflow/__init__.py +0 -0
  165. {python_obfuscation_framework-1.11.1/pof/evasion/hardware → python_obfuscation_framework-1.13.0/pof/obfuscator/encoding}/__init__.py +0 -0
  166. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/obfuscator/encoding/a85.py +0 -0
  167. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/obfuscator/encoding/b16.py +0 -0
  168. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/obfuscator/encoding/b32.py +0 -0
  169. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/obfuscator/encoding/b32hex.py +0 -0
  170. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/obfuscator/encoding/b64.py +0 -0
  171. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/obfuscator/encoding/b85.py +0 -0
  172. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/obfuscator/encoding/binascii.py +0 -0
  173. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/obfuscator/encoding/snt.py +0 -0
  174. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/obfuscator/encoding/whitespace.py +0 -0
  175. {python_obfuscation_framework-1.11.1/pof/evasion/hooks → python_obfuscation_framework-1.13.0/pof/obfuscator/esoteric}/__init__.py +0 -0
  176. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/obfuscator/esoteric/imports.py +0 -0
  177. {python_obfuscation_framework-1.11.1/pof/evasion/human → python_obfuscation_framework-1.13.0/pof/obfuscator/junk}/__init__.py +0 -0
  178. {python_obfuscation_framework-1.11.1/pof/evasion/os → python_obfuscation_framework-1.13.0/pof/obfuscator/other}/__init__.py +0 -0
  179. {python_obfuscation_framework-1.11.1/pof/evasion/processes → python_obfuscation_framework-1.13.0/pof/obfuscator/remove}/__init__.py +0 -0
  180. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/obfuscator/remove/comments.py +0 -0
  181. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/obfuscator/remove/exceptions.py +0 -0
  182. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/obfuscator/remove/indents.py +0 -0
  183. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/obfuscator/remove/loggings.py +0 -0
  184. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/obfuscator/remove/loggings_old.py +0 -0
  185. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/obfuscator/remove/newline.py +0 -0
  186. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/obfuscator/restructure.py +0 -0
  187. {python_obfuscation_framework-1.11.1/pof/evasion/time → python_obfuscation_framework-1.13.0/pof/obfuscator/stegano}/__init__.py +0 -0
  188. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/obfuscator/stegano/ipv6encoding.py +0 -0
  189. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/obfuscator/stegano/macencoding.py +0 -0
  190. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/obfuscator/stegano/uuidencoding.py +0 -0
  191. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/stager/__init__.py +0 -0
  192. {python_obfuscation_framework-1.11.1/pof/obfuscator → python_obfuscation_framework-1.13.0/pof/stager}/cipher/__init__.py +0 -0
  193. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/stager/cipher/rc4.py +0 -0
  194. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/stager/download.py +0 -0
  195. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/stager/image.py +0 -0
  196. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/stager/lots/__init__.py +0 -0
  197. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/stager/lots/cl1pnet.py +0 -0
  198. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/stager/lots/pastebin.py +0 -0
  199. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/stager/lots/pasters.py +0 -0
  200. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/stager/quine.py +0 -0
  201. {python_obfuscation_framework-1.11.1/pof/obfuscator/compression → python_obfuscation_framework-1.13.0/pof/utils}/__init__.py +0 -0
  202. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/utils/cipher/__init__.py +0 -0
  203. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/utils/cipher/rc4.py +0 -0
  204. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/utils/cipher/shift.py +0 -0
  205. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/utils/compression/__init__.py +0 -0
  206. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/utils/compression/bz2.py +0 -0
  207. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/utils/compression/gzip.py +0 -0
  208. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/utils/compression/lzma.py +0 -0
  209. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/utils/compression/zlib.py +0 -0
  210. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/utils/encoding/__init__.py +0 -0
  211. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/utils/encoding/a85.py +0 -0
  212. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/utils/encoding/b16.py +0 -0
  213. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/utils/encoding/b3.py +0 -0
  214. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/utils/encoding/b32.py +0 -0
  215. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/utils/encoding/b32hex.py +0 -0
  216. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/utils/encoding/b64.py +0 -0
  217. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/utils/encoding/b85.py +0 -0
  218. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/utils/encoding/binascii.py +0 -0
  219. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/utils/encoding/snt.py +0 -0
  220. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/utils/encoding/whitespace.py +0 -0
  221. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/utils/entropy.py +0 -0
  222. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/utils/extract_names.py +0 -0
  223. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/utils/format.py +0 -0
  224. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/utils/generator/__init__.py +0 -0
  225. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/utils/generator/advanced.py +0 -0
  226. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/utils/generator/base.py +0 -0
  227. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/utils/generator/basic.py +0 -0
  228. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/utils/generator/comments.py +0 -0
  229. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/utils/generator/comments.txt +0 -0
  230. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/utils/generator/names.txt +0 -0
  231. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/utils/generator/unicode.py +0 -0
  232. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/utils/se/__init__.py +0 -0
  233. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/utils/se/homoglyphs.py +0 -0
  234. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/utils/se/homoglyphs.txt +0 -0
  235. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/utils/stegano/__init__.py +0 -0
  236. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/utils/stegano/ipv6encoding.py +0 -0
  237. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/utils/stegano/macencoding.py +0 -0
  238. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/utils/stegano/uuidencoding.py +0 -0
  239. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/pof/utils/tokens.py +0 -0
  240. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/python_obfuscation_framework.egg-info/dependency_links.txt +0 -0
  241. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/python_obfuscation_framework.egg-info/entry_points.txt +0 -0
  242. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/python_obfuscation_framework.egg-info/requires.txt +0 -0
  243. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/python_obfuscation_framework.egg-info/top_level.txt +0 -0
  244. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/setup.cfg +0 -0
  245. {python_obfuscation_framework-1.11.1/pof/obfuscator/encoding → python_obfuscation_framework-1.13.0/tests}/__init__.py +0 -0
  246. {python_obfuscation_framework-1.11.1/pof/obfuscator/esoteric → python_obfuscation_framework-1.13.0/tests/obfuscator}/__init__.py +0 -0
  247. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/tests/obfuscator/fixtures/compression.py +0 -0
  248. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/tests/obfuscator/fixtures/encoding.py +0 -0
  249. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/tests/obfuscator/fixtures/esoteric.py +0 -0
  250. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/tests/obfuscator/fixtures/moderate.py +0 -0
  251. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/tests/obfuscator/fixtures/rc4.py +0 -0
  252. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/tests/obfuscator/fixtures/try.py +0 -0
  253. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/tests/obfuscator/utils.py +0 -0
  254. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/tests/pyproject.toml +0 -0
  255. {python_obfuscation_framework-1.11.1/pof/obfuscator/junk → python_obfuscation_framework-1.13.0/tests/utils}/__init__.py +0 -0
  256. {python_obfuscation_framework-1.11.1/pof/obfuscator/other → python_obfuscation_framework-1.13.0/tests/utils/se}/__init__.py +0 -0
  257. {python_obfuscation_framework-1.11.1 → python_obfuscation_framework-1.13.0}/tests/utils/se/test_homoglyphs.py +0 -0
  258. {python_obfuscation_framework-1.11.1 → 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.11.1
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>
@@ -24,7 +24,7 @@ Classifier: Programming Language :: Python :: 3.12
24
24
  Classifier: Programming Language :: Python :: 3.13
25
25
  Classifier: Programming Language :: Python :: 3.14
26
26
  Classifier: Topic :: Security
27
- Requires-Python: >=3.10
27
+ Requires-Python: >=3.12
28
28
  Description-Content-Type: text/markdown
29
29
  License-File: LICENSE
30
30
  Requires-Dist: rope>=1.0.0
@@ -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
 
@@ -367,6 +382,7 @@ Other very basic obfuscation functions are done by specific obfuscators like:
367
382
  `LoggingRemoveObfuscator`.
368
383
  - Remove empty lines with `NewlineObfuscator`.
369
384
  - Remove print statements with `PrintObfuscator`.
385
+ - Remove type hints with `TypeHintsObfuscator`.
370
386
 
371
387
  #### StringsObfuscator
372
388
 
@@ -417,6 +433,15 @@ print(len('bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'))
417
433
 
418
434
  # Boolean
419
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)))
420
445
  ```
421
446
 
422
447
  #### BooleanObfuscator
@@ -424,23 +449,22 @@ print((True+True+True+True+True+True+True+True+True+True+True+True+True+True+Tru
424
449
  Source: `print(True)`
425
450
 
426
451
  ```python
427
- # not False
428
452
  print(not False)
429
-
430
- # all([])
431
453
  print(all([]))
432
-
433
- # any([True])
434
454
  print(any([True]))
435
-
436
- # not not True
437
455
  print(not not True)
438
-
439
- # '' in ''
440
456
  print('' in '')
441
-
442
- # bool(1)
443
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))
444
468
  ```
445
469
 
446
470
  #### ConstantsObfuscator
@@ -584,16 +608,16 @@ exec("".join([chr(ord(i)-3)for i in'sulqw+*Khoor/#zruog*,\r']))
584
608
 
585
609
  #### DocstringObfuscator
586
610
 
611
+ Store original code inside functions and classes comments as base64.
612
+
587
613
  ```python
588
614
  from base64 import b64decode
589
- class Foo:
590
- """
591
- cHJpbnQoJ0hlbGxvLCB3b3JsZCcpCg==
592
- """
593
- pass
594
615
 
616
+ class L8EU:
617
+ """cHJpbnQoIkhlbGxvLCB3b3JsZCEiKQo="""
618
+ pass
595
619
 
596
- exec(b64decode(Foo.__doc__.replace('\n','').replace(' ','')))
620
+ exec(b64decode("".join([L8EU.__doc__]).replace('\\n','').replace(' ','')))
597
621
  ```
598
622
 
599
623
  #### SpacenTabObfuscator
@@ -898,8 +922,6 @@ def greet(name):
898
922
 
899
923
  Insert dead (unreachable/unused) code blocks into the source.
900
924
 
901
- Source: `print('Hello, world')`
902
-
903
925
  ```python
904
926
  while False:
905
927
  Etb4inx6B1=[21,7,46,2]
@@ -909,6 +931,26 @@ while False:
909
931
  print('Hello, world')
910
932
  ```
911
933
 
934
+ #### AddTypeHintsObfuscator
935
+
936
+ Insert random type hints.
937
+
938
+ Source:
939
+
940
+ ```python
941
+ def foo(x):
942
+ z = x + 2
943
+ print(z)
944
+ ```
945
+
946
+ Obfuscated:
947
+
948
+ ```python
949
+ def foo(x: dict[dict[bytearray, None], frozenset[complex]])-> str | type:
950
+ z: complex | dict[memoryview, complex]=x+2
951
+ print(z)
952
+ ```
953
+
912
954
  ### Stager
913
955
 
914
956
  #### DownloadStager
@@ -1291,8 +1333,9 @@ times, and we finally convert the tokens back to code.
1291
1333
  By chaining multiple obfuscations techniques we can create very complex and
1292
1334
  custom output.
1293
1335
 
1294
- Pof also provide evasions methods, detailed below, they are useful for quick and
1295
- 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).
1296
1339
 
1297
1340
  For more example of how to use the pof Python API check the
1298
1341
  [examples/](./examples) directory.
@@ -1374,6 +1417,13 @@ python3 -m build
1374
1417
  python3 -m twine check dist/*
1375
1418
  ```
1376
1419
 
1420
+ Update evasion documentation:
1421
+
1422
+ ```bash
1423
+ pip install .
1424
+ ./scripts/generate_evasion_docs.py > evasion.md
1425
+ ```
1426
+
1377
1427
  ## Python 2
1378
1428
 
1379
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
 
@@ -322,6 +337,7 @@ Other very basic obfuscation functions are done by specific obfuscators like:
322
337
  `LoggingRemoveObfuscator`.
323
338
  - Remove empty lines with `NewlineObfuscator`.
324
339
  - Remove print statements with `PrintObfuscator`.
340
+ - Remove type hints with `TypeHintsObfuscator`.
325
341
 
326
342
  #### StringsObfuscator
327
343
 
@@ -372,6 +388,15 @@ print(len('bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'))
372
388
 
373
389
  # Boolean
374
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)))
375
400
  ```
376
401
 
377
402
  #### BooleanObfuscator
@@ -379,23 +404,22 @@ print((True+True+True+True+True+True+True+True+True+True+True+True+True+True+Tru
379
404
  Source: `print(True)`
380
405
 
381
406
  ```python
382
- # not False
383
407
  print(not False)
384
-
385
- # all([])
386
408
  print(all([]))
387
-
388
- # any([True])
389
409
  print(any([True]))
390
-
391
- # not not True
392
410
  print(not not True)
393
-
394
- # '' in ''
395
411
  print('' in '')
396
-
397
- # bool(1)
398
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))
399
423
  ```
400
424
 
401
425
  #### ConstantsObfuscator
@@ -539,16 +563,16 @@ exec("".join([chr(ord(i)-3)for i in'sulqw+*Khoor/#zruog*,\r']))
539
563
 
540
564
  #### DocstringObfuscator
541
565
 
566
+ Store original code inside functions and classes comments as base64.
567
+
542
568
  ```python
543
569
  from base64 import b64decode
544
- class Foo:
545
- """
546
- cHJpbnQoJ0hlbGxvLCB3b3JsZCcpCg==
547
- """
548
- pass
549
570
 
571
+ class L8EU:
572
+ """cHJpbnQoIkhlbGxvLCB3b3JsZCEiKQo="""
573
+ pass
550
574
 
551
- exec(b64decode(Foo.__doc__.replace('\n','').replace(' ','')))
575
+ exec(b64decode("".join([L8EU.__doc__]).replace('\\n','').replace(' ','')))
552
576
  ```
553
577
 
554
578
  #### SpacenTabObfuscator
@@ -853,8 +877,6 @@ def greet(name):
853
877
 
854
878
  Insert dead (unreachable/unused) code blocks into the source.
855
879
 
856
- Source: `print('Hello, world')`
857
-
858
880
  ```python
859
881
  while False:
860
882
  Etb4inx6B1=[21,7,46,2]
@@ -864,6 +886,26 @@ while False:
864
886
  print('Hello, world')
865
887
  ```
866
888
 
889
+ #### AddTypeHintsObfuscator
890
+
891
+ Insert random type hints.
892
+
893
+ Source:
894
+
895
+ ```python
896
+ def foo(x):
897
+ z = x + 2
898
+ print(z)
899
+ ```
900
+
901
+ Obfuscated:
902
+
903
+ ```python
904
+ def foo(x: dict[dict[bytearray, None], frozenset[complex]])-> str | type:
905
+ z: complex | dict[memoryview, complex]=x+2
906
+ print(z)
907
+ ```
908
+
867
909
  ### Stager
868
910
 
869
911
  #### DownloadStager
@@ -1246,8 +1288,9 @@ times, and we finally convert the tokens back to code.
1246
1288
  By chaining multiple obfuscations techniques we can create very complex and
1247
1289
  custom output.
1248
1290
 
1249
- Pof also provide evasions methods, detailed below, they are useful for quick and
1250
- 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).
1251
1294
 
1252
1295
  For more example of how to use the pof Python API check the
1253
1296
  [examples/](./examples) directory.
@@ -1329,6 +1372,13 @@ python3 -m build
1329
1372
  python3 -m twine check dist/*
1330
1373
  ```
1331
1374
 
1375
+ Update evasion documentation:
1376
+
1377
+ ```bash
1378
+ pip install .
1379
+ ./scripts/generate_evasion_docs.py > evasion.md
1380
+ ```
1381
+
1332
1382
  ## Python 2
1333
1383
 
1334
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
+ ]