MCPcopy Create free account
hub / github.com/adeljck/PassGet / OpenProcess

Function OpenProcess

modules/utils/remote/remote.go:13–19  ·  view source on GitHub ↗
(pid int32)

Source from the content-addressed store, hash-verified

11)
12
13func OpenProcess(pid int32) (windows.Handle, error) {
14 handle, err := windows.OpenProcess(utils.PROCESS_VM_READ|utils.PROCESS_QUERY_INFORMATION, false, uint32(pid))
15 if err != nil {
16 // return 0, fmt.Errorf("failed to open process: %v", err)
17 }
18 return handle, nil
19}
20func ReadMemory(handle windows.Handle, address uintptr, size uint32) ([]byte, error) {
21 buffer := make([]byte, size)
22 var bytesRead uintptr

Callers 2

GetFromProcessMethod · 0.92
GetFromProcessMethod · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected