MCPcopy Create free account
hub / github.com/ELMERIKH/PyinMemoryPE / create_thread

Method create_thread

windows/winobject/process.py:1113–1122  ·  view source on GitHub ↗

Create a remote thread :rtype: :class:`WinThread` or :class:`DeadThread`

(self, addr, param)

Source from the content-addressed store, hash-verified

1111 return struct
1112
1113 def create_thread(self, addr, param):
1114 """Create a remote thread
1115
1116 :rtype: :class:`WinThread` or :class:`DeadThread`
1117 """
1118 if windows.current_process.bitness == 32 and self.bitness == 64:
1119 thread_handle = HANDLE()
1120 windows.syswow64.NtCreateThreadEx_32_to_64(ThreadHandle=byref(thread_handle) ,ProcessHandle=self.handle, lpStartAddress=addr, lpParameter=param)
1121 return WinThread._from_handle(thread_handle.value)
1122 return WinThread._from_handle(winproxy.CreateRemoteThread(hProcess=self.handle, lpStartAddress=addr, lpParameter=param))
1123
1124 def load_library(self, dll_path):
1125 """Load the library in remote process

Callers 3

execute_python_codeFunction · 0.45
executeMethod · 0.45

Calls 1

_from_handleMethod · 0.45

Tested by

no test coverage detected