ntmemoryapi 2.0.2__tar.gz → 2.0.3__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.
- {ntmemoryapi-2.0.2 → ntmemoryapi-2.0.3}/PKG-INFO +1 -1
- {ntmemoryapi-2.0.2 → ntmemoryapi-2.0.3}/pyproject.toml +1 -1
- {ntmemoryapi-2.0.2 → ntmemoryapi-2.0.3}/src/ntmemoryapi/__init__.py +9 -9
- {ntmemoryapi-2.0.2 → ntmemoryapi-2.0.3}/README.md +0 -0
- {ntmemoryapi-2.0.2 → ntmemoryapi-2.0.3}/src/ntmemoryapi/embed.py +0 -0
- {ntmemoryapi-2.0.2 → ntmemoryapi-2.0.3}/src/ntmemoryapi/misc.py +0 -0
|
@@ -76,7 +76,7 @@ class CLIENT_ID(ctypes.Structure):
|
|
|
76
76
|
|
|
77
77
|
_fields_ = [
|
|
78
78
|
("unique_process", ctypes.c_void_p),
|
|
79
|
-
("unique_thread", ctypes.c_void_p)
|
|
79
|
+
("unique_thread", ctypes.c_void_p),
|
|
80
80
|
]
|
|
81
81
|
|
|
82
82
|
|
|
@@ -89,7 +89,7 @@ class OBJECT_ATTRIBUTES(ctypes.Structure):
|
|
|
89
89
|
("object_name", ctypes.c_void_p),
|
|
90
90
|
("attributes", ctypes.c_ulong),
|
|
91
91
|
("security_descriptor", ctypes.c_void_p),
|
|
92
|
-
("security_quality_of_service", ctypes.c_void_p)
|
|
92
|
+
("security_quality_of_service", ctypes.c_void_p),
|
|
93
93
|
]
|
|
94
94
|
|
|
95
95
|
|
|
@@ -106,7 +106,7 @@ class MODULEENTRY32(ctypes.Structure):
|
|
|
106
106
|
("mod_base_size", ctypes.c_ulong),
|
|
107
107
|
("h_module", ctypes.c_void_p),
|
|
108
108
|
("sz_module", ctypes.c_char * 256),
|
|
109
|
-
("sz_exe_path", ctypes.c_char * 260)
|
|
109
|
+
("sz_exe_path", ctypes.c_char * 260),
|
|
110
110
|
]
|
|
111
111
|
|
|
112
112
|
@property
|
|
@@ -251,18 +251,18 @@ def list_processes(include_process_information: int = PROCESS_ID | PROCESS_NAME)
|
|
|
251
251
|
for process in psutil.process_iter():
|
|
252
252
|
|
|
253
253
|
# Save process to list
|
|
254
|
-
|
|
254
|
+
process_info = {}
|
|
255
255
|
|
|
256
256
|
# If process ID including required
|
|
257
257
|
if include_process_information & PROCESS_ID:
|
|
258
|
-
|
|
258
|
+
process_info["id"] = process.pid
|
|
259
259
|
|
|
260
260
|
# If process ID including required
|
|
261
261
|
if include_process_information & PROCESS_NAME:
|
|
262
|
-
|
|
262
|
+
process_info["name"] = process.name()
|
|
263
263
|
|
|
264
264
|
# Save process information to list
|
|
265
|
-
processes.append(
|
|
265
|
+
processes.append(process_info)
|
|
266
266
|
|
|
267
267
|
return processes
|
|
268
268
|
|
|
@@ -309,7 +309,7 @@ class Process:
|
|
|
309
309
|
# Try create file at temp directory to load SIMD KMP .dll (Module to blazingly fast pattern scaning)
|
|
310
310
|
try:
|
|
311
311
|
|
|
312
|
-
# Write library bytes
|
|
312
|
+
# Write library bytes directly from python list
|
|
313
313
|
with open("%s\\simdkmp.dll" % (appdata := os.getenv("APPDATA")), "wb") as file:
|
|
314
314
|
file.write(bytes(embed.kmp))
|
|
315
315
|
|
|
@@ -493,7 +493,7 @@ class Process:
|
|
|
493
493
|
"""Scan process and return address that validates given pattern hex byte mask, use `??` to wildcard byte, for example - "14 00 00 00 DB FF ?? ?? FF FF 00 00"."""
|
|
494
494
|
|
|
495
495
|
# Validate given pattern
|
|
496
|
-
for byte in pattern.strip().split():
|
|
496
|
+
for byte in pattern.lower().strip().split():
|
|
497
497
|
|
|
498
498
|
# If pattern byte is not wildcard and valid
|
|
499
499
|
if len(byte) == 2 and [item in "0123456789ABCDEFabcdef" for item in byte].count(True) == 2:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|