def access_process_vm(task, address, size) -> bytes: """ .. c:function:: char *access_process_vm(struct task_struct *task, void *address, size_t size) Read memory from a task's virtual address space. >>> task = find_task(prog, 1490152) >>> access_process_vm(task, 0x7f8a62b56da0, 12) b'hello, world' """ return _linux_helper_read_vm(task.prog_, task.mm.pgd, address, size)
def access_process_vm(task: Object, address: IntegerLike, size: IntegerLike) -> bytes: """ Read memory from a task's virtual address space. >>> task = find_task(prog, 1490152) >>> access_process_vm(task, 0x7f8a62b56da0, 12) b'hello, world' :param task: ``struct task_struct *`` :param address: Starting address. :param size: Number of bytes to read. """ return _linux_helper_read_vm(task.prog_, task.mm.pgd, address, size)
def access_remote_vm(mm, address, size) -> bytes: """ .. c:function:: char *access_remote_vm(struct mm_struct *mm, void *address, size_t size) Read memory from a virtual address space. This is similar to :func:`access_process_vm()`, but it takes a ``struct mm_struct *`` instead of a ``struct task_struct *``. >>> task = find_task(prog, 1490152) >>> access_remote_vm(task.mm, 0x7f8a62b56da0, 12) b'hello, world' """ return _linux_helper_read_vm(mm.prog_, mm.pgd, address, size)
def access_remote_vm(mm: Object, address: IntegerLike, size: IntegerLike) -> bytes: """ Read memory from a virtual address space. This is similar to :func:`access_process_vm()`, but it takes a ``struct mm_struct *`` instead of a ``struct task_struct *``. >>> task = find_task(prog, 1490152) >>> access_remote_vm(task.mm, 0x7f8a62b56da0, 12) b'hello, world' :param mm: ``struct mm_struct *`` :param address: Starting address. :param size: Number of bytes to read. """ return _linux_helper_read_vm(mm.prog_, mm.pgd, address, size)