ntmemoryapi 2.1.1__tar.gz → 2.1.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.1.1 → ntmemoryapi-2.1.3}/PKG-INFO +1 -1
- {ntmemoryapi-2.1.1 → ntmemoryapi-2.1.3}/pyproject.toml +1 -1
- {ntmemoryapi-2.1.1 → ntmemoryapi-2.1.3}/src/ntmemoryapi/__init__.py +6 -6
- {ntmemoryapi-2.1.1 → ntmemoryapi-2.1.3}/src/ntmemoryapi/misc.py +1 -1
- {ntmemoryapi-2.1.1 → ntmemoryapi-2.1.3}/README.md +0 -0
- {ntmemoryapi-2.1.1 → ntmemoryapi-2.1.3}/src/ntmemoryapi/embed.py +0 -0
- {ntmemoryapi-2.1.1 → ntmemoryapi-2.1.3}/src/ntmemoryapi/errors.py +0 -0
|
@@ -120,7 +120,7 @@ class MODULEENTRY32(ctypes.Structure):
|
|
|
120
120
|
def base(self) -> int:
|
|
121
121
|
"""Process module base address."""
|
|
122
122
|
|
|
123
|
-
return self.mod_base_addr
|
|
123
|
+
return self.mod_base_addr
|
|
124
124
|
|
|
125
125
|
@property
|
|
126
126
|
def size(self) -> int:
|
|
@@ -140,20 +140,20 @@ 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
|
|
147
147
|
def base_address(self) -> int:
|
|
148
148
|
"""Memory region base address."""
|
|
149
149
|
|
|
150
|
-
return self.m_base_address
|
|
150
|
+
return self.m_base_address
|
|
151
151
|
|
|
152
152
|
@property
|
|
153
153
|
def allocation_base(self) -> int:
|
|
154
154
|
"""Memory region allocation base."""
|
|
155
155
|
|
|
156
|
-
return self.m_allocation_base
|
|
156
|
+
return self.m_allocation_base
|
|
157
157
|
|
|
158
158
|
@property
|
|
159
159
|
def allocation_protect(self) -> int:
|
|
@@ -200,7 +200,7 @@ class PatternScanBuffer(ctypes.Structure):
|
|
|
200
200
|
("size", ctypes.c_size_t),
|
|
201
201
|
]
|
|
202
202
|
|
|
203
|
-
def read(self) -> list:
|
|
203
|
+
def read(self) -> list[int]:
|
|
204
204
|
"""Read all of the values located at buffer array."""
|
|
205
205
|
|
|
206
206
|
return list((ctypes.c_size_t * self.size).from_address(self.pointer))
|
|
@@ -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
|
|
@@ -110,7 +110,7 @@ class DirectSyscallWrapper:
|
|
|
110
110
|
B8 %s %s 00 00
|
|
111
111
|
0F 05
|
|
112
112
|
C3
|
|
113
|
-
""" % tuple(
|
|
113
|
+
""" % tuple(syscall_id_bytes))
|
|
114
114
|
|
|
115
115
|
# Allocate buffer for function machine code
|
|
116
116
|
if not (shellcode_buffer := _VirtualAlloc(0, len(shellcode), 0x1000 | 0x2000, 0x04)):
|
|
File without changes
|
|
File without changes
|
|
File without changes
|