ntmemoryapi 2.2.0__py3-none-any.whl → 2.2.2__py3-none-any.whl

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/__init__.py CHANGED
@@ -542,7 +542,7 @@ class Process:
542
542
  found_addresses = []
543
543
 
544
544
  # Pre-allocated buffer to hold read memory
545
- read_memory_buffer = (ctypes.c_byte * max(item[-1] for item in to_scan_regions) + 1)()
545
+ read_memory_buffer = (ctypes.c_byte * (max(item[-1] for item in to_scan_regions) + 1))()
546
546
 
547
547
  # Iterate regions to scan read them and find pattern
548
548
  for scan_adderss, scan_size in to_scan_regions:
@@ -554,13 +554,13 @@ class Process:
554
554
  try:
555
555
 
556
556
  # Read bytes into pre-allocated buffer
557
- self.read_into_buffer(scan_adderss, scan_size, ctypes.addressof(read_memory_buffer))
557
+ self.read_into_buffer(scan_adderss, scan_size, ctypes.c_void_p(ctypes.addressof(read_memory_buffer)))
558
558
 
559
559
  except Exception:
560
560
  pass
561
561
 
562
562
  # Pattern scan region using SIMD KMP algorithm
563
- self.__kmp.scanAOB(ctypes.addressof(read_memory_buffer), scan_size, pattern.strip().encode(), ctypes.c_uint64(scan_adderss), ctypes.c_uint64(return_first if return_first is not None else 0), ctypes.byref(scan_result := PatternScanBuffer()))
563
+ self.__kmp.scanAOB(ctypes.c_void_p(ctypes.addressof(read_memory_buffer)), scan_size, pattern.strip().encode(), ctypes.c_uint64(scan_adderss), ctypes.c_uint64(return_first if return_first is not None else 0), ctypes.byref(scan_result := PatternScanBuffer()))
564
564
 
565
565
  # Read result addresses
566
566
  addresses = scan_result.read()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: ntmemoryapi
3
- Version: 2.2.0
3
+ Version: 2.2.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
@@ -0,0 +1,8 @@
1
+ ntmemoryapi/__init__.py,sha256=IpNFyFEAGX-iiZdhrxqBUyyPk00E3Wye2T7CPGQ_FRU,34835
2
+ ntmemoryapi/embed.py,sha256=CQXFDPwHZDoouMSxveng8YL_PWjyhQsw1akdUEjXnCk,113455
3
+ ntmemoryapi/errors.py,sha256=qTeFYjSExsDQohMSadk2ExqWFn2AGYBGe6JvdJDDxys,4293
4
+ ntmemoryapi/misc.py,sha256=1NwrG1NqsBHen2MaiB3f6tS68O4xsAxtR1ZGzTp_3Qg,6146
5
+ ntmemoryapi-2.2.2.dist-info/WHEEL,sha256=iHtWm8nRfs0VRdCYVXocAWFW8ppjHL-uTJkAdZJKOBM,80
6
+ ntmemoryapi-2.2.2.dist-info/entry_points.txt,sha256=Phqb0ELECEWNZWxRK5kdZ9H840MadIpxHrKU9Vjh2bg,50
7
+ ntmemoryapi-2.2.2.dist-info/METADATA,sha256=ReNVfuzyEjGpB5ZHy6SIYwZWKKjzOYbsvafIH40ZY9E,265
8
+ ntmemoryapi-2.2.2.dist-info/RECORD,,
@@ -1,8 +0,0 @@
1
- ntmemoryapi/__init__.py,sha256=R6XPpxI4TcDbLuEW__zG5ZZAYcNWFxdTM7zwwZJaOSA,34799
2
- ntmemoryapi/embed.py,sha256=CQXFDPwHZDoouMSxveng8YL_PWjyhQsw1akdUEjXnCk,113455
3
- ntmemoryapi/errors.py,sha256=qTeFYjSExsDQohMSadk2ExqWFn2AGYBGe6JvdJDDxys,4293
4
- ntmemoryapi/misc.py,sha256=1NwrG1NqsBHen2MaiB3f6tS68O4xsAxtR1ZGzTp_3Qg,6146
5
- ntmemoryapi-2.2.0.dist-info/WHEEL,sha256=iHtWm8nRfs0VRdCYVXocAWFW8ppjHL-uTJkAdZJKOBM,80
6
- ntmemoryapi-2.2.0.dist-info/entry_points.txt,sha256=Phqb0ELECEWNZWxRK5kdZ9H840MadIpxHrKU9Vjh2bg,50
7
- ntmemoryapi-2.2.0.dist-info/METADATA,sha256=uG_zDz6NVTkn7e72y5UknXTHug220dO4opu0gLs8PDw,265
8
- ntmemoryapi-2.2.0.dist-info/RECORD,,