PyMemoryEditor 1.5.22__tar.gz → 1.5.24__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.
- {pymemoryeditor-1.5.22 → pymemoryeditor-1.5.24}/.flake8 +11 -11
- {pymemoryeditor-1.5.22 → pymemoryeditor-1.5.24}/.github/workflows/python-package.yml +40 -40
- {pymemoryeditor-1.5.22 → pymemoryeditor-1.5.24}/.gitignore +6 -6
- {pymemoryeditor-1.5.22 → pymemoryeditor-1.5.24}/LICENSE +21 -21
- pymemoryeditor-1.5.24/Makefile +294 -0
- {pymemoryeditor-1.5.22 → pymemoryeditor-1.5.24}/PKG-INFO +2 -2
- {pymemoryeditor-1.5.22 → pymemoryeditor-1.5.24}/PyMemoryEditor/__init__.py +28 -28
- {pymemoryeditor-1.5.22 → pymemoryeditor-1.5.24}/PyMemoryEditor/__main__.py +3 -3
- {pymemoryeditor-1.5.22 → pymemoryeditor-1.5.24}/PyMemoryEditor/enums.py +16 -16
- {pymemoryeditor-1.5.22 → pymemoryeditor-1.5.24}/PyMemoryEditor/linux/functions.py +243 -237
- {pymemoryeditor-1.5.22 → pymemoryeditor-1.5.24}/PyMemoryEditor/linux/process.py +123 -123
- {pymemoryeditor-1.5.22 → pymemoryeditor-1.5.24}/PyMemoryEditor/linux/ptrace/__init__.py +4 -4
- {pymemoryeditor-1.5.22 → pymemoryeditor-1.5.24}/PyMemoryEditor/linux/ptrace/enums.py +111 -111
- {pymemoryeditor-1.5.22 → pymemoryeditor-1.5.24}/PyMemoryEditor/linux/ptrace/ptrace.py +31 -31
- {pymemoryeditor-1.5.22 → pymemoryeditor-1.5.24}/PyMemoryEditor/linux/types.py +40 -40
- {pymemoryeditor-1.5.22 → pymemoryeditor-1.5.24}/PyMemoryEditor/process/__init__.py +6 -6
- {pymemoryeditor-1.5.22 → pymemoryeditor-1.5.24}/PyMemoryEditor/process/abstract.py +160 -160
- {pymemoryeditor-1.5.22 → pymemoryeditor-1.5.24}/PyMemoryEditor/process/errors.py +32 -32
- {pymemoryeditor-1.5.22 → pymemoryeditor-1.5.24}/PyMemoryEditor/process/info.py +59 -59
- {pymemoryeditor-1.5.22 → pymemoryeditor-1.5.24}/PyMemoryEditor/process/util.py +33 -33
- {pymemoryeditor-1.5.22 → pymemoryeditor-1.5.24}/PyMemoryEditor/sample/application.py +24 -24
- {pymemoryeditor-1.5.22 → pymemoryeditor-1.5.24}/PyMemoryEditor/sample/main_application_window.py +592 -592
- {pymemoryeditor-1.5.22 → pymemoryeditor-1.5.24}/PyMemoryEditor/sample/open_process_window.py +133 -133
- {pymemoryeditor-1.5.22 → pymemoryeditor-1.5.24}/PyMemoryEditor/util/__init__.py +4 -4
- {pymemoryeditor-1.5.22 → pymemoryeditor-1.5.24}/PyMemoryEditor/util/convert.py +42 -41
- {pymemoryeditor-1.5.22 → pymemoryeditor-1.5.24}/PyMemoryEditor/util/scan.py +83 -83
- {pymemoryeditor-1.5.22 → pymemoryeditor-1.5.24}/PyMemoryEditor/util/search/abstract.py +12 -12
- {pymemoryeditor-1.5.22 → pymemoryeditor-1.5.24}/PyMemoryEditor/util/search/bmh.py +56 -56
- {pymemoryeditor-1.5.22 → pymemoryeditor-1.5.24}/PyMemoryEditor/util/search/kmp.py +47 -47
- {pymemoryeditor-1.5.22 → pymemoryeditor-1.5.24}/PyMemoryEditor/win32/enums/__init__.py +7 -7
- {pymemoryeditor-1.5.22 → pymemoryeditor-1.5.24}/PyMemoryEditor/win32/enums/memory_allocation_states.py +49 -49
- {pymemoryeditor-1.5.22 → pymemoryeditor-1.5.24}/PyMemoryEditor/win32/enums/memory_protections.py +93 -93
- {pymemoryeditor-1.5.22 → pymemoryeditor-1.5.24}/PyMemoryEditor/win32/enums/memory_types.py +16 -16
- {pymemoryeditor-1.5.22 → pymemoryeditor-1.5.24}/PyMemoryEditor/win32/enums/process_operations.py +58 -58
- {pymemoryeditor-1.5.22 → pymemoryeditor-1.5.24}/PyMemoryEditor/win32/enums/standard_access_rights.py +26 -26
- {pymemoryeditor-1.5.22 → pymemoryeditor-1.5.24}/PyMemoryEditor/win32/functions.py +300 -294
- {pymemoryeditor-1.5.22 → pymemoryeditor-1.5.24}/PyMemoryEditor/win32/process.py +175 -175
- {pymemoryeditor-1.5.22 → pymemoryeditor-1.5.24}/PyMemoryEditor/win32/types.py +52 -52
- {pymemoryeditor-1.5.22 → pymemoryeditor-1.5.24}/README.md +99 -99
- {pymemoryeditor-1.5.22 → pymemoryeditor-1.5.24}/pyproject.toml +63 -63
- {pymemoryeditor-1.5.22 → pymemoryeditor-1.5.24}/requirements.txt +2 -2
- {pymemoryeditor-1.5.22 → pymemoryeditor-1.5.24}/tests/conftest.py +6 -6
- {pymemoryeditor-1.5.22 → pymemoryeditor-1.5.24}/tests/test_editor.py +343 -343
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
[flake8]
|
|
2
|
-
|
|
3
|
-
max-line-length = 130
|
|
4
|
-
ignore = E701, E722
|
|
5
|
-
|
|
6
|
-
per-file-ignores =
|
|
7
|
-
# __init__.py files are allowed to have unused imports and lines-too-long
|
|
8
|
-
*/__init__.py:F401
|
|
9
|
-
|
|
10
|
-
# Unused imports are allowed in the tests/package.py module and they must come after setting the current working directory.
|
|
11
|
-
tests/package.py:F401, E402
|
|
1
|
+
[flake8]
|
|
2
|
+
|
|
3
|
+
max-line-length = 130
|
|
4
|
+
ignore = E701, E722
|
|
5
|
+
|
|
6
|
+
per-file-ignores =
|
|
7
|
+
# __init__.py files are allowed to have unused imports and lines-too-long
|
|
8
|
+
*/__init__.py:F401
|
|
9
|
+
|
|
10
|
+
# Unused imports are allowed in the tests/package.py module and they must come after setting the current working directory.
|
|
11
|
+
tests/package.py:F401, E402
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
|
|
2
|
-
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
|
|
3
|
-
|
|
4
|
-
name: Python Package
|
|
5
|
-
|
|
6
|
-
on:
|
|
7
|
-
push:
|
|
8
|
-
branches: [ master ]
|
|
9
|
-
pull_request:
|
|
10
|
-
branches: [ master ]
|
|
11
|
-
schedule:
|
|
12
|
-
- cron: '0 0 */7 * *'
|
|
13
|
-
|
|
14
|
-
jobs:
|
|
15
|
-
build:
|
|
16
|
-
|
|
17
|
-
runs-on: ${{ matrix.os }}
|
|
18
|
-
strategy:
|
|
19
|
-
matrix:
|
|
20
|
-
python-version: ['3.
|
|
21
|
-
os:
|
|
22
|
-
- ubuntu-latest
|
|
23
|
-
- windows-latest
|
|
24
|
-
|
|
25
|
-
steps:
|
|
26
|
-
- uses: actions/checkout@v2
|
|
27
|
-
- name: Set up Python ${{ matrix.python-version }}
|
|
28
|
-
uses: actions/setup-python@v2
|
|
29
|
-
with:
|
|
30
|
-
python-version: ${{ matrix.python-version }}
|
|
31
|
-
- name: Install dependencies
|
|
32
|
-
run: |
|
|
33
|
-
python -m pip install --upgrade pip
|
|
34
|
-
pip install -r requirements.txt
|
|
35
|
-
- name: Test with pytest
|
|
36
|
-
run: |
|
|
37
|
-
pytest tests -v -s -x
|
|
38
|
-
- name: Install package
|
|
39
|
-
run: |
|
|
40
|
-
pip install PyMemoryEditor
|
|
1
|
+
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
|
|
2
|
+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
|
|
3
|
+
|
|
4
|
+
name: Python Package
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
push:
|
|
8
|
+
branches: [ master ]
|
|
9
|
+
pull_request:
|
|
10
|
+
branches: [ master ]
|
|
11
|
+
schedule:
|
|
12
|
+
- cron: '0 0 */7 * *'
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
build:
|
|
16
|
+
|
|
17
|
+
runs-on: ${{ matrix.os }}
|
|
18
|
+
strategy:
|
|
19
|
+
matrix:
|
|
20
|
+
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
|
|
21
|
+
os:
|
|
22
|
+
- ubuntu-latest
|
|
23
|
+
- windows-latest
|
|
24
|
+
|
|
25
|
+
steps:
|
|
26
|
+
- uses: actions/checkout@v2
|
|
27
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
28
|
+
uses: actions/setup-python@v2
|
|
29
|
+
with:
|
|
30
|
+
python-version: ${{ matrix.python-version }}
|
|
31
|
+
- name: Install dependencies
|
|
32
|
+
run: |
|
|
33
|
+
python -m pip install --upgrade pip
|
|
34
|
+
pip install -r requirements.txt
|
|
35
|
+
- name: Test with pytest
|
|
36
|
+
run: |
|
|
37
|
+
pytest tests -v -s -x
|
|
38
|
+
- name: Install package
|
|
39
|
+
run: |
|
|
40
|
+
pip install PyMemoryEditor
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
__pycache__
|
|
2
|
-
dist
|
|
3
|
-
*.pytest_cache
|
|
4
|
-
*.egg-info
|
|
5
|
-
.idea/
|
|
6
|
-
.build/
|
|
1
|
+
__pycache__
|
|
2
|
+
dist
|
|
3
|
+
*.pytest_cache
|
|
4
|
+
*.egg-info
|
|
5
|
+
.idea/
|
|
6
|
+
.build/
|
|
7
7
|
venv/
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2021 Jean Loui Bernard Silva de Jesus
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2021 Jean Loui Bernard Silva de Jesus
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,294 @@
|
|
|
1
|
+
# Makefile for PyMemoryEditor Python package
|
|
2
|
+
|
|
3
|
+
# Variables
|
|
4
|
+
PACKAGE_NAME = PyMemoryEditor
|
|
5
|
+
PYTHON = python3
|
|
6
|
+
PIP = pip3
|
|
7
|
+
BUILD_DIR = build
|
|
8
|
+
DIST_DIR = dist
|
|
9
|
+
EGG_INFO = $(PACKAGE_NAME).egg-info
|
|
10
|
+
VENV_DIR = venv
|
|
11
|
+
TEST_DIR = tests
|
|
12
|
+
|
|
13
|
+
# Colors for output
|
|
14
|
+
GREEN = \033[0;32m
|
|
15
|
+
YELLOW = \033[0;33m
|
|
16
|
+
RED = \033[0;31m
|
|
17
|
+
BLUE = \033[0;34m
|
|
18
|
+
NC = \033[0m # No Color
|
|
19
|
+
|
|
20
|
+
# Default target
|
|
21
|
+
.PHONY: help
|
|
22
|
+
help:
|
|
23
|
+
@echo "$(GREEN)PyMemoryEditor Python package Makefile$(NC)"
|
|
24
|
+
@echo ""
|
|
25
|
+
@echo "Available targets:"
|
|
26
|
+
@echo " $(YELLOW)install$(NC) - Install package in development mode"
|
|
27
|
+
@echo " $(YELLOW)install-deps$(NC) - Install dependencies"
|
|
28
|
+
@echo " $(YELLOW)install-dev$(NC) - Install development dependencies"
|
|
29
|
+
@echo " $(YELLOW)test$(NC) - Run tests"
|
|
30
|
+
@echo " $(YELLOW)test-verbose$(NC) - Run tests with verbose output"
|
|
31
|
+
@echo " $(YELLOW)test-coverage$(NC) - Run tests with coverage report"
|
|
32
|
+
@echo " $(YELLOW)lint$(NC) - Run linter (flake8)"
|
|
33
|
+
@echo " $(YELLOW)lint-fix$(NC) - Run auto-formatter (black)"
|
|
34
|
+
@echo " $(YELLOW)type-check$(NC) - Run type checker (mypy)"
|
|
35
|
+
@echo " $(YELLOW)clean$(NC) - Clean build artifacts"
|
|
36
|
+
@echo " $(YELLOW)build$(NC) - Build package"
|
|
37
|
+
@echo " $(YELLOW)build-wheel$(NC) - Build wheel package"
|
|
38
|
+
@echo " $(YELLOW)build-sdist$(NC) - Build source distribution"
|
|
39
|
+
@echo " $(YELLOW)validate$(NC) - Validate package"
|
|
40
|
+
@echo " $(YELLOW)publish$(NC) - Publish to PyPI"
|
|
41
|
+
@echo " $(YELLOW)publish-test$(NC) - Publish to Test PyPI"
|
|
42
|
+
@echo " $(YELLOW)version$(NC) - Show current version"
|
|
43
|
+
@echo " $(YELLOW)check-deps$(NC) - Check for outdated dependencies"
|
|
44
|
+
@echo " $(YELLOW)update-deps$(NC) - Update dependencies"
|
|
45
|
+
@echo " $(YELLOW)security$(NC) - Run security audit"
|
|
46
|
+
@echo " $(YELLOW)docs$(NC) - Generate documentation"
|
|
47
|
+
@echo " $(YELLOW)venv$(NC) - Create virtual environment"
|
|
48
|
+
@echo " $(YELLOW)venv-activate$(NC) - Show command to activate venv"
|
|
49
|
+
@echo " $(YELLOW)all$(NC) - Run full pipeline (install, lint, test, build)"
|
|
50
|
+
|
|
51
|
+
# Create virtual environment
|
|
52
|
+
.PHONY: venv
|
|
53
|
+
venv:
|
|
54
|
+
@echo "$(GREEN)Creating virtual environment...$(NC)"
|
|
55
|
+
$(PYTHON) -m venv $(VENV_DIR)
|
|
56
|
+
@echo "$(GREEN)Virtual environment created in $(VENV_DIR)$(NC)"
|
|
57
|
+
@echo "$(YELLOW)To activate: source $(VENV_DIR)/bin/activate$(NC)"
|
|
58
|
+
|
|
59
|
+
# Show activation command
|
|
60
|
+
.PHONY: venv-activate
|
|
61
|
+
venv-activate:
|
|
62
|
+
@echo "$(YELLOW)To activate virtual environment run:$(NC)"
|
|
63
|
+
@echo "source $(VENV_DIR)/bin/activate"
|
|
64
|
+
|
|
65
|
+
# Install dependencies
|
|
66
|
+
.PHONY: install-deps
|
|
67
|
+
install-deps:
|
|
68
|
+
@echo "$(GREEN)Installing dependencies...$(NC)"
|
|
69
|
+
$(PIP) install -r requirements.txt
|
|
70
|
+
@echo "$(GREEN)Dependencies installed successfully!$(NC)"
|
|
71
|
+
|
|
72
|
+
# Install development dependencies
|
|
73
|
+
.PHONY: install-dev
|
|
74
|
+
install-dev:
|
|
75
|
+
@echo "$(GREEN)Installing development dependencies...$(NC)"
|
|
76
|
+
$(PIP) install -r requirements.txt
|
|
77
|
+
$(PIP) install pytest pytest-cov flake8 black mypy twine build hatch
|
|
78
|
+
@echo "$(GREEN)Development dependencies installed successfully!$(NC)"
|
|
79
|
+
|
|
80
|
+
# Install package in development mode
|
|
81
|
+
.PHONY: install
|
|
82
|
+
install: install-deps
|
|
83
|
+
@echo "$(GREEN)Installing package in development mode...$(NC)"
|
|
84
|
+
$(PIP) install -e .
|
|
85
|
+
@echo "$(GREEN)Package installed successfully!$(NC)"
|
|
86
|
+
|
|
87
|
+
# Run tests
|
|
88
|
+
.PHONY: test
|
|
89
|
+
test:
|
|
90
|
+
@echo "$(GREEN)Running tests...$(NC)"
|
|
91
|
+
$(PYTHON) -m pytest $(TEST_DIR) -v
|
|
92
|
+
@echo "$(GREEN)Tests completed!$(NC)"
|
|
93
|
+
|
|
94
|
+
# Run tests with verbose output
|
|
95
|
+
.PHONY: test-verbose
|
|
96
|
+
test-verbose:
|
|
97
|
+
@echo "$(GREEN)Running tests with verbose output...$(NC)"
|
|
98
|
+
$(PYTHON) -m pytest $(TEST_DIR) -v -s
|
|
99
|
+
@echo "$(GREEN)Verbose tests completed!$(NC)"
|
|
100
|
+
|
|
101
|
+
# Run tests with coverage
|
|
102
|
+
.PHONY: test-coverage
|
|
103
|
+
test-coverage:
|
|
104
|
+
@echo "$(GREEN)Running tests with coverage...$(NC)"
|
|
105
|
+
$(PYTHON) -m pytest $(TEST_DIR) --cov=$(PACKAGE_NAME) --cov-report=html --cov-report=term
|
|
106
|
+
@echo "$(GREEN)Coverage report generated!$(NC)"
|
|
107
|
+
@echo "$(YELLOW)HTML report available at htmlcov/index.html$(NC)"
|
|
108
|
+
|
|
109
|
+
# Run linter
|
|
110
|
+
.PHONY: lint
|
|
111
|
+
lint:
|
|
112
|
+
@echo "$(GREEN)Running linter (flake8)...$(NC)"
|
|
113
|
+
$(PYTHON) -m flake8 $(PACKAGE_NAME) $(TEST_DIR)
|
|
114
|
+
@echo "$(GREEN)Linting completed!$(NC)"
|
|
115
|
+
|
|
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
|
|
124
|
+
.PHONY: type-check
|
|
125
|
+
type-check:
|
|
126
|
+
@echo "$(GREEN)Running type checker (mypy)...$(NC)"
|
|
127
|
+
$(PYTHON) -m mypy $(PACKAGE_NAME) --ignore-missing-imports
|
|
128
|
+
@echo "$(GREEN)Type checking completed!$(NC)"
|
|
129
|
+
|
|
130
|
+
# Clean build artifacts
|
|
131
|
+
.PHONY: clean
|
|
132
|
+
clean:
|
|
133
|
+
@echo "$(GREEN)Cleaning build artifacts...$(NC)"
|
|
134
|
+
rm -rf $(BUILD_DIR)
|
|
135
|
+
rm -rf $(DIST_DIR)
|
|
136
|
+
rm -rf $(EGG_INFO)
|
|
137
|
+
rm -rf .pytest_cache
|
|
138
|
+
rm -rf htmlcov
|
|
139
|
+
rm -rf .coverage
|
|
140
|
+
rm -rf .mypy_cache
|
|
141
|
+
find . -type d -name "__pycache__" -exec rm -rf {} +
|
|
142
|
+
find . -type f -name "*.pyc" -delete
|
|
143
|
+
find . -type f -name "*.pyo" -delete
|
|
144
|
+
find . -type f -name "*.pyd" -delete
|
|
145
|
+
find . -type f -name ".coverage" -delete
|
|
146
|
+
@echo "$(GREEN)Cleanup completed!$(NC)"
|
|
147
|
+
|
|
148
|
+
# Build package
|
|
149
|
+
.PHONY: build
|
|
150
|
+
build: clean
|
|
151
|
+
@echo "$(GREEN)Building package...$(NC)"
|
|
152
|
+
$(PYTHON) -m build
|
|
153
|
+
@echo "$(GREEN)Package built successfully!$(NC)"
|
|
154
|
+
|
|
155
|
+
# Build wheel package only
|
|
156
|
+
.PHONY: build-wheel
|
|
157
|
+
build-wheel: clean
|
|
158
|
+
@echo "$(GREEN)Building wheel package...$(NC)"
|
|
159
|
+
$(PYTHON) -m build --wheel
|
|
160
|
+
@echo "$(GREEN)Wheel package built successfully!$(NC)"
|
|
161
|
+
|
|
162
|
+
# Build source distribution only
|
|
163
|
+
.PHONY: build-sdist
|
|
164
|
+
build-sdist: clean
|
|
165
|
+
@echo "$(GREEN)Building source distribution...$(NC)"
|
|
166
|
+
$(PYTHON) -m build --sdist
|
|
167
|
+
@echo "$(GREEN)Source distribution built successfully!$(NC)"
|
|
168
|
+
|
|
169
|
+
# Validate package
|
|
170
|
+
.PHONY: validate
|
|
171
|
+
validate: build
|
|
172
|
+
@echo "$(GREEN)Validating package...$(NC)"
|
|
173
|
+
$(PYTHON) -m twine check $(DIST_DIR)/*
|
|
174
|
+
@echo "$(GREEN)Package validation completed!$(NC)"
|
|
175
|
+
|
|
176
|
+
# Publish to PyPI
|
|
177
|
+
.PHONY: publish
|
|
178
|
+
publish: validate
|
|
179
|
+
@echo "$(YELLOW)Are you sure you want to publish to PyPI? [y/N]$(NC)" && read ans && [ $${ans:-N} = y ]
|
|
180
|
+
@echo "$(GREEN)Publishing to PyPI...$(NC)"
|
|
181
|
+
$(PYTHON) -m twine upload $(DIST_DIR)/*
|
|
182
|
+
@echo "$(GREEN)Package published successfully to PyPI!$(NC)"
|
|
183
|
+
|
|
184
|
+
# Publish to Test PyPI
|
|
185
|
+
.PHONY: publish-test
|
|
186
|
+
publish-test: validate
|
|
187
|
+
@echo "$(GREEN)Publishing to Test PyPI...$(NC)"
|
|
188
|
+
$(PYTHON) -m twine upload --repository testpypi $(DIST_DIR)/*
|
|
189
|
+
@echo "$(GREEN)Package published successfully to Test PyPI!$(NC)"
|
|
190
|
+
|
|
191
|
+
# Show current version
|
|
192
|
+
.PHONY: version
|
|
193
|
+
version:
|
|
194
|
+
@echo "$(GREEN)Current package version:$(NC)"
|
|
195
|
+
@$(PYTHON) -c "import $(PACKAGE_NAME); print($(PACKAGE_NAME).__version__)"
|
|
196
|
+
|
|
197
|
+
# Check for outdated dependencies
|
|
198
|
+
.PHONY: check-deps
|
|
199
|
+
check-deps:
|
|
200
|
+
@echo "$(GREEN)Checking for outdated dependencies...$(NC)"
|
|
201
|
+
$(PIP) list --outdated
|
|
202
|
+
|
|
203
|
+
# Update dependencies
|
|
204
|
+
.PHONY: update-deps
|
|
205
|
+
update-deps:
|
|
206
|
+
@echo "$(GREEN)Updating dependencies...$(NC)"
|
|
207
|
+
$(PIP) install --upgrade -r requirements.txt
|
|
208
|
+
@echo "$(GREEN)Dependencies updated!$(NC)"
|
|
209
|
+
|
|
210
|
+
# Security audit
|
|
211
|
+
.PHONY: security
|
|
212
|
+
security:
|
|
213
|
+
@echo "$(GREEN)Running security audit...$(NC)"
|
|
214
|
+
$(PIP) install safety
|
|
215
|
+
safety check
|
|
216
|
+
@echo "$(GREEN)Security audit completed!$(NC)"
|
|
217
|
+
|
|
218
|
+
# Generate documentation
|
|
219
|
+
.PHONY: docs
|
|
220
|
+
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
|
|
228
|
+
|
|
229
|
+
# Full development pipeline
|
|
230
|
+
.PHONY: all
|
|
231
|
+
all: install lint type-check test build validate
|
|
232
|
+
@echo "$(GREEN)Full pipeline completed successfully!$(NC)"
|
|
233
|
+
|
|
234
|
+
# Development workflow targets
|
|
235
|
+
.PHONY: dev-setup
|
|
236
|
+
dev-setup: venv install-dev install
|
|
237
|
+
@echo "$(GREEN)Development environment setup completed!$(NC)"
|
|
238
|
+
@echo "$(YELLOW)Don't forget to activate the virtual environment:$(NC)"
|
|
239
|
+
@echo "source $(VENV_DIR)/bin/activate"
|
|
240
|
+
|
|
241
|
+
.PHONY: pre-commit
|
|
242
|
+
pre-commit: lint type-check test
|
|
243
|
+
@echo "$(GREEN)Pre-commit checks passed!$(NC)"
|
|
244
|
+
|
|
245
|
+
.PHONY: pre-publish
|
|
246
|
+
pre-publish: all security
|
|
247
|
+
@echo "$(GREEN)Pre-publish checks completed!$(NC)"
|
|
248
|
+
|
|
249
|
+
# CI/CD targets
|
|
250
|
+
.PHONY: ci
|
|
251
|
+
ci: install-dev install lint type-check test build validate
|
|
252
|
+
@echo "$(GREEN)CI pipeline completed!$(NC)"
|
|
253
|
+
|
|
254
|
+
# Show package info
|
|
255
|
+
.PHONY: info
|
|
256
|
+
info:
|
|
257
|
+
@echo "$(GREEN)Package Information:$(NC)"
|
|
258
|
+
@echo "Name: $(PACKAGE_NAME)"
|
|
259
|
+
@$(PYTHON) -c "import $(PACKAGE_NAME); print('Version:', $(PACKAGE_NAME).__version__)" 2>/dev/null || echo "Version: Not installed"
|
|
260
|
+
@echo "Python: $(shell $(PYTHON) --version)"
|
|
261
|
+
@echo "Pip: $(shell $(PIP) --version)"
|
|
262
|
+
@echo ""
|
|
263
|
+
@echo "$(GREEN)Installed packages:$(NC)"
|
|
264
|
+
@$(PIP) list | grep -E "($(PACKAGE_NAME)|pytest|flake8|black|mypy|twine|build)"
|
|
265
|
+
|
|
266
|
+
# Quick release workflow
|
|
267
|
+
.PHONY: release
|
|
268
|
+
release: pre-publish publish
|
|
269
|
+
@echo "$(GREEN)Release completed!$(NC)"
|
|
270
|
+
|
|
271
|
+
.PHONY: release-test
|
|
272
|
+
release-test: pre-publish publish-test
|
|
273
|
+
@echo "$(GREEN)Test release completed!$(NC)"
|
|
274
|
+
|
|
275
|
+
# Install from PyPI (for testing)
|
|
276
|
+
.PHONY: install-from-pypi
|
|
277
|
+
install-from-pypi:
|
|
278
|
+
@echo "$(GREEN)Installing from PyPI...$(NC)"
|
|
279
|
+
$(PIP) install $(PACKAGE_NAME)
|
|
280
|
+
@echo "$(GREEN)Package installed from PyPI!$(NC)"
|
|
281
|
+
|
|
282
|
+
# Install from Test PyPI (for testing)
|
|
283
|
+
.PHONY: install-from-test-pypi
|
|
284
|
+
install-from-test-pypi:
|
|
285
|
+
@echo "$(GREEN)Installing from Test PyPI...$(NC)"
|
|
286
|
+
$(PIP) install --index-url https://test.pypi.org/simple/ $(PACKAGE_NAME)
|
|
287
|
+
@echo "$(GREEN)Package installed from Test PyPI!$(NC)"
|
|
288
|
+
|
|
289
|
+
# Uninstall package
|
|
290
|
+
.PHONY: uninstall
|
|
291
|
+
uninstall:
|
|
292
|
+
@echo "$(GREEN)Uninstalling package...$(NC)"
|
|
293
|
+
$(PIP) uninstall $(PACKAGE_NAME) -y
|
|
294
|
+
@echo "$(GREEN)Package uninstalled!$(NC)"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: PyMemoryEditor
|
|
3
|
-
Version: 1.5.
|
|
3
|
+
Version: 1.5.24
|
|
4
4
|
Summary: Multi-platform library developed with ctypes for reading, writing and searching at process memory, in a simple and friendly way with Python 3.
|
|
5
5
|
Project-URL: Homepage, https://github.com/JeanExtreme002/PyMemoryEditor
|
|
6
6
|
Author-email: Jean Loui Bernard Silva de Jesus <jeanextreme002@gmail.com>
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
# -*- coding: utf-8 -*-
|
|
2
|
-
|
|
3
|
-
"""
|
|
4
|
-
Multi-platform library developed with ctypes for reading, writing and
|
|
5
|
-
searching at process memory, in a simple and friendly way with Python 3.
|
|
6
|
-
|
|
7
|
-
The package supports Windows and Linux (32-bit and 64-bit).
|
|
8
|
-
"""
|
|
9
|
-
|
|
10
|
-
__author__ = "Jean Loui Bernard Silva de Jesus"
|
|
11
|
-
__version__ = "1.5.
|
|
12
|
-
|
|
13
|
-
from .enums import ScanTypesEnum
|
|
14
|
-
from .process.errors import ClosedProcess, ProcessIDNotExistsError, ProcessNotFoundError
|
|
15
|
-
import sys
|
|
16
|
-
|
|
17
|
-
# For Windows.
|
|
18
|
-
if "win" in sys.platform:
|
|
19
|
-
from .win32.process import WindowsProcess
|
|
20
|
-
from .win32.enums.process_operations import ProcessOperationsEnum
|
|
21
|
-
OpenProcess = WindowsProcess
|
|
22
|
-
|
|
23
|
-
# For Linux.
|
|
24
|
-
else:
|
|
25
|
-
from .linux.process import LinuxProcess
|
|
26
|
-
from .linux.ptrace import ptrace
|
|
27
|
-
from .linux.ptrace.enums import PtraceCommandsEnum
|
|
28
|
-
OpenProcess = LinuxProcess
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Multi-platform library developed with ctypes for reading, writing and
|
|
5
|
+
searching at process memory, in a simple and friendly way with Python 3.
|
|
6
|
+
|
|
7
|
+
The package supports Windows and Linux (32-bit and 64-bit).
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
__author__ = "Jean Loui Bernard Silva de Jesus"
|
|
11
|
+
__version__ = "1.5.24"
|
|
12
|
+
|
|
13
|
+
from .enums import ScanTypesEnum
|
|
14
|
+
from .process.errors import ClosedProcess, ProcessIDNotExistsError, ProcessNotFoundError
|
|
15
|
+
import sys
|
|
16
|
+
|
|
17
|
+
# For Windows.
|
|
18
|
+
if "win" in sys.platform:
|
|
19
|
+
from .win32.process import WindowsProcess
|
|
20
|
+
from .win32.enums.process_operations import ProcessOperationsEnum
|
|
21
|
+
OpenProcess = WindowsProcess
|
|
22
|
+
|
|
23
|
+
# For Linux.
|
|
24
|
+
else:
|
|
25
|
+
from .linux.process import LinuxProcess
|
|
26
|
+
from .linux.ptrace import ptrace
|
|
27
|
+
from .linux.ptrace.enums import PtraceCommandsEnum
|
|
28
|
+
OpenProcess = LinuxProcess
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from PyMemoryEditor.sample.application import main
|
|
2
|
-
|
|
3
|
-
if __name__ == "__main__":
|
|
1
|
+
from PyMemoryEditor.sample.application import main
|
|
2
|
+
|
|
3
|
+
if __name__ == "__main__":
|
|
4
4
|
main()
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
# -*- coding: utf-8 -*-
|
|
2
|
-
from enum import Enum
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
class ScanTypesEnum(Enum):
|
|
6
|
-
"""
|
|
7
|
-
Enum with scan types.
|
|
8
|
-
"""
|
|
9
|
-
EXACT_VALUE = 0
|
|
10
|
-
NOT_EXACT_VALUE = 1
|
|
11
|
-
BIGGER_THAN = 2
|
|
12
|
-
SMALLER_THAN = 3
|
|
13
|
-
BIGGER_THAN_OR_EXACT_VALUE = 4
|
|
14
|
-
SMALLER_THAN_OR_EXACT_VALUE = 5
|
|
15
|
-
VALUE_BETWEEN = 6
|
|
16
|
-
NOT_VALUE_BETWEEN = 7
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
from enum import Enum
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class ScanTypesEnum(Enum):
|
|
6
|
+
"""
|
|
7
|
+
Enum with scan types.
|
|
8
|
+
"""
|
|
9
|
+
EXACT_VALUE = 0
|
|
10
|
+
NOT_EXACT_VALUE = 1
|
|
11
|
+
BIGGER_THAN = 2
|
|
12
|
+
SMALLER_THAN = 3
|
|
13
|
+
BIGGER_THAN_OR_EXACT_VALUE = 4
|
|
14
|
+
SMALLER_THAN_OR_EXACT_VALUE = 5
|
|
15
|
+
VALUE_BETWEEN = 6
|
|
16
|
+
NOT_VALUE_BETWEEN = 7
|