Rizin
unix-like reverse engineering framework and cli tools
|
#include <ht_uu.h>
#include <rz_asm.h>
#include <rz_core.h>
#include <rz_io.h>
#include <rz_list.h>
#include <rz_types_base.h>
#include "../core_private.h"
#include "cmd_search_rop.c"
Go to the source code of this file.
Classes | |
struct | search_parameters |
struct | endlist_pair |
Macros | |
#define | USE_EMULATION 0 |
#define | AES_SEARCH_LENGTH 40 |
#define | PRIVATE_KEY_SEARCH_LENGTH 11 |
#define | USE_SKYLINE 0 |
#define | MAXINSTR 8 |
#define | SUMARRAY(arr, size, res) |
Variables | |
static const char * | help_msg_search_esil [] |
static const char * | help_msg_slash_m [] |
static const char * | help_msg_slash [] |
static const char * | help_msg_slash_a [] |
static const char * | help_msg_slash_c [] |
static const char * | help_msg_slash_r [] |
static const char * | help_msg_slash_R [] |
static const char * | help_msg_slash_Rk [] |
static const char * | help_msg_slash_x [] |
static int | preludecnt = 0 |
static int | searchflags = 0 |
static int | searchshow = 0 |
static const char * | searchprefix = NULL |
static int | c = 0 |
#define AES_SEARCH_LENGTH 40 |
Definition at line 16 of file cmd_search.c.
#define MAXINSTR 8 |
Definition at line 1705 of file cmd_search.c.
#define PRIVATE_KEY_SEARCH_LENGTH 11 |
Definition at line 17 of file cmd_search.c.
#define SUMARRAY | ( | arr, | |
size, | |||
res | |||
) |
Definition at line 1706 of file cmd_search.c.
#define USE_EMULATION 0 |
Definition at line 14 of file cmd_search.c.
#define USE_SKYLINE 0 |
Definition at line 2856 of file cmd_search.c.
References rz_asm_op_t::buf_asm, search_parameters::core, i, rz_core_t::io, rz_core_t::rasm, rz_asm_disassemble(), rz_cons_printf(), rz_io_read_at(), and rz_strbuf_get().
Referenced by rz_cmd_search().
Definition at line 2828 of file cmd_search.c.
References analop(), rz_core_t::analysis, search_parameters::boundaries, calloc(), rz_core_t::config, search_parameters::core, free(), rz_core_t::io, map(), PFMT64x, rz_analysis_op(), rz_analysis_op_fini(), RZ_ANALYSIS_OP_MASK_HINT, rz_config_get(), rz_cons_printf(), rz_core_get_boundaries_prot(), rz_io_read_at(), and ut64().
Referenced by rz_cmd_search().
|
static |
Definition at line 283 of file cmd_search.c.
References addr, rz_core_t::config, preludecnt, RZ_ANALYSIS_XREF_TYPE_NULL, rz_config_get_i(), and rz_core_analysis_fcn().
Referenced by rz_core_search_prelude().
|
static |
Definition at line 403 of file cmd_search.c.
References addr, bytes, calloc(), search_parameters::cmd_hit, Color_RESET, Color_YELLOW, search_parameters::core, rz_search_keyword_t::count, eprintf, rz_core_t::flags, rz_print_t::flags, free(), getstring(), i, rz_core_t::io, rz_search_keyword_t::keyword_length, rz_search_keyword_t::kwidx, len, malloc(), memset(), NULL, rz_core_t::offset, search_parameters::outmode, p, PFMT64x, search_parameters::pj, pj_end(), pj_ki(), pj_kN(), pj_ks(), pj_o(), pos, rz_core_t::print, rz_cons_printf(), rz_core_cmd(), rz_core_seek(), rz_flag_set(), rz_io_read_at(), RZ_MODE_JSON, RZ_PRINT_FLAGS_COLOR, RZ_SEARCH_DELTAKEY, RZ_SEARCH_KEYWORD_TYPE_STRING, rz_str_newf(), rz_str_utf16_encode(), s, sdb_fmt(), rz_core_t::search, search(), searchflags, searchprefix, searchshow, sprintf, cmd_descs_generate::str, strdup(), type, rz_search_keyword_t::type, and ut64().
Referenced by do_esil_search(), and do_string_search().
Definition at line 2578 of file cmd_search.c.
References addr, rz_core_t::config, search_parameters::core, from, isArm(), rz_core_t::offset, search_parameters::outmode, PFMT64x, search_parameters::pj, pj_end(), pj_kN(), pj_o(), prefix, rz_config_get(), rz_cons_printf(), rz_core_cmd(), rz_core_cmdf(), rz_core_seek(), RZ_MODE_JSON, to, and ut64().
Referenced by rz_cmd_search().
|
static |
Definition at line 535 of file cmd_search.c.
References rz_interval_t::addr, rz_io_t::desc, eprintf, free(), from, list(), map(), rz_io_fd_get_current(), rz_itv_intersect(), rz_itv_overlap(), rz_list_append(), RZ_NEW0, rz_interval_t::size, and UT64_MAX.
Referenced by rz_core_get_boundaries_prot().
|
static |
Definition at line 246 of file cmd_search.c.
References rz_interval_t::addr, rz_core_t::analysis, b, rz_core_t::bin, rz_bin_t::cur, fd, rz_core_file_t::fd, rz_core_t::file, from, rz_analysis_t::iob, rz_bin_plugin_t::name, NULL, PFMT64x, rz_bin_get_binplugin_by_buffer(), rz_bin_open_io(), rz_buf_free(), rz_buf_new_slice(), rz_buf_new_with_io_fd(), rz_cons_break_pop(), rz_cons_break_push(), rz_cons_is_breaked(), rz_cons_printf(), rz_itv_end(), rz_bin_plugin_t::size, to, and ut64().
Referenced by rz_cmd_search().
|
static |
Definition at line 990 of file cmd_search.c.
References addr, rz_core_t::analysis, buflen, calloc(), rz_core_t::config, search_parameters::core, count, rz_analysis_t::cur, endlist_pair::delay_size, test_evm::end, error(), found, free(), hit(), setup::idx, insert_into(), endlist_pair::instr_offset, is_end_gadget(), rz_analysis_op_t::mnemonic, rz_analysis_plugin_t::name, NULL, rz_core_t::rasm, rz_analysis_op(), rz_analysis_op_fini(), RZ_ANALYSIS_OP_MASK_DISASM, RZ_ANALYSIS_OP_TYPE_NOP, rz_asm_disassemble(), rz_asm_op_fini(), rz_asm_op_get_asm(), rz_asm_set_pc(), rz_config_get_i(), rz_core_asm_hit_list_new(), rz_core_asm_hit_new(), rz_list_append(), rz_list_free(), rz_list_get_n(), rz_list_length(), RZ_LOG_WARN, rz_regex_match(), rz_str_ncasecmp(), rz_analysis_op_t::size, start, strdup(), rz_analysis_op_t::type, and valid.
Referenced by rz_core_search_rop().
|
static |
Definition at line 1949 of file cmd_search.c.
References rz_search_t::align, rz_core_t::analysis, search_parameters::boundaries, search_parameters::cmd_hit, rz_analysis_op_t::cond, count, done, rz_analysis_op_t::family, rz_core_t::flags, from, help_msg_slash_a, i, if(), input(), rz_core_t::io, list(), map(), rz_analysis_op_t::mnemonic, rz_search_t::n_kws, NULL, rz_core_t::offset, opstr(), PFMT64x, search_parameters::pj, pj_a(), pj_end(), pj_ki(), pj_kN(), pj_ks(), pj_o(), rz_analysis_op(), rz_analysis_op_family_to_string(), RZ_ANALYSIS_OP_MASK_BASIC, RZ_ANALYSIS_OP_MASK_DISASM, rz_analysis_optype_to_string(), rz_cons_break_pop(), rz_cons_break_push(), rz_cons_is_breaked(), rz_cons_printf(), rz_cons_println(), rz_core_cmd(), rz_core_cmd0(), rz_core_cmd_help(), rz_core_op_str(), rz_core_seek(), rz_flag_set(), RZ_FREE, rz_io_read_at(), rz_itv_end(), rz_list_free(), RZ_LOG_ERROR, rz_str_startswith(), rz_str_trim_head_ro(), rz_syscall_list(), rz_warn_if_reached, rz_core_t::search, search(), searchflags, searchprefix, si, snprintf, cmd_descs_generate::str, rz_analysis_t::syscall, syscallNumber(), to, type, rz_analysis_op_t::type, and ut64().
Referenced by rz_cmd_search().
|
static |
Definition at line 2201 of file cmd_search.c.
References rz_core_t::analysis, rz_print_t::big_endian, search_parameters::boundaries, rz_core_t::config, count, rz_core_t::flags, free(), from, hit(), input(), int, map(), rz_search_t::n_kws, NULL, search_parameters::outmode, rz_core_t::parser, PFMT64x, search_parameters::pj, pj_a(), pj_end(), pj_ki(), pj_kN(), pj_ks(), pj_o(), rz_core_t::print, rz_analysis_hint_free(), rz_analysis_hint_get(), rz_config_get(), rz_config_get_i(), rz_cons_break_pop(), rz_cons_break_push(), rz_cons_is_breaked(), rz_cons_printf(), rz_core_asm_strsearch(), rz_core_cmdf(), rz_flag_set(), rz_itv_end(), rz_itv_overlap(), rz_list_purge(), RZ_MODE_JSON, RZ_MODE_RIZINCMD, rz_parse_filter(), sdb_fmt(), rz_core_t::search, searchflags, searchprefix, autogen_x86imm::tmp, to, and ut64().
Referenced by rz_cmd_search().
|
static |
Definition at line 1573 of file cmd_search.c.
References _cb_hit(), addr, rz_search_t::align, rz_core_t::analysis, search_parameters::boundaries, rz_analysis_esil_t::cb, rz_core_t::config, rz_search_keyword_t::count, eprintf, rz_analysis_t::esil, esil_addrinfo(), free(), from, help_msg_search_esil, input(), rz_search_keyword_t::keyword_length, rz_search_keyword_t::kwidx, map(), NULL, search_parameters::outmode, PFMT64d, PFMT64x, search_parameters::pj, pj_a(), pj_end(), pj_kn(), pj_o(), rz_analysis_esil_get_parm(), rz_analysis_esil_new(), RZ_ANALYSIS_ESIL_OP_TYPE_UNKNOWN, rz_analysis_esil_parse(), rz_analysis_esil_pop(), rz_analysis_esil_set_op(), rz_analysis_esil_set_pc(), rz_analysis_esil_setup(), rz_analysis_esil_stack_free(), rz_config_get_b(), rz_config_get_i(), rz_config_set_i(), rz_cons_break_pop(), rz_cons_break_push(), rz_cons_clear_line(), rz_cons_is_breaked(), rz_core_analysis_esil_reinit(), rz_core_cmd_help(), RZ_EMPTY, rz_itv_end(), RZ_MODE_JSON, rz_core_t::search, search(), to, rz_search_keyword_t::type, rz_analysis_esil_callbacks_t::user, ut64(), and rz_analysis_esil_t::verbose.
Referenced by rz_cmd_search().
|
static |
Definition at line 1904 of file cmd_search.c.
References addr, rz_core_t::analysis, rz_print_t::big_endian, rz_asm_op_t::buf_asm, search_parameters::cmd_hit, rz_core_t::flags, free(), rz_analysis_ref_t::from, from, rz_core_t::io, list(), rz_analysis_function_t::name, NULL, rz_core_t::offset, rz_core_t::parser, PFMT64x, rz_core_t::print, print_comment(), rz_core_t::rasm, rz_analysis_get_fcn_in(), rz_analysis_hint_free(), rz_analysis_hint_get(), rz_analysis_xrefs_get_to(), rz_analysis_xrefs_type_tostring(), rz_asm_disassemble(), rz_asm_set_pc(), rz_cons_printf(), rz_core_cmd(), rz_core_seek(), rz_io_read_at(), rz_list_free(), rz_meta_get_string(), RZ_META_TYPE_COMMENT, rz_parse_filter(), rz_str_ndup(), rz_str_newf(), rz_strbuf_get(), cmd_descs_generate::str, to, rz_analysis_ref_t::type, and ut64().
Referenced by rz_cmd_search().
|
static |
Definition at line 2133 of file cmd_search.c.
References rz_core_t::blocksize, search_parameters::boundaries, buf_size, e, test_evm::end, free(), from, rz_core_t::hash, input(), rz_core_t::io, malloc(), map(), NULL, PFMT64x, RZ_ABS, rz_cons_break_pop(), rz_cons_break_push(), rz_cons_is_breaked(), rz_cons_printf(), rz_hash_entropy(), rz_io_read_at(), rz_itv_end(), to, ut64(), and UT64_MAX.
Referenced by rz_cmd_search().
|
static |
Definition at line 2304 of file cmd_search.c.
References _cb_hit(), rz_interval_t::addr, search_parameters::aes_search, AES_SEARCH_LENGTH, rz_search_t::bckwrds, rz_core_t::blocksize, search_parameters::boundaries, done, eprintf, free(), from, search_parameters::inverse, rz_search_t::inverse, rz_core_t::io, rz_search_keyword_t::keyword_length, rz_search_t::kws, rz_search_keyword_t::last, len, malloc(), map(), rz_search_t::maxhits, rz_search_t::n_kws, rz_search_t::nhits, NULL, rz_core_t::num, search_parameters::outmode, PFMT64d, PFMT64x, search_parameters::pj, pj_a(), pj_end(), print_search_progress(), PRIVATE_KEY_SEARCH_LENGTH, search_parameters::privkey_search, rz_cons_break_pop(), rz_cons_break_push(), rz_cons_clear_line(), rz_cons_is_breaked(), rz_cons_printf(), rz_io_is_valid_offset(), rz_io_read_at(), rz_itv_end(), rz_itv_intersect(), rz_itv_overlap(), rz_list_first(), RZ_MIN, RZ_MODE_JSON, rz_search_set_callback(), rz_search_string_prepare_backward(), rz_search_update(), rz_core_t::search, search(), searchflags, to, ut64(), and rz_num_t::value.
Referenced by rz_cmd_search().
|
static |
Definition at line 1760 of file cmd_search.c.
References a0, rz_search_t::align, rz_core_t::analysis, rz_analysis_t::bits, rz_core_t::blocksize, search_parameters::boundaries, calloc(), search_parameters::cmd_hit, rz_core_t::config, count, eprintf, rz_analysis_op_t::esil, rz_core_t::flags, free(), from, i, setup::idx, if(), rz_core_t::io, malloc(), map(), MAXINSTR, memset(), rz_search_t::n_kws, arg::name, nbytes, NULL, rz_core_t::offset, PFMT64x, reg, rz_analysis_t::reg, rz_analysis_archinfo(), RZ_ANALYSIS_ARCHINFO_MIN_OP_SIZE, rz_analysis_esil_free(), rz_analysis_esil_new(), rz_analysis_op(), rz_analysis_op_fini(), RZ_ANALYSIS_OP_MASK_ESIL, RZ_ANALYSIS_OP_TYPE_MOV, RZ_ANALYSIS_OP_TYPE_SWI, rz_config_get_i(), rz_cons_break_pop(), rz_cons_break_push(), rz_cons_is_breaked(), rz_cons_printf(), rz_core_cmd(), rz_core_seek(), rz_flag_set(), rz_io_read_at(), rz_itv_end(), RZ_MAX, rz_reg_64_to_32(), rz_reg_get_name(), RZ_REG_NAME_SN, rz_str_newf(), RZ_STRBUF_SAFEGET, rz_syscall_get(), rz_syscall_item_free(), rz_core_t::search, search(), searchflags, searchprefix, SUMARRAY, rz_analysis_t::syscall, syscallNumber(), to, rz_analysis_op_t::type, ut64(), UT64_MAX, and rz_analysis_op_t::val.
Referenced by rz_cmd_search().
|
static |
Definition at line 1558 of file cmd_search.c.
References rz_analysis_esil_t::cb, free(), num, rz_analysis_esil_get_parm(), rz_analysis_esil_pop(), rz_analysis_esil_pushnum(), rz_core_analysis_address(), src, rz_analysis_esil_callbacks_t::user, and ut64().
Referenced by do_esil_search().
|
static |
Definition at line 388 of file cmd_search.c.
References b, i, IS_PRINTABLE, malloc(), NULL, and r.
Referenced by _cb_hit().
Definition at line 2710 of file cmd_search.c.
Referenced by __printPattern(), and search_collisions().
Definition at line 2725 of file cmd_search.c.
Referenced by __printPattern(), and search_collisions().
Definition at line 2682 of file cmd_search.c.
References i, isalpha, and islower.
Referenced by search_collisions().
Definition at line 2668 of file cmd_search.c.
References i, and IS_PRINTABLE.
Referenced by search_collisions().
Definition at line 2696 of file cmd_search.c.
References i, isalpha, and isupper.
Referenced by search_collisions().
|
static |
Definition at line 951 of file cmd_search.c.
References rz_analysis_op_t::family, RZ_ANALYSIS_OP_FAMILY_SECURITY, RZ_ANALYSIS_OP_TYPE_CALL, RZ_ANALYSIS_OP_TYPE_CCALL, RZ_ANALYSIS_OP_TYPE_CJMP, RZ_ANALYSIS_OP_TYPE_CRET, RZ_ANALYSIS_OP_TYPE_ICALL, RZ_ANALYSIS_OP_TYPE_IJMP, RZ_ANALYSIS_OP_TYPE_IRCALL, RZ_ANALYSIS_OP_TYPE_IRJMP, RZ_ANALYSIS_OP_TYPE_JMP, RZ_ANALYSIS_OP_TYPE_RCALL, RZ_ANALYSIS_OP_TYPE_RET, RZ_ANALYSIS_OP_TYPE_RJMP, RZ_ANALYSIS_OP_TYPE_TRAP, RZ_ANALYSIS_OP_TYPE_UCALL, RZ_ANALYSIS_OP_TYPE_UCCALL, RZ_ANALYSIS_OP_TYPE_UCJMP, RZ_ANALYSIS_OP_TYPE_UJMP, and rz_analysis_op_t::type.
Referenced by construct_rop_gadget(), and rz_core_search_rop().
Definition at line 2566 of file cmd_search.c.
References rz_asm_t::cur, NULL, rz_core_t::rasm, and rz_str_startswith().
Referenced by _CbInRangeSearchV().
Definition at line 567 of file cmd_search.c.
References mask.
Referenced by rz_core_get_boundaries_prot().
Definition at line 1124 of file cmd_search.c.
References addr, analop(), rz_core_t::analysis, rz_asm_op_t::asm_toks, Color_RESET, rz_core_t::config, search_parameters::core, rz_list_iter_t::data, eprintf, free(), rz_list_t::head, hit(), rz_core_t::io, key, malloc(), NULL, opstr(), PFMT64x, search_parameters::pj, pj_end(), pj_ka(), pj_ki(), pj_kN(), pj_ks(), pj_o(), rz_core_t::print, rz_core_t::rasm, rz_analysis_t::reg, rop_classify(), rz_analysis_op(), rz_analysis_op_fini(), RZ_ANALYSIS_OP_MASK_BASIC, RZ_ANALYSIS_OP_MASK_ESIL, RZ_ANALYSIS_OP_TYPE_RET, rz_analysis_optype_to_string(), rz_asm_colorize_asm_str(), rz_asm_disassemble(), rz_asm_get_parse_param(), rz_asm_op_get_asm(), rz_asm_op_get_hex(), rz_asm_set_pc(), rz_config_get_i(), rz_cons_newline(), rz_cons_printf(), RZ_EMPTY, rz_io_read_at(), rz_list_append(), rz_list_free(), rz_list_newf(), rz_meta_get_string(), RZ_META_TYPE_COMMENT, rz_str_newf(), rz_strbuf_free(), rz_strbuf_get(), rz_strbuf_new(), RZ_STRBUF_SAFEGET, rz_core_t::sdb, sdb_fmt(), sdb_ns(), and ut64().
Referenced by rz_cmd_search(), and rz_core_search_rop().
|
inlinestatic |
Definition at line 522 of file cmd_search.c.
References c, eprintf, n, search_parameters::outmode, PFMT64x, rz_cons_singleton(), RZ_MODE_JSON, and to.
Referenced by do_string_search().
Definition at line 2420 of file cmd_search.c.
References dup, eprintf, free(), input(), ls_foreach, sdb_ns_t::name, sdb_t::ns, NULL, out, pj_end(), pj_ka(), pj_ks(), pj_o(), rz_cons_printf(), rz_cons_println(), rz_core_t::sdb, sdb_ns_t::sdb, sdb_foreach_list(), sdb_ns(), sdb_querys(), sdbkv_key(), sdbkv_value(), and strdup().
Referenced by rz_cmd_search().
Definition at line 2875 of file cmd_search.c.
References __core_cmd_search_asm_byteswap(), __core_cmd_search_asm_infinite(), _CbInRangeSearchV(), addr, rz_analysis_function_t::addr, rz_interval_t::addr, search_parameters::aes_search, AES_SEARCH_LENGTH, rz_search_t::align, rz_core_t::analysis, args, rz_search_t::bckwrds, rz_core_t::bin, rz_asm_t::bits, search_parameters::boundaries, c, calloc(), chunksize, search_parameters::cmd_hit, cmd_search_bin(), rz_core_t::config, search_parameters::core, rz_core_t::dbg, do_analysis_search(), do_asm_search(), do_esil_search(), do_ref_search(), do_section_search(), do_string_search(), do_syscall_search(), eprintf, err, rz_core_t::flags, free(), from, help_msg_slash, help_msg_slash_a, help_msg_slash_c, help_msg_slash_m, help_msg_slash_r, help_msg_slash_R, help_msg_slash_Rk, help_msg_slash_x, hit(), i, rz_search_keyword_t::icase, rz_core_t::in_search, input(), search_parameters::inverse, rz_core_t::io, rz_bin_t::is_debugger, rz_search_keyword_t::keyword_length, rz_core_t::lastsearch, len, ls_foreach, malloc(), map(), max, rz_search_t::maxhits, memcpy(), min, search_parameters::mode, n, NULL, rz_core_t::num, rz_core_t::offset, search_parameters::outmode, rz_search_t::overlap, p, PFMT32d, PFMT64u, PFMT64x, search_parameters::pj, pj_a(), pj_end(), pj_free(), pj_new(), pj_string(), print_rop(), PRIVATE_KEY_SEARCH_LENGTH, search_parameters::privkey_search, rz_core_t::rasm, rop_kuery(), RZ_ABS, rz_analysis_get_function_at(), rz_config_get(), rz_config_get_i(), rz_config_set_i(), rz_cons_break_pop(), rz_cons_break_push(), rz_cons_clear_line(), rz_cons_is_breaked(), rz_cons_printf(), rz_cons_println(), rz_core_analysis_paths(), rz_core_analysis_search(), rz_core_asm_bwdis_len(), rz_core_asm_hit_list_new(), rz_core_asm_hit_new(), rz_core_asm_search(), rz_core_cmd0(), rz_core_cmd_help(), rz_core_cmdf(), rz_core_get_boundaries_prot(), rz_core_magic_at(), rz_core_magic_reset(), rz_core_prevop_addr(), rz_core_prevop_addr_force(), rz_core_search_rop(), rz_core_search_value_in_range(), rz_debug_map_sync(), rz_file_slurp(), rz_hex_bin2str(), rz_hex_str2bin(), rz_itv_end(), rz_itv_intersect(), rz_itv_overlap(), rz_list_append(), rz_list_free(), rz_list_length(), RZ_MIN, RZ_MODE_JSON, RZ_MODE_RIZINCMD, rz_num_get(), rz_num_math(), rz_num_str_split_list(), RZ_SEARCH_AES, rz_search_begin(), RZ_SEARCH_DELTAKEY, RZ_SEARCH_KEYWORD, rz_search_keyword_new(), rz_search_keyword_new_hex(), rz_search_keyword_new_hexmask(), rz_search_keyword_new_regexp(), RZ_SEARCH_KEYWORD_TYPE_STRING, rz_search_kw_add(), rz_search_kw_reset(), rz_search_pattern(), rz_search_pattern_size(), RZ_SEARCH_PRIV_KEY, RZ_SEARCH_REGEXP, rz_search_reset(), rz_search_set_distance(), rz_search_set_string_limits(), RZ_SEARCH_STRING, rz_str_argv(), rz_str_argv_free(), rz_str_startswith(), rz_str_trim_dup(), rz_str_trim_head_ro(), rz_str_unescape(), s, rz_core_t::sdb, sdb_foreach_list(), sdb_ns(), sdbkv_value(), rz_core_t::search, search(), search_collisions(), search_hash(), search_similar_pattern(), searchflags, searchprefix, searchshow, shift(), rz_interval_t::size, sp, st64, cmd_descs_generate::str, strdup(), to, tolower, rz_search_keyword_t::type, UT32_MAX, ut64(), UT64_MAX, ut8, v_writebuf(), rz_num_t::value, and w.
Referenced by rz_core_cmd_init(), and rzshell_cmddescs_init().
RZ_API RZ_OWN RzList* rz_core_get_boundaries_prot | ( | RzCore * | core, |
int | perm, | ||
const char * | mode, | ||
const char * | prefix | ||
) |
Definition at line 577 of file cmd_search.c.
References add(), addr, rz_analysis_bb_t::addr, rz_interval_t::addr, test_group_name::all, rz_core_t::analysis, append_bound(), rz_core_t::bin, rz_core_t::blocksize, bool, rz_core_t::config, search_parameters::core, rz_core_t::dbg, rz_io_map_t::delta, test_evm::end, eprintf, f, rz_core_file_t::fd, rz_core_t::file, free(), from, i, rz_core_t::io, rz_bin_t::is_debugger, rz_io_map_t::itv, rz_skyline_item_t::itv, len, list(), regress::m, map(), rz_io_t::map_skyline, maps(), rz_debug_t::maps, mask, maskMatches(), NULL, rz_core_t::offset, rz_io_map_t::perm, prefix, RZ_ANALYSIS_FCN_TYPE_FCN, RZ_ANALYSIS_FCN_TYPE_SYM, rz_analysis_function_size_from_entry(), rz_analysis_get_fcn_in(), RZ_BETWEEN, rz_bin_cur_object(), rz_config_get(), rz_config_get_b(), rz_config_get_i(), rz_debug_map_sync(), rz_io_fd_size(), rz_io_map_get(), rz_io_maps(), rz_io_size(), rz_itv_begin(), rz_itv_end(), rz_itv_size(), rz_list_append(), rz_list_newf(), RZ_MAX, RZ_MIN, RZ_NEW0, RZ_PERM_W, RZ_PERM_X, rz_pvector_at(), rz_pvector_foreach, rz_pvector_len(), rz_return_val_if_fail, rz_str_rwx(), rz_str_startswith(), rz_vector_index_ptr(), rz_vector_len(), s, rz_bin_object_t::sections, rz_analysis_bb_t::size, rz_interval_t::size, snprintf, rz_core_t::tmpseek, to, rz_skyline_item_t::user, ut64(), UT64_MAX, rz_skyline_t::v, and rz_io_t::va.
Referenced by __core_cmd_search_asm_infinite(), cmd_print_bars(), cmd_print_blocks(), do_debug_trace_calls(), rz_analyze_all_consecutive_functions_in_section_handler(), rz_cmd_help(), rz_cmd_search(), rz_core_analysis_calls(), rz_core_analysis_esil_default(), rz_core_analysis_refs(), rz_core_analysis_value_pointers(), and rz_core_search_preludes().
RZ_API int rz_core_search_prelude | ( | RzCore * | core, |
ut64 | from, | ||
ut64 | to, | ||
const ut8 * | buf, | ||
int | blen, | ||
const ut8 * | mask, | ||
int | mlen | ||
) |
Definition at line 292 of file cmd_search.c.
References __prelude_cb_hit(), b, rz_core_t::blocksize, eprintf, free(), from, rz_core_t::io, malloc(), mask, NULL, PFMT64x, preludecnt, rz_cons_is_breaked(), rz_io_is_valid_offset(), rz_io_read_at(), rz_search_begin(), RZ_SEARCH_KEYWORD, rz_search_keyword_new(), rz_search_kw_add(), rz_search_kw_reset(), rz_search_reset(), rz_search_set_callback(), rz_search_update(), rz_core_t::search, to, and ut64().
Referenced by rz_core_search_preludes().
Definition at line 330 of file cmd_search.c.
References rz_core_t::analysis, rz_search_keyword_t::bin_binmask, rz_search_keyword_t::bin_keyword, rz_search_keyword_t::binmask_length, rz_core_t::config, free(), from, rz_search_keyword_t::keyword_length, list(), malloc(), NULL, p, rz_analysis_preludes(), rz_config_get(), rz_core_get_boundaries_prot(), rz_core_search_prelude(), rz_hex_str2bin(), rz_itv_end(), rz_list_free(), RZ_LOG_ERROR, RZ_PERM_X, RZ_STR_ISNOTEMPTY, to, ut64(), and UT64_MAX.
Referenced by rz_analyze_all_preludes_handler(), and rz_core_analysis_everything().
|
static |
Definition at line 1283 of file cmd_search.c.
References addr, rz_interval_t::addr, rz_search_t::align, rz_core_t::analysis, arch, search_parameters::boundaries, calloc(), rz_core_t::config, construct_rop_gadget(), search_parameters::core, rz_list_iter_t::data, rz_analysis_op_t::delay, endlist_pair::delay_size, delta, test_evm::end, eprintf, free(), from, rz_list_t::head, hit(), i, endlist_pair::instr_offset, rz_core_t::io, is_end_gadget(), map(), max_count, rz_list_iter_t::n, NULL, search_parameters::outmode, PFMT32d, PFMT64x, search_parameters::pj, pj_a(), pj_end(), print_rop(), rz_core_t::rasm, rz_analysis_op(), rz_analysis_op_fini(), RZ_ANALYSIS_OP_MASK_BASIC, rz_asm_disassemble(), rz_asm_set_pc(), rz_config_get(), rz_config_get_i(), rz_cons_break_pop(), rz_cons_break_push(), rz_cons_is_breaked(), RZ_EMPTY, rz_io_read_at(), rz_itv_end(), rz_itv_intersect(), rz_itv_overlap(), rz_list_append(), rz_list_free(), rz_list_get_n(), rz_list_length(), rz_list_newf(), rz_list_pop(), rz_list_reverse(), RZ_MIN, RZ_MODE_JSON, RZ_NEW0, rz_str_newf(), rz_str_replace(), rz_core_t::sdb, sdb_concat(), sdb_ns(), rz_core_t::search, search(), strdup(), to, and ut64().
Referenced by rz_cmd_search().
|
static |
Definition at line 2740 of file cmd_search.c.
References rz_core_t::block, rz_core_t::blocksize, calloc(), search_parameters::core, crc32(), eprintf, free(), rz_core_t::hash, i, incAlphaBuffer(), incBuffer(), incDigitBuffer(), incLowerBuffer(), incPrintBuffer(), incUpperBuffer(), memcpy(), NULL, rz_core_t::offset, PFMT64x, RZ_ALIGNED(), rz_cons_break_pop(), rz_cons_break_push(), rz_cons_flush(), rz_cons_is_breaked(), rz_core_print_hexdump(), RZ_FREE, rz_hash_plugin_by_name(), rz_time_now_mono(), and ut64().
Referenced by rz_cmd_search().
|
static |
Definition at line 176 of file cmd_search.c.
References blocks, rz_core_t::blocksize, search_parameters::boundaries, eprintf, fail, free(), from, rz_core_t::hash, i, int, rz_core_t::io, len, malloc(), map(), maxlen, NULL, PFMT64d, PFMT64x, rz_cons_break_pop(), rz_cons_break_push(), rz_cons_is_breaked(), rz_cons_printf(), rz_hash_cfg_calculate_small_block_string(), rz_io_read_at(), rz_itv_end(), s, st64, to, UT32_MAX, and ut64().
Referenced by rz_cmd_search().
|
static |
Definition at line 2555 of file cmd_search.c.
References search_parameters::boundaries, count, NULL, p, rz_cons_break_pop(), rz_cons_break_push(), rz_itv_end(), and search_similar_pattern_in().
Referenced by rz_cmd_search().
Definition at line 2529 of file cmd_search.c.
References addr, rz_core_t::block, rz_core_t::blocksize, calloc(), count, free(), from, rz_core_t::io, memcmpdiff(), pc, PFMT64x, rz_core_t::print, rz_cons_is_breaked(), rz_cons_printf(), rz_io_read_at(), rz_print_fill(), to, ut64(), UT64_MAX, and ut8.
Referenced by search_similar_pattern().
Definition at line 2608 of file cmd_search.c.
References calloc(), search_parameters::core, eprintf, free(), i, len, NULL, rz_core_t::num, rz_list_pop_head(), rz_num_math(), rz_write_le16(), rz_write_le32(), rz_write_le64(), rz_write_le8(), and ut64().
Referenced by rz_cmd_search().
|
static |
Definition at line 520 of file cmd_search.c.
Referenced by print_search_progress(), and rz_cmd_search().
|
static |
Definition at line 19 of file cmd_search.c.
Referenced by do_esil_search().
|
static |
Definition at line 35 of file cmd_search.c.
Referenced by rz_cmd_search().
|
static |
Definition at line 86 of file cmd_search.c.
Referenced by do_analysis_search(), and rz_cmd_search().
|
static |
Definition at line 107 of file cmd_search.c.
Referenced by rz_cmd_search().
|
static |
Definition at line 28 of file cmd_search.c.
Referenced by rz_cmd_search().
|
static |
Definition at line 116 of file cmd_search.c.
Referenced by rz_cmd_search().
|
static |
Definition at line 127 of file cmd_search.c.
Referenced by rz_cmd_search().
|
static |
Definition at line 139 of file cmd_search.c.
Referenced by rz_cmd_search().
|
static |
Definition at line 147 of file cmd_search.c.
Referenced by rz_cmd_search().
|
static |
Definition at line 154 of file cmd_search.c.
Referenced by __prelude_cb_hit(), and rz_core_search_prelude().
|
static |
Definition at line 155 of file cmd_search.c.
Referenced by _cb_hit(), do_analysis_search(), do_asm_search(), do_string_search(), do_syscall_search(), and rz_cmd_search().
Definition at line 157 of file cmd_search.c.
Referenced by _cb_hit(), do_analysis_search(), do_asm_search(), do_syscall_search(), rz_cmd_search(), and rz_core_magic_at().
|
static |
Definition at line 156 of file cmd_search.c.
Referenced by _cb_hit(), and rz_cmd_search().