ntmemoryapi 2.1.0__tar.gz → 2.1.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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: ntmemoryapi
3
- Version: 2.1.0
3
+ Version: 2.1.2
4
4
  Summary: Simple library for Windows to manipulate process virtual memory with stelthy syscall wraps
5
5
  Author: Xenely
6
6
  Requires-Dist: psutil>=7.1.3
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "ntmemoryapi"
3
- version = "2.1.0"
3
+ version = "2.1.2"
4
4
  description = "Simple library for Windows to manipulate process virtual memory with stelthy syscall wraps"
5
5
  authors = [
6
6
  {name = "Xenely"}
@@ -140,7 +140,7 @@ class MEMORY_BASIC_INFORMATION(ctypes.Structure):
140
140
  ("m_region_size", ctypes.c_size_t),
141
141
  ("m_state", ctypes.c_ulong),
142
142
  ("m_protect", ctypes.c_ulong),
143
- ("m_type", ctypes.c_ulong)
143
+ ("m_type", ctypes.c_ulong),
144
144
  ]
145
145
 
146
146
  @property
@@ -276,7 +276,7 @@ def _get_be_buffer(soure_c_type: typing.Any) -> ctypes.BigEndianStructure:
276
276
 
277
277
  _pack_ = 1
278
278
  _fields_ = [
279
- ("value", soure_c_type)
279
+ ("value", soure_c_type),
280
280
  ]
281
281
 
282
282
  return BigEndianValue
@@ -712,7 +712,7 @@ class Process:
712
712
 
713
713
  # If result failed
714
714
  if (result := _nt_write_virtual_memory(self.handle, address, ctypes.byref(buffer := _get_be_buffer(ctypes.c_uint32(value)) if big_endian else ctypes.c_uint32(value)), ctypes.sizeof(buffer), None)):
715
- raise Exception("NtWriteVirtualMemory failed with status: 0x%s" % hex(result)[2:].upper())
715
+ raise MemoryWriteError("NtWriteVirtualMemory failed with status: 0x%s" % hex(result)[2:].upper())
716
716
 
717
717
  def write_uint64(self, address: int, value: int, big_endian: bool = False) -> None:
718
718
  """Write 8 byte unsigned integer value at given address."""
File without changes