Rizin
unix-like reverse engineering framework and cli tools
|
Go to the source code of this file.
Classes | |
struct | rz_main_t |
Macros | |
#define | MAIN_NAME main |
#define | ARGV_TYPE char |
#define | ARGV_TYPE_TO_UTF8(argc, argv) (char **)argv |
#define | FREE_UTF8_ARGV(argc, utf8_argv) |
Typedefs | |
typedef struct rz_main_t | RzMain |
typedef int(* | RzMainCallback) (int argc, const char **argv) |
Functions | |
RZ_LIB_VERSION_HEADER (rz_main) | |
RZ_API RzMain * | rz_main_new (const char *name) |
RZ_API void | rz_main_free (RzMain *m) |
RZ_API int | rz_main_run (RzMain *m, int argc, const char **argv) |
RZ_API int | rz_main_version_print (const char *program) |
RZ_API int | rz_main_rz_ax (int argc, const char **argv) |
RZ_API int | rz_main_rz_run (int argc, const char **argv) |
RZ_API int | rz_main_rz_hash (int argc, const char **argv) |
RZ_API int | rz_main_rz_bin (int argc, const char **argv) |
RZ_API int | rz_main_rizin (int argc, const char **argv) |
RZ_API int | rz_main_rz_asm (int argc, const char **argv) |
RZ_API int | rz_main_rz_agent (int argc, const char **argv) |
RZ_API int | rz_main_rz_find (int argc, const char **argv) |
RZ_API int | rz_main_rz_diff (int argc, const char **argv) |
RZ_API int | rz_main_rz_gg (int argc, const char **argv) |
RZ_API int | rz_main_rz_sign (int argc, const char **argv) |
RZ_LIB_VERSION_HEADER | ( | rz_main | ) |
Definition at line 24 of file main.c.
References foo, i, regress::m, rz_main_t::main, NULL, RZ_NEW0, and strdup().
Referenced by MAIN_NAME().
Definition at line 370 of file rizin.c.
References addr, rz_getopt_t::arg, rz_getopt_t::argv, argv, baddr(), rz_bin_info_t::bits, c, close, COLOR_MODE_DISABLED, compress(), debug, desc, dup2, env, eprintf, test-lz4-list::exit, f, fd, rz_io_desc_t::fd, fh, file, files, free(), get_file_in_cur_dir(), has_file_arg(), cmd_descs_generate::help, rz_getopt_t::ind, rz_bin_object_t::info, is_valid_dmp_file(), is_valid_gdb_file(), rz_io_plugin_t::isdbg, limit, LISTS_FREE, main_help(), main_print_var(), map(), maps(), msg, mustSaveHistory(), rz_io_desc_t::name, rz_io_plugin_t::name, NULL, rz_bin_file_t::o, O_RDWR, rz_flag_item_t::offset, rz_getopt_t::opt, p, path, rz_io_desc_t::perm, PFMT64x, rz_io_desc_t::plugin, printf(), r, rz_bin_object_t::regstate, run_commands(), rz_bin_cur(), rz_bin_cur_object(), rz_bin_file_compute_hashes(), rz_bin_file_set_hashes(), rz_bin_force_plugin(), rz_bin_get_sections(), rz_bin_open_io(), rz_cmd_state_output_fini(), rz_cmd_state_output_init(), rz_cmd_state_output_print(), rz_config_eval(), rz_config_get(), rz_config_get_b(), rz_config_get_i(), rz_config_set(), rz_config_set_i(), rz_cons_flush(), rz_cons_free(), rz_cons_is_interactive(), rz_cons_isatty(), rz_cons_new(), rz_cons_reset(), rz_cons_set_raw(), rz_cons_yesno(), rz_cons_zero(), rz_core_bin_apply_all_info(), rz_core_bin_load(), rz_core_bin_load_structs(), rz_core_bin_options_init(), rz_core_block_read(), rz_core_block_size(), rz_core_cmd0(), rz_core_cmd_file(), rz_core_cmdf(), rz_core_debug_map_update_flags(), rz_core_debug_plugins_print(), rz_core_file_open(), rz_core_fortune_print_random(), rz_core_free(), rz_core_io_plugins_print(), rz_core_loadlibs(), rz_core_new(), rz_core_parse_rizinrc(), rz_core_project_load_for_cli(), rz_core_prompt_loop(), rz_core_run_script(), rz_core_seek(), rz_core_setup_debugger(), rz_core_task_break_all(), rz_core_task_join(), rz_core_task_running_tasks_count(), rz_core_task_sync_begin(), rz_core_task_sync_end(), rz_debug_can_kill(), rz_debug_detach(), rz_debug_get_baddr(), rz_debug_kill(), rz_debug_use(), rz_file_abspath(), rz_file_dump(), rz_file_exists(), rz_file_is_directory(), rz_file_path(), rz_file_slurp(), rz_file_temp(), rz_flag_get(), RZ_FREE, rz_getopt_init(), rz_getopt_next(), rz_io_desc_get(), rz_io_desc_size(), rz_io_fd_get_current(), rz_io_fd_size(), rz_io_map_new(), rz_io_maps(), rz_io_write_at(), rz_lib_open(), rz_line_hist_save(), rz_list_append(), rz_list_free(), rz_list_new(), RZ_LOG_ERROR, rz_main_rizin(), rz_main_rz_asm(), rz_main_rz_ax(), rz_main_rz_bin(), rz_main_rz_diff(), rz_main_rz_find(), rz_main_rz_gg(), rz_main_version_print(), rz_main_version_verify(), RZ_MIN, rz_num_math(), RZ_OUTPUT_MODE_QUIET, RZ_OUTPUT_MODE_STANDARD, rz_path_home_history(), rz_path_system_rc(), RZ_PERM_CREAT, RZ_PERM_RWX, RZ_PERM_RX, RZ_PERM_W, RZ_PERM_X, rz_project_err_message(), RZ_PROJECT_ERR_SUCCESS, rz_project_save_file(), rz_pvector_foreach, rz_reg_get(), rz_reg_get_value(), RZ_REG_TYPE_ANY, rz_run_get_environ_profile(), rz_stdin_slurp(), rz_str_append(), rz_str_appendf(), rz_str_arg_escape(), RZ_STR_ISEMPTY, RZ_STR_ISNOTEMPTY, rz_str_newf(), rz_str_prepend(), rz_sys_chdir(), rz_sys_crash_handler(), RZ_SYS_DEVNULL, rz_sys_env_init(), rz_sys_get_environ(), rz_sys_getenv(), rz_sys_getenv_asbool(), rz_sys_sleep(), RZ_VERSION, rz_xfreopen, s, sections(), seek(), set_color_default(), SIGWINCH, src, strdup(), autogen_x86imm::tmp, rz_bin_info_t::type, UINT64_MAX, rz_io_desc_t::uri, ut64(), and UT64_MAX.
Referenced by MAIN_NAME(), and rz_main_rizin().
Definition at line 44 of file main.c.
References argv, regress::m, and rz_return_val_if_fail.
Referenced by MAIN_NAME().
Definition at line 61 of file rz-agent.c.
References rz_socket_http_options::accept_timeout, rz_getopt_t::arg, argv, rz_socket_http_options::authtokens, rz_cons_context_t::breaked, c, cmd, rz_cons_t::context, eprintf, free(), rz_socket_http_options::httpauth, rz_getopt_t::ind, rz_socket_t::local, malloc(), memset(), NULL, page_index, pid, rz_socket_t::port, printf(), rs, rz_cons_free(), rz_cons_new(), rz_cons_singleton(), rz_file_slurp(), rz_getopt_init(), rz_getopt_next(), rz_list_free(), rz_num_rand(), rz_socket_free(), rz_socket_http_accept(), rz_socket_http_close(), rz_socket_http_response(), rz_socket_listen(), rz_socket_new(), rz_str_escape(), rz_str_split_list(), rz_sys_cmdbg(), rz_sys_fork(), rz_sys_kill(), s, showversion(), SIGKILL, snprintf, sprintf, rz_socket_http_options::timeout, and usage().
Referenced by MAIN_NAME().
Referenced by rz_main_rizin().
Definition at line 721 of file rz-ax.c.
References argv, flags, free(), i, NULL, num, rax(), rz_num_free(), rz_num_new(), rz_str_unescape(), strdup(), use_stdin(), and ut64().
Referenced by MAIN_NAME(), and rz_main_rizin().
Definition at line 681 of file rz-bin.c.
References __lib_bin_cb(), __lib_bin_dt(), __lib_bin_xtr_cb(), __lib_bin_xtr_dt(), __lib_demangler_cb(), __lib_demangler_dt(), __listPlugins(), __sdb_prompt(), test-lz4-speed::action, actions2mask(), add_footer(), add_header(), addr, arch, rz_getopt_t::arg, argv, b, baddr(), rz_core_t::bin, bits(), c, classes_as_source_print(), rz_core_t::config, rz_cons_t::context, create(), end_state(), eprintf, err, SPDBOptions::extract, fd, fh, filter(), free(), rz_getopt_t::ind, rz_core_t::io, is_active, rz_cons_context_t::is_interactive, isBinopHelp(), ismodejson, list(), malloc(), mask, name, NULL, output, p, path, PFMT64d, PFMT64x, pj_a(), pj_end(), pj_free(), pj_new(), pj_string(), print_demangler_info(), print_string(), printf(), rabin_do_operation(), rabin_extract(), rabin_show_help(), rabin_show_srcline(), rad2outputmode(), run_action, rz_bin_arch_options_init(), rz_bin_create(), rz_bin_file_strings(), rz_bin_force_plugin(), rz_bin_load_filter(), rz_bin_open(), rz_bin_options_init(), rz_bin_pdb_download(), RZ_BIN_REQ_BASEFIND, RZ_BIN_REQ_CLASSES, RZ_BIN_REQ_CLASSES_SOURCES, RZ_BIN_REQ_CREATE, RZ_BIN_REQ_DLOPEN, RZ_BIN_REQ_DWARF, RZ_BIN_REQ_ENTRIES, RZ_BIN_REQ_EXPORTS, RZ_BIN_REQ_EXTRACT, RZ_BIN_REQ_FIELDS, RZ_BIN_REQ_HELP, RZ_BIN_REQ_IMPORTS, RZ_BIN_REQ_INFO, RZ_BIN_REQ_INITFINI, RZ_BIN_REQ_LIBS, RZ_BIN_REQ_LISTARCHS, RZ_BIN_REQ_LISTPLUGINS, RZ_BIN_REQ_MAIN, RZ_BIN_REQ_OPERATION, RZ_BIN_REQ_PDB, RZ_BIN_REQ_PDB_DWNLD, RZ_BIN_REQ_RELOCS, RZ_BIN_REQ_RESOURCES, RZ_BIN_REQ_SECTIONS, RZ_BIN_REQ_SECTIONS_MAPPING, RZ_BIN_REQ_SEGMENTS, RZ_BIN_REQ_SIGNATURE, RZ_BIN_REQ_SIZE, RZ_BIN_REQ_SRCLINE, RZ_BIN_REQ_STRINGS, RZ_BIN_REQ_SYMBOLS, RZ_BIN_REQ_TRYCATCH, RZ_BIN_REQ_UNK, RZ_BIN_REQ_VERSIONINFO, rz_bin_select(), rz_bin_set_baddr(), rz_buf_data(), rz_buf_free(), rz_cmd_state_output_fini(), rz_cmd_state_output_init(), rz_config_get(), rz_config_get_b(), rz_config_get_i(), rz_config_set(), rz_config_unserialize(), rz_cons_flush(), rz_cons_new(), rz_cons_printf(), rz_cons_println(), rz_core_bin_archs_print(), rz_core_bin_export_info(), rz_core_bin_print(), rz_core_bin_update_arch_bits(), rz_core_file_close(), rz_core_file_open(), rz_core_fini(), rz_core_init(), rz_demangler_plugin_demangle, rz_demangler_plugin_get(), rz_demangler_plugin_iterate(), rz_file_chmod(), rz_file_dump(), RZ_FREE, rz_getopt_init(), rz_getopt_next(), rz_hex_str2bin(), RZ_HOME_OLD_PLUGINS, rz_io_fd_get_current(), rz_lib_add_handler(), rz_lib_dl_close(), rz_lib_dl_open(), RZ_LIB_ENV, rz_lib_free(), rz_lib_new(), rz_lib_opendir(), RZ_LIB_TYPE_BIN, RZ_LIB_TYPE_BIN_XTR, RZ_LIB_TYPE_DEMANGLER, rz_list_free(), rz_main_version_print(), RZ_MODE_JSON, RZ_MODE_PRINT, RZ_MODE_RIZINCMD, RZ_MODE_SIMPLE, RZ_MODE_SIMPLEST, rz_num_math(), RZ_OUTPUT_MODE_JSON, RZ_OUTPUT_MODE_STANDARD, RZ_OUTPUT_MODE_TABLE, rz_path_home_prefix(), rz_path_system(), RZ_PERM_R, RZ_PLUGINS, RZ_STR_ISEMPTY, RZ_STR_ISNOTEMPTY, rz_str_split_duplist_n(), rz_sys_fork(), rz_sys_getenv(), rz_sys_setenv(), sdb_free(), sdb_new(), sdb_query(), set_action, start_state(), stdin_gets(), strdup(), SPDBOptions::symbol_server, SPDBOptions::symbol_store_path, autogen_x86imm::tmp, unset_action, ut64(), UT64_MAX, rz_io_t::va, and rz_bin_file_t::xtr_data.
Referenced by MAIN_NAME(), and rz_main_rizin().
Definition at line 2254 of file rz-diff.c.
References argv, DIFF_OPT_DISTANCE, DIFF_OPT_ERROR, DIFF_OPT_GRAPH, DIFF_OPT_HELP, DIFF_OPT_HEX_VISUAL, DIFF_OPT_UNIFIED, DIFF_OPT_USAGE, DIFF_OPT_VERSION, rz_diff_calculate_distance(), rz_diff_graphs_files(), rz_diff_hex_visual(), rz_diff_parse_arguments(), rz_diff_show_help(), rz_diff_unified_files(), rz_list_free(), and rz_main_version_print().
Referenced by MAIN_NAME(), and rz_main_rizin().
Definition at line 474 of file rz-find.c.
References RzfindOptions::align, rz_getopt_t::arg, argv, RzfindOptions::bsize, c, eprintf, free(), RzfindOptions::from, RzfindOptions::hexstr, RzfindOptions::identify, RzfindOptions::import, rz_getopt_t::ind, RzfindOptions::json, RzfindOptions::keywords, RzfindOptions::mask, RzfindOptions::mode, RzfindOptions::nonstop, NULL, RzfindOptions::pr, printf(), RzfindOptions::quiet, RzfindOptions::rad, rz_file_is_directory(), rz_file_slurp(), rz_getopt_init(), rz_getopt_next(), rz_hex_bin2strdup(), rz_list_append(), rz_list_free(), rz_main_version_print(), rz_num_math(), rz_print_new(), RZ_SEARCH_ESIL, RZ_SEARCH_KEYWORD, RZ_SEARCH_MAGIC, RZ_SEARCH_REGEXP, RZ_SEARCH_STRING, RZ_STR_ISEMPTY, RZ_STR_ISNOTEMPTY, rzfind_open(), rzfind_options_init(), show_help(), RzfindOptions::showstr, RzfindOptions::symbol, RzfindOptions::to, and RzfindOptions::widestr.
Referenced by MAIN_NAME(), and rz_main_rizin().
Definition at line 116 of file rz-gg.c.
References append, arch, rz_getopt_t::arg, argv, b, rz_egg_t::bin, bits(), bytes, c, close, create(), eprintf, fail, fd, free(), get_offset(), i, rz_getopt_t::ind, ISEXEC, len, list(), malloc(), n, NULL, off, ofile, openfile(), p, printf(), r, rz_buf_data(), rz_buf_new_with_bytes(), rz_buf_seek(), RZ_BUF_SET, rz_debruijn_offset(), rz_egg_assemble(), rz_egg_compile(), rz_egg_encode(), rz_egg_finalize(), rz_egg_free(), rz_egg_get_assembly(), rz_egg_get_bin(), rz_egg_lang_include_path(), rz_egg_load(), rz_egg_load_file(), rz_egg_new(), rz_egg_option_set(), RZ_EGG_OS_NAME, rz_egg_padding(), rz_egg_patch(), rz_egg_patch_num(), rz_egg_pattern(), rz_egg_raw(), rz_egg_run(), rz_egg_run_rop(), rz_egg_setup(), rz_egg_shellcode(), rz_file_slurp(), rz_getopt_init(), rz_getopt_next(), rz_hex_str2bin(), rz_lang_byte_array(), RZ_LANG_BYTE_ARRAY_C_CPP_BYTES, RZ_LANG_BYTE_ARRAY_JSON, RZ_LANG_BYTE_ARRAY_PYTHON, rz_main_version_print(), rz_num_math(), rz_str_append(), RZ_STR_ISEMPTY, RZ_SYS_ARCH, RZ_SYS_BITS, RZ_SYS_BITS_64, cmd_descs_generate::str, strdup(), autogen_x86imm::tmp, usage(), ut64(), and write.
Referenced by MAIN_NAME(), and rz_main_rizin().
Definition at line 1205 of file rz-hash.c.
References argv, calculate_decrypt(), calculate_encrypt(), calculate_hash(), calculate_luhn(), hash_context_fini(), hash_context_run(), hash_load_plugins(), hash_parse_cmdline(), rz_hash_new(), RZ_HASH_OP_DECRYPT, RZ_HASH_OP_ENCRYPT, RZ_HASH_OP_ERROR, RZ_HASH_OP_HASH, RZ_HASH_OP_HELP, RZ_HASH_OP_LIST_ALGO, RZ_HASH_OP_LUHN, RZ_HASH_OP_USAGE, RZ_HASH_OP_VERSION, rz_hash_show_algorithms(), rz_hash_show_help(), and rz_main_version_print().
Referenced by MAIN_NAME().
Definition at line 25 of file rz-run.c.
References argv, eprintf, free(), i, setup::line, NULL, p, printf(), rz_main_version_print(), rz_run_config_env(), rz_run_free(), rz_run_help(), rz_run_new(), rz_run_parseline(), rz_run_start(), and rz_str_newf().
Referenced by MAIN_NAME().
Definition at line 40 of file rz-sign.c.
References rz_getopt_t::arg, argv, c, COLOR_MODE_DISABLED, rz_core_t::config, free(), rz_getopt_t::ind, NULL, perform_analysis(), rz_config_eval(), rz_config_set_b(), rz_config_set_i(), rz_cons_flush(), rz_cons_printf(), rz_cons_reset(), rz_cons_set_interactive(), rz_core_bin_load(), rz_core_bin_update_arch_bits(), rz_core_file_open(), rz_core_flirt_convert_file(), rz_core_flirt_create_file(), rz_core_flirt_dump_file(), rz_core_free(), rz_core_loadlibs(), rz_core_new(), rz_getopt_init(), rz_getopt_next(), rz_list_append(), rz_list_free(), rz_list_newf(), RZ_LOG_ERROR, rz_main_version_print(), RZ_SIGN_OPT_CONVERT_FLIRT, RZ_SIGN_OPT_CREATE_FLIRT, RZ_SIGN_OPT_DUMP_FLIRT, RZ_SIGN_OPT_NONE, rz_sign_show_help(), rz_str_new(), and UT64_MAX.
Referenced by MAIN_NAME().
Definition at line 49 of file main.c.
References free(), printf(), progname, rz_str_version(), and s.
Referenced by rax(), rz_main_rizin(), rz_main_rz_asm(), rz_main_rz_bin(), rz_main_rz_diff(), rz_main_rz_find(), rz_main_rz_gg(), rz_main_rz_hash(), rz_main_rz_run(), rz_main_rz_sign(), and showversion().