PyMemoryEditor 1.1.0__tar.gz → 1.1.1__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.1.0 → PyMemoryEditor-1.1.1}/PKG-INFO +1 -1
- {PyMemoryEditor-1.1.0 → PyMemoryEditor-1.1.1}/PyMemoryEditor/__init__.py +12 -4
- {PyMemoryEditor-1.1.0 → PyMemoryEditor-1.1.1}/PyMemoryEditor.egg-info/PKG-INFO +1 -1
- {PyMemoryEditor-1.1.0 → PyMemoryEditor-1.1.1}/LICENSE +0 -0
- {PyMemoryEditor-1.1.0 → PyMemoryEditor-1.1.1}/PyMemoryEditor/process/__init__.py +0 -0
- {PyMemoryEditor-1.1.0 → PyMemoryEditor-1.1.1}/PyMemoryEditor/process/errors.py +0 -0
- {PyMemoryEditor-1.1.0 → PyMemoryEditor-1.1.1}/PyMemoryEditor/process/util.py +0 -0
- {PyMemoryEditor-1.1.0 → PyMemoryEditor-1.1.1}/PyMemoryEditor/win32/constants.py +0 -0
- {PyMemoryEditor-1.1.0 → PyMemoryEditor-1.1.1}/PyMemoryEditor/win32/enum.py +0 -0
- {PyMemoryEditor-1.1.0 → PyMemoryEditor-1.1.1}/PyMemoryEditor/win32/functions.py +0 -0
- {PyMemoryEditor-1.1.0 → PyMemoryEditor-1.1.1}/PyMemoryEditor/win32/util.py +0 -0
- {PyMemoryEditor-1.1.0 → PyMemoryEditor-1.1.1}/PyMemoryEditor.egg-info/SOURCES.txt +0 -0
- {PyMemoryEditor-1.1.0 → PyMemoryEditor-1.1.1}/PyMemoryEditor.egg-info/dependency_links.txt +0 -0
- {PyMemoryEditor-1.1.0 → PyMemoryEditor-1.1.1}/PyMemoryEditor.egg-info/requires.txt +0 -0
- {PyMemoryEditor-1.1.0 → PyMemoryEditor-1.1.1}/PyMemoryEditor.egg-info/top_level.txt +0 -0
- {PyMemoryEditor-1.1.0 → PyMemoryEditor-1.1.1}/README.md +0 -0
- {PyMemoryEditor-1.1.0 → PyMemoryEditor-1.1.1}/setup.cfg +0 -0
- {PyMemoryEditor-1.1.0 → PyMemoryEditor-1.1.1}/setup.py +0 -0
|
@@ -6,7 +6,7 @@ reading and writing values in the process memory.
|
|
|
6
6
|
"""
|
|
7
7
|
|
|
8
8
|
__author__ = "Jean Loui Bernard Silva de Jesus"
|
|
9
|
-
__version__ = "1.1.
|
|
9
|
+
__version__ = "1.1.1"
|
|
10
10
|
|
|
11
11
|
from .process import Process
|
|
12
12
|
from .win32.enum import ProcessOperations
|
|
@@ -63,7 +63,7 @@ class OpenProcess(object):
|
|
|
63
63
|
raise TypeError("You must pass an argument to one of these parameters (window_title, process_name, pid).")
|
|
64
64
|
|
|
65
65
|
# Get the process handle.
|
|
66
|
-
self.__process_handle = GetProcessHandle(
|
|
66
|
+
self.__process_handle = GetProcessHandle(self.__permission.value, False, self.__process.pid)
|
|
67
67
|
|
|
68
68
|
def close(self):
|
|
69
69
|
"""
|
|
@@ -84,7 +84,11 @@ class OpenProcess(object):
|
|
|
84
84
|
:param pytype: type of the value to be received (str, int or float).
|
|
85
85
|
:param bufflength: value size in bytes (1, 2, 4, 8).
|
|
86
86
|
"""
|
|
87
|
-
|
|
87
|
+
valid_permissions = [
|
|
88
|
+
ProcessOperations.PROCESS_ALL_ACCESS.value,
|
|
89
|
+
ProcessOperations.PROCESS_VM_READ.value
|
|
90
|
+
]
|
|
91
|
+
if self.__permission.value not in valid_permissions:
|
|
88
92
|
raise PermissionError("The handle does not have permission to read the process memory.")
|
|
89
93
|
|
|
90
94
|
return win32.functions.ReadProcessMemory(self.__process_handle, address, pytype, bufflength)
|
|
@@ -104,7 +108,11 @@ class OpenProcess(object):
|
|
|
104
108
|
:param bufflength: value size in bytes (1, 2, 4, 8).
|
|
105
109
|
:param value: value to be written (str, int or float).
|
|
106
110
|
"""
|
|
107
|
-
|
|
111
|
+
valid_permissions = [
|
|
112
|
+
ProcessOperations.PROCESS_ALL_ACCESS.value,
|
|
113
|
+
ProcessOperations.PROCESS_VM_OPERATION.value | ProcessOperations.PROCESS_VM_WRITE.value
|
|
114
|
+
]
|
|
115
|
+
if self.__permission.value not in valid_permissions:
|
|
108
116
|
raise PermissionError("The handle does not have permission to write to the process memory.")
|
|
109
117
|
|
|
110
118
|
return WriteProcessMemory(self.__process_handle, address, pytype, bufflength, value)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|