ntmemoryapi 1.6.0__tar.gz → 1.6.2__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-1.6.0 → ntmemoryapi-1.6.2}/PKG-INFO +1 -1
- {ntmemoryapi-1.6.0 → ntmemoryapi-1.6.2}/pyproject.toml +1 -1
- {ntmemoryapi-1.6.0 → ntmemoryapi-1.6.2}/src/ntmemoryapi/__init__.py +6 -6
- {ntmemoryapi-1.6.0 → ntmemoryapi-1.6.2}/README.md +0 -0
- {ntmemoryapi-1.6.0 → ntmemoryapi-1.6.2}/src/ntmemoryapi/embed.py +0 -0
- {ntmemoryapi-1.6.0 → ntmemoryapi-1.6.2}/src/ntmemoryapi/misc.py +0 -0
|
@@ -230,9 +230,9 @@ _nt_write_virtual_memory = syscall_wrapper.wrap("NtWriteVirtualMemory", result_t
|
|
|
230
230
|
_nt_virtual_query_memory = syscall_wrapper.wrap("NtQueryVirtualMemory", result_type=ctypes.c_ulong, arguments_types=[ctypes.c_void_p, ctypes.c_void_p, ctypes.c_ulong, ctypes.c_void_p, ctypes.c_size_t, ctypes.POINTER(ctypes.c_size_t)])
|
|
231
231
|
_nt_query_information_process = syscall_wrapper.wrap("NtQueryInformationProcess", result_type=ctypes.c_ulong, arguments_types=[ctypes.c_void_p, ctypes.c_ulong, ctypes.c_void_p, ctypes.c_ulong, ctypes.POINTER(ctypes.c_ulong)])
|
|
232
232
|
|
|
233
|
-
_nt_free_virtual_memory = syscall_wrapper.wrap("NtFreeVirtualMemory", result_type=ctypes.c_ulong, arguments_types=[ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p), ctypes.POINTER(ctypes.
|
|
234
|
-
_nt_allocate_virtual_memory = syscall_wrapper.wrap("NtAllocateVirtualMemory", result_type=ctypes.c_ulong, arguments_types=[ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p), ctypes.
|
|
235
|
-
_nt_protect_virtual_memory = syscall_wrapper.wrap("NtProtectVirtualMemory", result_type=ctypes.c_ulong, arguments_types=[ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p), ctypes.POINTER(ctypes.
|
|
233
|
+
_nt_free_virtual_memory = syscall_wrapper.wrap("NtFreeVirtualMemory", result_type=ctypes.c_ulong, arguments_types=[ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p), ctypes.POINTER(ctypes.c_size_t), ctypes.c_ulong])
|
|
234
|
+
_nt_allocate_virtual_memory = syscall_wrapper.wrap("NtAllocateVirtualMemory", result_type=ctypes.c_ulong, arguments_types=[ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p), ctypes.c_ulonglong, ctypes.POINTER(ctypes.c_size_t), ctypes.c_ulong, ctypes.c_ulong])
|
|
235
|
+
_nt_protect_virtual_memory = syscall_wrapper.wrap("NtProtectVirtualMemory", result_type=ctypes.c_ulong, arguments_types=[ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p), ctypes.POINTER(ctypes.c_size_t), ctypes.c_ulong, ctypes.POINTER(ctypes.c_ulong)])
|
|
236
236
|
|
|
237
237
|
|
|
238
238
|
# ==-------------------------------------------------------------------== #
|
|
@@ -453,7 +453,7 @@ class Process:
|
|
|
453
453
|
|
|
454
454
|
# Prepare arguments
|
|
455
455
|
allocation_address = ctypes.c_void_p(address)
|
|
456
|
-
allocation_size = ctypes.
|
|
456
|
+
allocation_size = ctypes.c_size_t(size)
|
|
457
457
|
|
|
458
458
|
# Try to allocate process memory
|
|
459
459
|
if (result := _nt_allocate_virtual_memory(self.handle, ctypes.byref(allocation_address), 0, ctypes.byref(allocation_size), memory_type, memory_protect)):
|
|
@@ -466,7 +466,7 @@ class Process:
|
|
|
466
466
|
|
|
467
467
|
# Prepare arguments
|
|
468
468
|
allocation_address = ctypes.c_void_p(address)
|
|
469
|
-
allocation_size = ctypes.
|
|
469
|
+
allocation_size = ctypes.c_size_t(size)
|
|
470
470
|
|
|
471
471
|
# Try to deallocate process memory
|
|
472
472
|
if (result := _nt_free_virtual_memory(self.handle, ctypes.byref(allocation_address), ctypes.byref(allocation_size), memory_type)):
|
|
@@ -479,7 +479,7 @@ class Process:
|
|
|
479
479
|
|
|
480
480
|
# Prepare arguments
|
|
481
481
|
protect_address = ctypes.c_void_p(address)
|
|
482
|
-
protect_size = ctypes.
|
|
482
|
+
protect_size = ctypes.c_size_t(size)
|
|
483
483
|
|
|
484
484
|
# Try to change memory protection
|
|
485
485
|
if (result := _nt_protect_virtual_memory(self.handle, ctypes.byref(protect_address), ctypes.byref(protect_size), memory_protect, ctypes.byref(memory_old_protect := ctypes.c_ulong()))):
|
|
File without changes
|
|
File without changes
|
|
File without changes
|