Rizin
unix-like reverse engineering framework and cli tools
|
#include "io_rzk_linux.h"
Go to the source code of this file.
Macros | |
#define | fset(num, shift) ((((num) & (((ut64)1) << (shift))) == 0) ? 0 : 1) |
Functions | |
static const char * | getargpos (const char *buf, int pos) |
static size_t | getvalue (const char *buf, int pos) |
static void | print_help (RzIO *io, char *cmd, int p_usage) |
int | ReadMemory (RzIO *io, RzIODesc *iodesc, int ioctl_n, size_t pid, size_t address, ut8 *buf, int len) |
int | WriteMemory (RzIO *io, RzIODesc *iodesc, int ioctl_n, size_t pid, ut64 address, const ut8 *buf, int len) |
int | run_old_command (RzIO *io, RzIODesc *iodesc, const char *buf) |
int | run_new_command (RzIO *io, RzIODesc *iodesc, const char *buf) |
int | run_ioctl_command (RzIO *io, RzIODesc *iodesc, const char *buf) |
Definition at line 10 of file io_rzk_linux.c.
Definition at line 208 of file io_rzk_linux.c.
References i, pos, and rz_str_ichr().
Referenced by getvalue(), and run_old_command().
Definition at line 220 of file io_rzk_linux.c.
References getargpos(), and pos.
Referenced by run_old_command().
Definition at line 231 of file io_rzk_linux.c.
References rz_io_t::cb_printf, cmd, i, and usage().
Referenced by run_old_command().
int ReadMemory | ( | RzIO * | io, |
RzIODesc * | iodesc, | ||
int | ioctl_n, | ||
size_t | pid, | ||
size_t | address, | ||
ut8 * | buf, | ||
int | len | ||
) |
Definition at line 272 of file io_rzk_linux.c.
References rzk_data::addr, rzk_data::buff, calloc(), rz_io_t::cb_printf, rz_io_desc_t::data, free(), ioctl, len, rzk_data::len, memcpy(), memset(), pid, rzk_data::pid, and ut64().
Referenced by run_old_command(), and rzk__read().
Definition at line 842 of file io_rzk_linux.c.
References run_new_command(), run_old_command(), and rz_str_ichr().
Referenced by rzk__system().
Definition at line 772 of file io_rzk_linux.c.
References io_rzk_linux::beid, rz_io_t::cb_printf, cmd, eq, free(), p, io_rzk_linux::pid, run_old_command(), rz_str_bool(), rz_str_newf(), rz_str_startswith(), rzk_struct, ut8, v, and io_rzk_linux::wp.
Referenced by run_ioctl_command().
Definition at line 385 of file io_rzk_linux.c.
References addr, io_rzk_linux::beid, calloc(), rz_io_t::cb_printf, rz_core_bind_t::cmd, cmd, rzk_proc_info::comm, rz_core_bind_t::core, rz_io_t::corebind, rz_io_desc_t::data, test_evm::end, eprintf, free(), getargpos(), getvalue(), i, in, info(), ioctl, IOCTL_GET_KERNEL_MAP, IOCTL_PRINT_PROC_INFO, IOCTL_READ_CONTROL_REG, IOCTL_READ_KERNEL_MEMORY, IOCTL_READ_PHYSICAL_ADDR, IOCTL_READ_PROCESS_ADDR, IOCTL_WRITE_KERNEL_MEMORY, IOCTL_WRITE_PHYSICAL_ADDR, IOCTL_WRITE_PROCESS_ADDR, len, malloc(), MAP_SHARED, memcpy(), mmap, munmap, rzk_kernel_maps::n_entries, NULL, rz_io_t::off, PFMT64u, PFMT64x, pid, io_rzk_linux::pid, rzk_proc_info::pid, print_help(), PROT_READ, ReadMemory(), rz_hex_str2bin(), rz_print_free(), rz_print_hexdump_str(), rz_print_new(), rz_str_unescape(), rzk_struct, rzk_kernel_maps::size, sprintf, rzk_proc_info::stack, rzk_proc_info::task, ut64(), ut8, VM_EXEC, VM_MAYSHARE, VM_READ, VM_WRITE, rzk_proc_info::vmareastruct, io_rzk_linux::wp, rzk_data::wp, and WriteMemory().
Referenced by run_ioctl_command(), and run_new_command().
int WriteMemory | ( | RzIO * | io, |
RzIODesc * | iodesc, | ||
int | ioctl_n, | ||
size_t | pid, | ||
ut64 | address, | ||
const ut8 * | buf, | ||
int | len | ||
) |
Definition at line 351 of file io_rzk_linux.c.
References rzk_data::addr, rzk_data::buff, calloc(), rz_io_t::cb_printf, rz_io_desc_t::data, free(), ioctl, len, rzk_data::len, memcpy(), pid, rzk_data::pid, rzk_struct, io_rzk_linux::wp, and rzk_data::wp.
Referenced by run_old_command(), and rzk__write().