PyMemoryEditor 1.6.0__tar.gz → 2.0.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 (199) hide show
  1. pymemoryeditor-2.0.0/.flake8 +12 -0
  2. pymemoryeditor-2.0.0/.gitignore +83 -0
  3. pymemoryeditor-2.0.0/.readthedocs.yaml +24 -0
  4. pymemoryeditor-2.0.0/CODE_OF_CONDUCT.md +128 -0
  5. pymemoryeditor-2.0.0/CONTRIBUTING.md +98 -0
  6. {pymemoryeditor-1.6.0 → pymemoryeditor-2.0.0}/Makefile +67 -32
  7. pymemoryeditor-2.0.0/PKG-INFO +214 -0
  8. pymemoryeditor-2.0.0/PyMemoryEditor/__init__.py +105 -0
  9. pymemoryeditor-2.0.0/PyMemoryEditor/__main__.py +4 -0
  10. pymemoryeditor-2.0.0/PyMemoryEditor/app/__init__.py +9 -0
  11. pymemoryeditor-2.0.0/PyMemoryEditor/app/_auto_refresh_dialog.py +131 -0
  12. pymemoryeditor-2.0.0/PyMemoryEditor/app/_icon.py +50 -0
  13. pymemoryeditor-2.0.0/PyMemoryEditor/app/_widgets.py +162 -0
  14. pymemoryeditor-2.0.0/PyMemoryEditor/app/application.py +510 -0
  15. pymemoryeditor-2.0.0/PyMemoryEditor/app/assets/icon.svg +156 -0
  16. pymemoryeditor-2.0.0/PyMemoryEditor/app/cheat_entry.py +83 -0
  17. pymemoryeditor-2.0.0/PyMemoryEditor/app/cheat_poll_worker.py +248 -0
  18. pymemoryeditor-2.0.0/PyMemoryEditor/app/cheat_table.py +892 -0
  19. pymemoryeditor-2.0.0/PyMemoryEditor/app/log_console_dialog.py +198 -0
  20. pymemoryeditor-2.0.0/PyMemoryEditor/app/main_window.py +991 -0
  21. pymemoryeditor-2.0.0/PyMemoryEditor/app/memory_map_dialog.py +593 -0
  22. pymemoryeditor-2.0.0/PyMemoryEditor/app/memory_viewer_dialog.py +286 -0
  23. pymemoryeditor-2.0.0/PyMemoryEditor/app/modules_dialog.py +282 -0
  24. pymemoryeditor-2.0.0/PyMemoryEditor/app/open_process_dialog.py +418 -0
  25. pymemoryeditor-2.0.0/PyMemoryEditor/app/pointer_chain_dialog.py +499 -0
  26. pymemoryeditor-2.0.0/PyMemoryEditor/app/pointer_scan_dialog.py +1001 -0
  27. pymemoryeditor-2.0.0/PyMemoryEditor/app/results_view.py +313 -0
  28. pymemoryeditor-2.0.0/PyMemoryEditor/app/scan_types.py +56 -0
  29. pymemoryeditor-2.0.0/PyMemoryEditor/app/scan_worker.py +409 -0
  30. pymemoryeditor-2.0.0/PyMemoryEditor/app/scanner_panel.py +438 -0
  31. pymemoryeditor-2.0.0/PyMemoryEditor/app/threads_dialog.py +171 -0
  32. pymemoryeditor-2.0.0/PyMemoryEditor/app/value_types.py +312 -0
  33. {pymemoryeditor-1.6.0 → pymemoryeditor-2.0.0}/PyMemoryEditor/enums.py +1 -0
  34. pymemoryeditor-2.0.0/PyMemoryEditor/linux/functions.py +614 -0
  35. pymemoryeditor-2.0.0/PyMemoryEditor/linux/libc.py +38 -0
  36. pymemoryeditor-2.0.0/PyMemoryEditor/linux/process.py +245 -0
  37. pymemoryeditor-2.0.0/PyMemoryEditor/linux/types.py +50 -0
  38. pymemoryeditor-2.0.0/PyMemoryEditor/macos/__init__.py +3 -0
  39. pymemoryeditor-2.0.0/PyMemoryEditor/macos/functions.py +1137 -0
  40. pymemoryeditor-2.0.0/PyMemoryEditor/macos/libsystem.py +260 -0
  41. pymemoryeditor-2.0.0/PyMemoryEditor/macos/process.py +350 -0
  42. pymemoryeditor-2.0.0/PyMemoryEditor/macos/types.py +152 -0
  43. {pymemoryeditor-1.6.0 → pymemoryeditor-2.0.0}/PyMemoryEditor/process/__init__.py +2 -0
  44. pymemoryeditor-2.0.0/PyMemoryEditor/process/abstract.py +1164 -0
  45. pymemoryeditor-2.0.0/PyMemoryEditor/process/errors.py +58 -0
  46. pymemoryeditor-2.0.0/PyMemoryEditor/process/info.py +57 -0
  47. pymemoryeditor-2.0.0/PyMemoryEditor/process/module_info.py +52 -0
  48. pymemoryeditor-2.0.0/PyMemoryEditor/process/pointer_scan.py +471 -0
  49. pymemoryeditor-2.0.0/PyMemoryEditor/process/region.py +263 -0
  50. pymemoryeditor-2.0.0/PyMemoryEditor/process/remote_pointer.py +244 -0
  51. pymemoryeditor-2.0.0/PyMemoryEditor/process/scanning.py +450 -0
  52. pymemoryeditor-2.0.0/PyMemoryEditor/process/thread_info.py +52 -0
  53. pymemoryeditor-2.0.0/PyMemoryEditor/process/util.py +101 -0
  54. pymemoryeditor-2.0.0/PyMemoryEditor/py.typed +0 -0
  55. pymemoryeditor-2.0.0/PyMemoryEditor/util/__init__.py +22 -0
  56. pymemoryeditor-2.0.0/PyMemoryEditor/util/convert.py +309 -0
  57. pymemoryeditor-2.0.0/PyMemoryEditor/util/pattern.py +116 -0
  58. pymemoryeditor-2.0.0/PyMemoryEditor/util/scan.py +455 -0
  59. pymemoryeditor-2.0.0/PyMemoryEditor/util/scan_numpy.py +145 -0
  60. pymemoryeditor-2.0.0/PyMemoryEditor/win32/enums/memory_allocation_states.py +30 -0
  61. pymemoryeditor-2.0.0/PyMemoryEditor/win32/enums/memory_protections.py +76 -0
  62. pymemoryeditor-2.0.0/PyMemoryEditor/win32/enums/memory_types.py +21 -0
  63. pymemoryeditor-2.0.0/PyMemoryEditor/win32/enums/process_operations.py +61 -0
  64. pymemoryeditor-2.0.0/PyMemoryEditor/win32/enums/standard_access_rights.py +26 -0
  65. pymemoryeditor-2.0.0/PyMemoryEditor/win32/functions.py +912 -0
  66. pymemoryeditor-2.0.0/PyMemoryEditor/win32/process.py +349 -0
  67. pymemoryeditor-2.0.0/PyMemoryEditor/win32/types.py +143 -0
  68. pymemoryeditor-2.0.0/README.md +156 -0
  69. pymemoryeditor-2.0.0/SECURITY.md +49 -0
  70. pymemoryeditor-2.0.0/assets/screenshots/app.png +0 -0
  71. pymemoryeditor-2.0.0/assets/social-preview.html +88 -0
  72. pymemoryeditor-2.0.0/assets/social-preview.png +0 -0
  73. pymemoryeditor-2.0.0/docs/_static/.gitkeep +0 -0
  74. pymemoryeditor-2.0.0/docs/_static/custom.css +226 -0
  75. pymemoryeditor-2.0.0/docs/_templates/layout.html +18 -0
  76. pymemoryeditor-2.0.0/docs/api/enums.md +128 -0
  77. pymemoryeditor-2.0.0/docs/api/errors.md +193 -0
  78. pymemoryeditor-2.0.0/docs/api/index.md +33 -0
  79. pymemoryeditor-2.0.0/docs/api/memory-region.md +121 -0
  80. pymemoryeditor-2.0.0/docs/api/module-info.md +91 -0
  81. pymemoryeditor-2.0.0/docs/api/openprocess.md +354 -0
  82. pymemoryeditor-2.0.0/docs/api/pointer-path.md +148 -0
  83. pymemoryeditor-2.0.0/docs/api/remote-pointer.md +181 -0
  84. pymemoryeditor-2.0.0/docs/api/thread-info.md +100 -0
  85. pymemoryeditor-2.0.0/docs/api/utilities.md +190 -0
  86. pymemoryeditor-2.0.0/docs/app.md +128 -0
  87. pymemoryeditor-2.0.0/docs/conf.py +123 -0
  88. pymemoryeditor-2.0.0/docs/contributing.md +5 -0
  89. pymemoryeditor-2.0.0/docs/funding.md +11 -0
  90. pymemoryeditor-2.0.0/docs/glossary.md +99 -0
  91. pymemoryeditor-2.0.0/docs/guide/allocate-free.md +180 -0
  92. pymemoryeditor-2.0.0/docs/guide/index.md +53 -0
  93. pymemoryeditor-2.0.0/docs/guide/logging.md +83 -0
  94. pymemoryeditor-2.0.0/docs/guide/memory-regions.md +133 -0
  95. pymemoryeditor-2.0.0/docs/guide/modules-threads.md +172 -0
  96. pymemoryeditor-2.0.0/docs/guide/opening-process.md +154 -0
  97. pymemoryeditor-2.0.0/docs/guide/pattern-scan.md +148 -0
  98. pymemoryeditor-2.0.0/docs/guide/pointer-scan.md +188 -0
  99. pymemoryeditor-2.0.0/docs/guide/pointers.md +191 -0
  100. pymemoryeditor-2.0.0/docs/guide/read-write.md +232 -0
  101. pymemoryeditor-2.0.0/docs/guide/searching.md +301 -0
  102. pymemoryeditor-2.0.0/docs/index.md +151 -0
  103. pymemoryeditor-2.0.0/docs/installation.md +115 -0
  104. pymemoryeditor-2.0.0/docs/license.md +10 -0
  105. pymemoryeditor-2.0.0/docs/platform-notes.md +203 -0
  106. pymemoryeditor-2.0.0/docs/quickstart.md +142 -0
  107. pymemoryeditor-2.0.0/docs/requirements.txt +7 -0
  108. pymemoryeditor-2.0.0/docs/troubleshooting.md +173 -0
  109. pymemoryeditor-2.0.0/docs/why.md +117 -0
  110. pymemoryeditor-2.0.0/pyproject.toml +179 -0
  111. pymemoryeditor-2.0.0/tests/app/__init__.py +0 -0
  112. pymemoryeditor-2.0.0/tests/app/test_app_cheat_entry.py +85 -0
  113. pymemoryeditor-2.0.0/tests/app/test_app_pointer_parsing.py +80 -0
  114. pymemoryeditor-2.0.0/tests/app/test_app_scan_request.py +154 -0
  115. pymemoryeditor-2.0.0/tests/app/test_app_smoke.py +164 -0
  116. pymemoryeditor-2.0.0/tests/app/test_app_value_types.py +205 -0
  117. pymemoryeditor-2.0.0/tests/app/test_cheat_poll_worker.py +305 -0
  118. pymemoryeditor-2.0.0/tests/app/test_refine_scan_worker.py +127 -0
  119. pymemoryeditor-2.0.0/tests/conftest.py +5 -0
  120. pymemoryeditor-2.0.0/tests/core/__init__.py +0 -0
  121. pymemoryeditor-2.0.0/tests/core/test_errors.py +64 -0
  122. pymemoryeditor-2.0.0/tests/core/test_logger.py +99 -0
  123. pymemoryeditor-2.0.0/tests/memory/__init__.py +0 -0
  124. pymemoryeditor-2.0.0/tests/memory/test_allocate_free.py +110 -0
  125. pymemoryeditor-2.0.0/tests/memory/test_bufflength_inference.py +231 -0
  126. pymemoryeditor-2.0.0/tests/memory/test_editor.py +369 -0
  127. pymemoryeditor-2.0.0/tests/memory/test_partial_io.py +189 -0
  128. pymemoryeditor-2.0.0/tests/memory/test_str_boundary.py +138 -0
  129. pymemoryeditor-2.0.0/tests/memory/test_str_decode_consistency.py +52 -0
  130. pymemoryeditor-2.0.0/tests/memory/test_typed_accessors.py +160 -0
  131. pymemoryeditor-2.0.0/tests/memory/test_write_safety.py +210 -0
  132. pymemoryeditor-2.0.0/tests/memory/test_write_str_bytes_width.py +175 -0
  133. pymemoryeditor-2.0.0/tests/platforms/__init__.py +0 -0
  134. pymemoryeditor-2.0.0/tests/platforms/test_bitness.py +130 -0
  135. pymemoryeditor-2.0.0/tests/platforms/test_bitness_fallback_warns.py +76 -0
  136. pymemoryeditor-2.0.0/tests/platforms/test_linux_types.py +70 -0
  137. pymemoryeditor-2.0.0/tests/platforms/test_macos_protect.py +187 -0
  138. pymemoryeditor-2.0.0/tests/platforms/test_win32_permissions.py +114 -0
  139. pymemoryeditor-2.0.0/tests/pointer/__init__.py +0 -0
  140. pymemoryeditor-2.0.0/tests/pointer/test_pointer_chain.py +166 -0
  141. pymemoryeditor-2.0.0/tests/pointer/test_pointer_scan.py +458 -0
  142. pymemoryeditor-2.0.0/tests/pointer/test_remote_pointer.py +211 -0
  143. pymemoryeditor-2.0.0/tests/process/__init__.py +0 -0
  144. pymemoryeditor-2.0.0/tests/process/test_memory_region.py +123 -0
  145. pymemoryeditor-2.0.0/tests/process/test_module_enumeration.py +156 -0
  146. pymemoryeditor-2.0.0/tests/process/test_partial_name_match.py +121 -0
  147. pymemoryeditor-2.0.0/tests/process/test_process_enumeration.py +116 -0
  148. pymemoryeditor-2.0.0/tests/process/test_process_lookup.py +96 -0
  149. pymemoryeditor-2.0.0/tests/process/test_thread_enumeration.py +134 -0
  150. pymemoryeditor-2.0.0/tests/scan/__init__.py +0 -0
  151. pymemoryeditor-2.0.0/tests/scan/test_chunking_integration.py +125 -0
  152. pymemoryeditor-2.0.0/tests/scan/test_pattern_compile.py +129 -0
  153. pymemoryeditor-2.0.0/tests/scan/test_pattern_scan.py +123 -0
  154. pymemoryeditor-2.0.0/tests/scan/test_region_snapshot.py +75 -0
  155. pymemoryeditor-2.0.0/tests/scan/test_scan.py +488 -0
  156. pymemoryeditor-2.0.0/tests/scan/test_scan_numpy.py +204 -0
  157. pymemoryeditor-2.0.0/tests/scan/test_scan_properties.py +290 -0
  158. pymemoryeditor-2.0.0/tests/scan/test_scanning_helper.py +192 -0
  159. pymemoryeditor-1.6.0/.flake8 +0 -11
  160. pymemoryeditor-1.6.0/.github/workflows/python-package.yml +0 -40
  161. pymemoryeditor-1.6.0/.gitignore +0 -7
  162. pymemoryeditor-1.6.0/.tool-versions +0 -1
  163. pymemoryeditor-1.6.0/PKG-INFO +0 -129
  164. pymemoryeditor-1.6.0/PyMemoryEditor/__init__.py +0 -28
  165. pymemoryeditor-1.6.0/PyMemoryEditor/__main__.py +0 -4
  166. pymemoryeditor-1.6.0/PyMemoryEditor/linux/functions.py +0 -243
  167. pymemoryeditor-1.6.0/PyMemoryEditor/linux/process.py +0 -123
  168. pymemoryeditor-1.6.0/PyMemoryEditor/linux/ptrace/__init__.py +0 -4
  169. pymemoryeditor-1.6.0/PyMemoryEditor/linux/ptrace/enums.py +0 -111
  170. pymemoryeditor-1.6.0/PyMemoryEditor/linux/ptrace/ptrace.py +0 -31
  171. pymemoryeditor-1.6.0/PyMemoryEditor/linux/types.py +0 -40
  172. pymemoryeditor-1.6.0/PyMemoryEditor/process/abstract.py +0 -160
  173. pymemoryeditor-1.6.0/PyMemoryEditor/process/errors.py +0 -32
  174. pymemoryeditor-1.6.0/PyMemoryEditor/process/info.py +0 -59
  175. pymemoryeditor-1.6.0/PyMemoryEditor/process/util.py +0 -33
  176. pymemoryeditor-1.6.0/PyMemoryEditor/sample/application.py +0 -24
  177. pymemoryeditor-1.6.0/PyMemoryEditor/sample/main_application_window.py +0 -592
  178. pymemoryeditor-1.6.0/PyMemoryEditor/sample/open_process_window.py +0 -133
  179. pymemoryeditor-1.6.0/PyMemoryEditor/util/__init__.py +0 -4
  180. pymemoryeditor-1.6.0/PyMemoryEditor/util/convert.py +0 -42
  181. pymemoryeditor-1.6.0/PyMemoryEditor/util/scan.py +0 -84
  182. pymemoryeditor-1.6.0/PyMemoryEditor/util/search/abstract.py +0 -12
  183. pymemoryeditor-1.6.0/PyMemoryEditor/util/search/bmh.py +0 -56
  184. pymemoryeditor-1.6.0/PyMemoryEditor/util/search/kmp.py +0 -47
  185. pymemoryeditor-1.6.0/PyMemoryEditor/win32/enums/memory_allocation_states.py +0 -49
  186. pymemoryeditor-1.6.0/PyMemoryEditor/win32/enums/memory_protections.py +0 -93
  187. pymemoryeditor-1.6.0/PyMemoryEditor/win32/enums/memory_types.py +0 -16
  188. pymemoryeditor-1.6.0/PyMemoryEditor/win32/enums/process_operations.py +0 -58
  189. pymemoryeditor-1.6.0/PyMemoryEditor/win32/enums/standard_access_rights.py +0 -26
  190. pymemoryeditor-1.6.0/PyMemoryEditor/win32/functions.py +0 -300
  191. pymemoryeditor-1.6.0/PyMemoryEditor/win32/process.py +0 -175
  192. pymemoryeditor-1.6.0/PyMemoryEditor/win32/types.py +0 -52
  193. pymemoryeditor-1.6.0/README.md +0 -97
  194. pymemoryeditor-1.6.0/pyproject.toml +0 -64
  195. pymemoryeditor-1.6.0/requirements.txt +0 -2
  196. pymemoryeditor-1.6.0/tests/conftest.py +0 -7
  197. pymemoryeditor-1.6.0/tests/test_editor.py +0 -343
  198. {pymemoryeditor-1.6.0 → pymemoryeditor-2.0.0}/LICENSE +0 -0
  199. {pymemoryeditor-1.6.0 → pymemoryeditor-2.0.0}/PyMemoryEditor/win32/enums/__init__.py +0 -0
@@ -0,0 +1,12 @@
1
+ [flake8]
2
+
3
+ max-line-length = 130
4
+ # E203: whitespace before ':' (black-compatible — black puts spaces around the
5
+ # colon in slices like data[i : i + n], which conflicts with PEP 8).
6
+ # E701: multiple statements on one line (colon) — used pervasively as a style choice.
7
+ # W503: line break before binary operator (black-compatible).
8
+ ignore = E203, E701, W503
9
+
10
+ per-file-ignores =
11
+ # __init__.py files are allowed to have unused imports and lines-too-long.
12
+ */__init__.py:F401, E501
@@ -0,0 +1,83 @@
1
+ # Byte-compiled / cached
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # Build / packaging
7
+ build/
8
+ .build/
9
+ dist/
10
+ *.egg-info/
11
+ *.egg
12
+ .eggs/
13
+ *.whl
14
+ *.tar.gz
15
+ pip-log.txt
16
+ pip-delete-this-directory.txt
17
+ MANIFEST
18
+
19
+ # Virtual environments
20
+ venv/
21
+ .venv/
22
+ env/
23
+ ENV/
24
+
25
+ # Testing & coverage
26
+ .pytest_cache/
27
+ *.pytest_cache
28
+ .coverage
29
+ .coverage.*
30
+ htmlcov/
31
+ coverage.xml
32
+ *.cover
33
+ .tox/
34
+ .nox/
35
+ .hypothesis/
36
+
37
+ # Type checkers & linters
38
+ .mypy_cache/
39
+ .ruff_cache/
40
+ .pyre/
41
+ .pytype/
42
+
43
+ # IDEs / editors
44
+ .idea/
45
+ .vscode/
46
+ *.code-workspace
47
+ *.sublime-*
48
+ .spyderproject
49
+ .spyproject
50
+
51
+ # Editor swap / backup files
52
+ *.swp
53
+ *.swo
54
+ *~
55
+ .\#*
56
+ \#*\#
57
+
58
+ # OS-specific cruft
59
+ .DS_Store
60
+ .AppleDouble
61
+ .LSOverride
62
+ Thumbs.db
63
+ Desktop.ini
64
+ .directory
65
+
66
+ # Toolchain / version pinning state
67
+ .tool-versions
68
+ .python-version
69
+
70
+ # Local environment files (never commit secrets)
71
+ .env
72
+ .env.local
73
+ .env.*.local
74
+
75
+ # Logs / temporary
76
+ *.log
77
+ *.tmp
78
+
79
+ # Sphinx / docs build output
80
+ docs/_build/
81
+
82
+ # Project-local
83
+ .claude/
@@ -0,0 +1,24 @@
1
+ # Read the Docs configuration file for Sphinx + MyST.
2
+ # See https://docs.readthedocs.io/en/stable/config-file/v2.html
3
+
4
+ version: 2
5
+
6
+ build:
7
+ os: ubuntu-22.04
8
+ tools:
9
+ python: "3.11"
10
+
11
+ sphinx:
12
+ configuration: docs/conf.py
13
+ fail_on_warning: false
14
+
15
+ formats:
16
+ - htmlzip
17
+ - pdf
18
+ - epub
19
+
20
+ python:
21
+ install:
22
+ - requirements: docs/requirements.txt
23
+ - method: pip
24
+ path: .
@@ -0,0 +1,128 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our
6
+ community a harassment-free experience for everyone, regardless of age, body
7
+ size, visible or invisible disability, ethnicity, sex characteristics, gender
8
+ identity and expression, level of experience, education, socio-economic status,
9
+ nationality, personal appearance, race, religion, or sexual identity
10
+ and orientation.
11
+
12
+ We pledge to act and interact in ways that contribute to an open, welcoming,
13
+ diverse, inclusive, and healthy community.
14
+
15
+ ## Our Standards
16
+
17
+ Examples of behavior that contributes to a positive environment for our
18
+ community include:
19
+
20
+ * Demonstrating empathy and kindness toward other people
21
+ * Being respectful of differing opinions, viewpoints, and experiences
22
+ * Giving and gracefully accepting constructive feedback
23
+ * Accepting responsibility and apologizing to those affected by our mistakes,
24
+ and learning from the experience
25
+ * Focusing on what is best not just for us as individuals, but for the
26
+ overall community
27
+
28
+ Examples of unacceptable behavior include:
29
+
30
+ * The use of sexualized language or imagery, and sexual attention or
31
+ advances of any kind
32
+ * Trolling, insulting or derogatory comments, and personal or political attacks
33
+ * Public or private harassment
34
+ * Publishing others' private information, such as a physical or email
35
+ address, without their explicit permission
36
+ * Other conduct which could reasonably be considered inappropriate in a
37
+ professional setting
38
+
39
+ ## Enforcement Responsibilities
40
+
41
+ Community leaders are responsible for clarifying and enforcing our standards of
42
+ acceptable behavior and will take appropriate and fair corrective action in
43
+ response to any behavior that they deem inappropriate, threatening, offensive,
44
+ or harmful.
45
+
46
+ Community leaders have the right and responsibility to remove, edit, or reject
47
+ comments, commits, code, wiki edits, issues, and other contributions that are
48
+ not aligned to this Code of Conduct, and will communicate reasons for moderation
49
+ decisions when appropriate.
50
+
51
+ ## Scope
52
+
53
+ This Code of Conduct applies within all community spaces, and also applies when
54
+ an individual is officially representing the community in public spaces.
55
+ Examples of representing our community include using an official e-mail address,
56
+ posting via an official social media account, or acting as an appointed
57
+ representative at an online or offline event.
58
+
59
+ ## Enforcement
60
+
61
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
62
+ reported to the community leaders responsible for enforcement at
63
+ .
64
+ All complaints will be reviewed and investigated promptly and fairly.
65
+
66
+ All community leaders are obligated to respect the privacy and security of the
67
+ reporter of any incident.
68
+
69
+ ## Enforcement Guidelines
70
+
71
+ Community leaders will follow these Community Impact Guidelines in determining
72
+ the consequences for any action they deem in violation of this Code of Conduct:
73
+
74
+ ### 1. Correction
75
+
76
+ **Community Impact**: Use of inappropriate language or other behavior deemed
77
+ unprofessional or unwelcome in the community.
78
+
79
+ **Consequence**: A private, written warning from community leaders, providing
80
+ clarity around the nature of the violation and an explanation of why the
81
+ behavior was inappropriate. A public apology may be requested.
82
+
83
+ ### 2. Warning
84
+
85
+ **Community Impact**: A violation through a single incident or series
86
+ of actions.
87
+
88
+ **Consequence**: A warning with consequences for continued behavior. No
89
+ interaction with the people involved, including unsolicited interaction with
90
+ those enforcing the Code of Conduct, for a specified period of time. This
91
+ includes avoiding interactions in community spaces as well as external channels
92
+ like social media. Violating these terms may lead to a temporary or
93
+ permanent ban.
94
+
95
+ ### 3. Temporary Ban
96
+
97
+ **Community Impact**: A serious violation of community standards, including
98
+ sustained inappropriate behavior.
99
+
100
+ **Consequence**: A temporary ban from any sort of interaction or public
101
+ communication with the community for a specified period of time. No public or
102
+ private interaction with the people involved, including unsolicited interaction
103
+ with those enforcing the Code of Conduct, is allowed during this period.
104
+ Violating these terms may lead to a permanent ban.
105
+
106
+ ### 4. Permanent Ban
107
+
108
+ **Community Impact**: Demonstrating a pattern of violation of community
109
+ standards, including sustained inappropriate behavior, harassment of an
110
+ individual, or aggression toward or disparagement of classes of individuals.
111
+
112
+ **Consequence**: A permanent ban from any sort of public interaction within
113
+ the community.
114
+
115
+ ## Attribution
116
+
117
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118
+ version 2.0, available at
119
+ https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
120
+
121
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct
122
+ enforcement ladder](https://github.com/mozilla/diversity).
123
+
124
+ [homepage]: https://www.contributor-covenant.org
125
+
126
+ For answers to common questions about this code of conduct, see the FAQ at
127
+ https://www.contributor-covenant.org/faq. Translations are available at
128
+ https://www.contributor-covenant.org/translations.
@@ -0,0 +1,98 @@
1
+ # Contributing to PyMemoryEditor
2
+
3
+ Thanks for your interest in contributing!
4
+
5
+ ## Development setup
6
+
7
+ ```bash
8
+ python -m venv venv
9
+ source venv/bin/activate # On Windows: venv\Scripts\activate
10
+ make install-dev # pip install -e ".[dev]"
11
+ ```
12
+
13
+ The `dev` extra installs the full toolchain and the GUI deps.
14
+
15
+ The `Makefile` is the single source of truth for the dev commands below — run
16
+ `make help` to see every target (docs, build, coverage, etc.). The raw command
17
+ each target wraps is shown in parentheses if you'd rather run it directly.
18
+
19
+ ## Running the test suite
20
+
21
+ The tests read and write the memory of the test process itself; they should run
22
+ on any supported platform without elevated privileges.
23
+
24
+ ```bash
25
+ make test # pytest tests -v
26
+ ```
27
+
28
+ ## Linting
29
+
30
+ ```bash
31
+ make lint # flake8 PyMemoryEditor tests
32
+ ```
33
+
34
+ ## Type checking
35
+
36
+ ```bash
37
+ make type-check # mypy PyMemoryEditor
38
+ ```
39
+
40
+ ## Before you push
41
+
42
+ Run lint, type-check and the test suite in one go:
43
+
44
+ ```bash
45
+ make pre-commit # lint + type-check + test
46
+ ```
47
+
48
+ The CI pipeline runs the same lint, mypy and tests, and blocks merges on failure.
49
+ The test matrix runs on Ubuntu, Windows and macOS across multiple Python versions, so
50
+ all three platform backends are exercised on every push. A dedicated job also
51
+ runs the suite with the `speed` extra (NumPy) to keep the vectorized scan path
52
+ covered. Even so, contributors touching a specific backend are encouraged to
53
+ run `pytest tests` locally on that platform before submitting.
54
+
55
+ ## Project layout
56
+
57
+ ```
58
+ PyMemoryEditor/
59
+ ├── __init__.py # Public API + platform dispatch
60
+ ├── enums.py # ScanTypesEnum (cross-platform)
61
+ ├── process/ # Abstract base, errors, process info, util
62
+ ├── util/ # Cross-platform helpers: scan and type conversion
63
+ ├── win32/ # Windows implementation (kernel32, user32)
64
+ ├── linux/ # Linux implementation (process_vm_readv/writev, /proc/<pid>/maps)
65
+ ├── macos/ # macOS implementation (task_for_pid, mach_vm_*)
66
+ └── app/ # PySide6 (Qt) demo app exposed as `pymemoryeditor` CLI
67
+ ```
68
+
69
+ The three platform packages implement `AbstractProcess` from `process/abstract.py`.
70
+ The public alias `OpenProcess` is chosen at import time in `__init__.py` based on
71
+ `sys.platform`.
72
+
73
+ ### Platform-specific test notes
74
+ - **Linux**: requires `/proc/sys/kernel/yama/ptrace_scope=0` to attach to processes
75
+ not descended from the test runner. Self-process tests work without changes.
76
+ - **macOS**: opening another process requires the Python binary to be signed with
77
+ the `com.apple.security.cs.debugger` entitlement (or SIP off + root). Self-
78
+ process tests work without changes.
79
+ - **Windows**: no special privileges needed for self-process tests.
80
+
81
+ ## Submitting changes
82
+
83
+ 1. Open an issue first for bug reports or substantial features.
84
+ 2. Branch from `main`. Keep commits focused.
85
+ 3. Run `make pre-commit` (lint + type-check + tests) locally before pushing.
86
+ 4. Open a PR describing the change and how it was tested.
87
+
88
+ ## Reporting bugs
89
+
90
+ Please include:
91
+ - Operating system and architecture (e.g. Windows 11 x64, Ubuntu 22.04 x64).
92
+ - Python version (`python --version`).
93
+ - A minimal reproducer if possible.
94
+ - For Linux: whether `/proc/sys/kernel/yama/ptrace_scope` is `0` or `1`.
95
+
96
+ ## Security
97
+
98
+ If you find a security issue, please see [`SECURITY.md`](https://github.com/JeanExtreme002/PyMemoryEditor/blob/main/SECURITY.md). **Do not** report via GitHub issues.
@@ -9,6 +9,8 @@ DIST_DIR = dist
9
9
  EGG_INFO = $(PACKAGE_NAME).egg-info
10
10
  VENV_DIR = venv
11
11
  TEST_DIR = tests
12
+ DOCS_DIR = docs
13
+ DOCS_BUILD_DIR = $(DOCS_DIR)/_build/html
12
14
 
13
15
  # Colors for output
14
16
  GREEN = \033[0;32m
@@ -25,12 +27,13 @@ help:
25
27
  @echo "Available targets:"
26
28
  @echo " $(YELLOW)install$(NC) - Install package in development mode"
27
29
  @echo " $(YELLOW)install-deps$(NC) - Install dependencies"
30
+ @echo " $(YELLOW)install-app$(NC) - Install dependencies to run the PyMemoryEditor App"
31
+ @echo " $(YELLOW)run-app$(NC) - Run the PyMemoryEditor App"
28
32
  @echo " $(YELLOW)install-dev$(NC) - Install development dependencies"
29
33
  @echo " $(YELLOW)test$(NC) - Run tests"
30
34
  @echo " $(YELLOW)test-verbose$(NC) - Run tests with verbose output"
31
35
  @echo " $(YELLOW)test-coverage$(NC) - Run tests with coverage report"
32
36
  @echo " $(YELLOW)lint$(NC) - Run linter (flake8)"
33
- @echo " $(YELLOW)lint-fix$(NC) - Run auto-formatter (black)"
34
37
  @echo " $(YELLOW)type-check$(NC) - Run type checker (mypy)"
35
38
  @echo " $(YELLOW)clean$(NC) - Clean build artifacts"
36
39
  @echo " $(YELLOW)build$(NC) - Build package"
@@ -43,7 +46,10 @@ help:
43
46
  @echo " $(YELLOW)check-deps$(NC) - Check for outdated dependencies"
44
47
  @echo " $(YELLOW)update-deps$(NC) - Update dependencies"
45
48
  @echo " $(YELLOW)security$(NC) - Run security audit"
46
- @echo " $(YELLOW)docs$(NC) - Generate documentation"
49
+ @echo " $(YELLOW)install-docs$(NC) - Install dependencies to build the documentation"
50
+ @echo " $(YELLOW)docs$(NC) - Build the HTML documentation (output: $(DOCS_BUILD_DIR))"
51
+ @echo " $(YELLOW)docs-serve$(NC) - Live-reload docs server at http://127.0.0.1:8000"
52
+ @echo " $(YELLOW)docs-clean$(NC) - Remove the docs build directory"
47
53
  @echo " $(YELLOW)venv$(NC) - Create virtual environment"
48
54
  @echo " $(YELLOW)venv-activate$(NC) - Show command to activate venv"
49
55
  @echo " $(YELLOW)all$(NC) - Run full pipeline (install, lint, test, build)"
@@ -62,24 +68,37 @@ venv-activate:
62
68
  @echo "$(YELLOW)To activate virtual environment run:$(NC)"
63
69
  @echo "source $(VENV_DIR)/bin/activate"
64
70
 
65
- # Install dependencies
71
+ # Install dependencies (uses pyproject.toml — requirements.txt was removed in v2.0)
66
72
  .PHONY: install-deps
67
73
  install-deps:
68
- @echo "$(GREEN)Installing dependencies...$(NC)"
69
- $(PIP) install -r requirements.txt
74
+ @echo "$(GREEN)Installing runtime dependencies...$(NC)"
75
+ $(PIP) install -e .
70
76
  @echo "$(GREEN)Dependencies installed successfully!$(NC)"
71
77
 
78
+ # Install dependencies to run the PyMemoryEditor App (Qt GUI)
79
+ .PHONY: install-app
80
+ install-app:
81
+ @echo "$(GREEN)Installing PyMemoryEditor App dependencies...$(NC)"
82
+ $(PIP) install -e ".[app]"
83
+ @echo "$(GREEN)App dependencies installed successfully!$(NC)"
84
+ @echo "$(YELLOW)Launch the app with: pymemoryeditor$(NC)"
85
+
86
+ # Run the PyMemoryEditor App (Qt GUI)
87
+ .PHONY: run-app
88
+ run-app:
89
+ @echo "$(GREEN)Starting PyMemoryEditor App...$(NC)"
90
+ $(PYTHON) -m PyMemoryEditor
91
+
72
92
  # Install development dependencies
73
93
  .PHONY: install-dev
74
94
  install-dev:
75
95
  @echo "$(GREEN)Installing development dependencies...$(NC)"
76
- $(PIP) install -r requirements.txt
77
- $(PIP) install pytest pytest-cov flake8 black mypy twine build hatch
96
+ $(PIP) install -e ".[dev]"
78
97
  @echo "$(GREEN)Development dependencies installed successfully!$(NC)"
79
98
 
80
99
  # Install package in development mode
81
100
  .PHONY: install
82
- install: install-deps
101
+ install:
83
102
  @echo "$(GREEN)Installing package in development mode...$(NC)"
84
103
  $(PIP) install -e .
85
104
  @echo "$(GREEN)Package installed successfully!$(NC)"
@@ -113,18 +132,11 @@ lint:
113
132
  $(PYTHON) -m flake8 $(PACKAGE_NAME) $(TEST_DIR)
114
133
  @echo "$(GREEN)Linting completed!$(NC)"
115
134
 
116
- # Run auto-formatter
117
- .PHONY: lint-fix
118
- lint-fix:
119
- @echo "$(GREEN)Running auto-formatter (black)...$(NC)"
120
- $(PYTHON) -m black $(PACKAGE_NAME) $(TEST_DIR)
121
- @echo "$(GREEN)Code formatting completed!$(NC)"
122
-
123
- # Run type checker
135
+ # Run type checker (config in pyproject.toml — ignore_missing_imports is set there)
124
136
  .PHONY: type-check
125
137
  type-check:
126
138
  @echo "$(GREEN)Running type checker (mypy)...$(NC)"
127
- $(PYTHON) -m mypy $(PACKAGE_NAME) --ignore-missing-imports
139
+ $(PYTHON) -m mypy $(PACKAGE_NAME)
128
140
  @echo "$(GREEN)Type checking completed!$(NC)"
129
141
 
130
142
  # Clean build artifacts
@@ -204,27 +216,50 @@ check-deps:
204
216
  .PHONY: update-deps
205
217
  update-deps:
206
218
  @echo "$(GREEN)Updating dependencies...$(NC)"
207
- $(PIP) install --upgrade -r requirements.txt
219
+ $(PIP) install --upgrade -e ".[dev]"
208
220
  @echo "$(GREEN)Dependencies updated!$(NC)"
209
221
 
210
- # Security audit
222
+ # Security audit — uses pip-audit (PyPA-maintained) which works without a
223
+ # paid account, unlike the older `safety` tool.
211
224
  .PHONY: security
212
225
  security:
213
- @echo "$(GREEN)Running security audit...$(NC)"
214
- $(PIP) install safety
215
- safety check
226
+ @echo "$(GREEN)Running security audit (pip-audit)...$(NC)"
227
+ $(PIP) install pip-audit
228
+ pip-audit
216
229
  @echo "$(GREEN)Security audit completed!$(NC)"
217
230
 
218
- # Generate documentation
231
+ # Install the dependencies needed to build the documentation (Sphinx + MyST +
232
+ # Furo + extensions, listed in docs/requirements.txt). Also installs the
233
+ # package itself in editable mode so autodoc can import it.
234
+ .PHONY: install-docs
235
+ install-docs:
236
+ @echo "$(GREEN)Installing documentation dependencies...$(NC)"
237
+ $(PIP) install -r $(DOCS_DIR)/requirements.txt
238
+ $(PIP) install -e .
239
+ @echo "$(GREEN)Docs dependencies installed!$(NC)"
240
+
241
+ # Build the HTML documentation. Output lands in $(DOCS_BUILD_DIR).
219
242
  .PHONY: docs
220
243
  docs:
221
- @echo "$(GREEN)Generating documentation...$(NC)"
222
- @if [ -d "docs" ]; then \
223
- cd docs && make html; \
224
- echo "$(GREEN)Documentation generated in docs/_build/html/$(NC)"; \
225
- else \
226
- echo "$(YELLOW)No docs directory found. Skipping documentation generation.$(NC)"; \
227
- fi
244
+ @echo "$(GREEN)Building HTML documentation...$(NC)"
245
+ $(PYTHON) -m sphinx -b html $(DOCS_DIR) $(DOCS_BUILD_DIR)
246
+ @echo "$(GREEN)Documentation generated at $(DOCS_BUILD_DIR)/index.html$(NC)"
247
+
248
+ # Live-reload docs server — rebuilds on every save and reloads the browser.
249
+ # Requires `sphinx-autobuild` (installed automatically via install-docs is
250
+ # optional; we install it on demand here for convenience).
251
+ .PHONY: docs-serve
252
+ docs-serve:
253
+ @echo "$(GREEN)Starting live-reload docs server at http://127.0.0.1:8000$(NC)"
254
+ @$(PYTHON) -c "import sphinx_autobuild" 2>/dev/null || $(PIP) install sphinx-autobuild
255
+ $(PYTHON) -m sphinx_autobuild $(DOCS_DIR) $(DOCS_BUILD_DIR) --open-browser
256
+
257
+ # Wipe the built docs.
258
+ .PHONY: docs-clean
259
+ docs-clean:
260
+ @echo "$(GREEN)Cleaning docs build directory...$(NC)"
261
+ rm -rf $(DOCS_DIR)/_build
262
+ @echo "$(GREEN)Docs build directory removed.$(NC)"
228
263
 
229
264
  # Full development pipeline
230
265
  .PHONY: all
@@ -261,7 +296,7 @@ info:
261
296
  @echo "Pip: $(shell $(PIP) --version)"
262
297
  @echo ""
263
298
  @echo "$(GREEN)Installed packages:$(NC)"
264
- @$(PIP) list | grep -E "($(PACKAGE_NAME)|pytest|flake8|black|mypy|twine|build)"
299
+ @$(PIP) list | grep -E "($(PACKAGE_NAME)|pytest|flake8|mypy|twine|build)"
265
300
 
266
301
  # Quick release workflow
267
302
  .PHONY: release
@@ -291,4 +326,4 @@ install-from-test-pypi:
291
326
  uninstall:
292
327
  @echo "$(GREEN)Uninstalling package...$(NC)"
293
328
  $(PIP) uninstall $(PACKAGE_NAME) -y
294
- @echo "$(GREEN)Package uninstalled!$(NC)"
329
+ @echo "$(GREEN)Package uninstalled!$(NC)"