mirror of
https://github.com/hakril/PythonForWindows
synced 2026-06-08 14:31:45 +00:00
Fix CurrentProcessReadSyswow for windows10
This commit is contained in:
@@ -7,4 +7,5 @@ Since 0.2:
|
||||
* utils.get_short_path / utils.get_long_path
|
||||
* Object returned by `windows.native_exec.create_function` has an attribute `code_addr` with the address of the executable code
|
||||
* add `windows.winproxy.is_implemented` Ex: windows.winproxy.is_implemented(windows.winproxy.QueryWorkingSetEx)
|
||||
* registry.py handle REG_QWORD manually (_winreg does not)
|
||||
* registry.py handle REG_QWORD manually (_winreg does not)
|
||||
* CurrentProcessReadSyswow doest not use ``current_process.handle`` anymore but ``OpenProcess(current_process.pid)`` (Compat windows10 where method 1 doest not work)
|
||||
+5
-1
@@ -181,9 +181,13 @@ def get_current_process_syswow_peb():
|
||||
|
||||
class CurrentProcessReadSyswow(process.Process):
|
||||
bitness = 64
|
||||
def _get_handle(self):
|
||||
print("CurrentProcessReadSyswow get_handler")
|
||||
return winproxy.OpenProcess(dwProcessId=current_process.pid)
|
||||
|
||||
def read_memory(self, addr, size):
|
||||
buffer_addr = ctypes.create_string_buffer(size)
|
||||
winproxy.NtWow64ReadVirtualMemory64(current_process.handle, addr, buffer_addr, size)
|
||||
winproxy.NtWow64ReadVirtualMemory64(self.handle, addr, buffer_addr, size)
|
||||
return buffer_addr[:]
|
||||
peb_addr = get_current_process_syswow_peb_addr()
|
||||
return windows.winobject.process.RemotePEB64(peb_addr, CurrentProcessReadSyswow())
|
||||
|
||||
Reference in New Issue
Block a user