Skip to content

Commit d4952e2

Browse files
committed
More arm64 heaven gate NotImplementedError()
1 parent fc0c81e commit d4952e2

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

windows/winobject/process.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,8 @@ def ppid(self):
166166
:type: :class:`int`
167167
"""
168168
if windows.current_process.bitness == 32 and self.bitness == 64:
169+
if windows.current_process._is_x86_on_arm64:
170+
raise NotImplementedError("Crossing heaven gate x86 -> arm64 not implemented")
169171
xtype = windows.remotectypes.transform_type_to_remote64bits(PROCESS_BASIC_INFORMATION)
170172
# Fuck-it <3
171173
data = (ctypes.c_char * ctypes.sizeof(xtype))()
@@ -236,6 +238,8 @@ def virtual_protected(self, addr, size, protect):
236238
def virtual_protect(self, addr, size, protect, old_protect=None):
237239
"""Change the access right of one or more page of the process"""
238240
if windows.current_process.bitness == 32 and self.bitness == 64:
241+
if windows.current_process._is_x86_on_arm64:
242+
raise NotImplementedError("Crossing heaven gate x86 -> arm64 not implemented")
239243
if size & 0x0fff:
240244
size = ((size >> 12) + 1) << 12
241245
if old_protect is None:
@@ -266,6 +270,8 @@ def query_memory(self, addr):
266270
:rtype: :class:`~windows.generated_def.winstructs.MEMORY_BASIC_INFORMATION`
267271
"""
268272
if windows.current_process.bitness == 32 and self.bitness == 64:
273+
if windows.current_process._is_x86_on_arm64:
274+
raise NotImplementedError("Crossing heaven gate x86 -> arm64 not implemented")
269275
res = MEMORY_BASIC_INFORMATION64()
270276
try:
271277
v = windows.syswow64.NtQueryVirtualMemory_32_to_64(ProcessHandle=self.handle, BaseAddress=addr, MemoryInformationClass=MemoryBasicInformation, MemoryInformation=res)
@@ -346,6 +352,8 @@ def query_working_setex(self, addresses):
346352
for i, data in enumerate(info_array):
347353
info_array[i].VirtualAddress = addresses[i]
348354
if windows.current_process.bitness == 32 and self.bitness == 64:
355+
if windows.current_process._is_x86_on_arm64:
356+
raise NotImplementedError("Crossing heaven gate x86 -> arm64 not implemented")
349357
windows.syswow64.NtQueryVirtualMemory_32_to_64(self.handle, 0, MemoryWorkingSetListEx, info_array)
350358
else:
351359
winproxy.QueryWorkingSetEx(self.handle, ctypes.byref(info_array), ctypes.sizeof(info_array))
@@ -908,6 +916,8 @@ def start_address(self):
908916
:type: :class:`int`
909917
"""
910918
if windows.current_process.bitness == 32 and self.owner.bitness == 64:
919+
if windows.current_process._is_x86_on_arm64:
920+
raise NotImplementedError("Crossing heaven gate x86 -> arm64 not implemented")
911921
res = ULONGLONG()
912922
windows.syswow64.NtQueryInformationThread_32_to_64(self.handle, ThreadQuerySetWin32StartAddress, byref(res), ctypes.sizeof(res))
913923
return res.value

0 commit comments

Comments
 (0)