Rizin
unix-like reverse engineering framework and cli tools
|
#include <rz_types.h>
#include <rz_lib.h>
#include <rz_demangler.h>
#include <rz_cmd.h>
#include <rz_core.h>
#include <rz_cons.h>
#include <string.h>
#include <rz_analysis.h>
#include "../format/dex/dex.h"
Go to the source code of this file.
Macros | |
#define | name_args(name) (cmd_##name##_args) |
#define | name_help(name) (cmd_##name##_help) |
#define | name_handler(name) (rz_cmd_##name##_handler) |
#define | static_description_without_args(command, summ) |
#define | rz_cmd_desc_argv_modes_new_warn(rcmd, root, cmd, flags) rz_warn_if_fail(rz_cmd_desc_argv_state_new(rcmd, root, #cmd, flags, name_handler(cmd), &name_help(cmd))) |
Functions | |
static RzBinDex * | core_dex_get_class (RzCore *core) |
static char * | decode_access_flags (ut32 access_flags) |
static void | dex_print_encoded_field (RzBinDex *dex, ut32 index, DexEncodedField *encoded_field) |
static void | dex_print_encoded_method (RzBinDex *dex, ut32 index, DexEncodedMethod *encoded_method) |
static void | dex_print_class_def (RzBinDex *dex, ut32 index, DexClassDef *class_def) |
RZ_IPI RzCmdStatus | rz_cmd_dexs_handler (RzCore *core, int argc, const char **argv, RzCmdStateOutput *state) |
static void | dex_print_class_def_exports (RzBinDex *dex, ut32 index, DexClassDef *class_def) |
RZ_IPI RzCmdStatus | rz_cmd_dexe_handler (RzCore *core, int argc, const char **argv, RzCmdStateOutput *state) |
static_description_without_args (dexs, "prints the dex structure") | |
static_description_without_args (dexe, "prints the dex exported methods") | |
static bool | rz_cmd_dex_init_handler (RzCore *core) |
Variables | |
static const RzCmdDescHelp | dex_usage |
RzCorePlugin | rz_core_plugin_dex |
RZ_API RzLibStruct | rizin_plugin |
Definition at line 15 of file core_dex.c.
Definition at line 17 of file core_dex.c.
Definition at line 16 of file core_dex.c.
#define rz_cmd_desc_argv_modes_new_warn | ( | rcmd, | |
root, | |||
cmd, | |||
flags | |||
) | rz_warn_if_fail(rz_cmd_desc_argv_state_new(rcmd, root, #cmd, flags, name_handler(cmd), &name_help(cmd))) |
Definition at line 26 of file core_dex.c.
#define static_description_without_args | ( | command, | |
summ | |||
) |
Definition at line 18 of file core_dex.c.
Definition at line 29 of file core_dex.c.
References rz_core_t::analysis, b, rz_bin_bind_t::bin, rz_analysis_t::binb, rz_bin_plugin_t::name, and NULL.
Referenced by rz_cmd_dexe_handler(), and rz_cmd_dexs_handler().
|
static |
Definition at line 45 of file core_dex.c.
References i, rz_bin_dex_access_flags_readable(), cmd_descs_generate::str, strdup(), and toupper.
Referenced by dex_print_class_def(), dex_print_class_def_exports(), dex_print_encoded_field(), and dex_print_encoded_method().
|
static |
Definition at line 100 of file core_dex.c.
References dex_class_def_t::access_flags, dex_class_def_t::annotations_offset, dex_class_def_t::class_data_offset, dex_class_def_t::class_idx, decode_access_flags(), dex_print_encoded_field(), dex_print_encoded_method(), dex_class_def_t::direct_methods, free(), dex_class_def_t::instance_fields, dex_class_def_t::interfaces, dex_class_def_t::interfaces_offset, dex_class_def_t::n_interfaces, dex_class_def_t::offset, PFMT64x, rz_bin_dex_resolve_type_id_by_idx(), rz_cons_printf(), rz_list_length(), dex_class_def_t::source_file_idx, dex_class_def_t::static_fields, dex_class_def_t::static_values_offset, dex_class_def_t::superclass_idx, autogen_x86imm::tmp, and dex_class_def_t::virtual_methods.
Referenced by rz_cmd_dexs_handler().
|
static |
Definition at line 211 of file core_dex.c.
References ACCESS_FLAG_PROTECTED, ACCESS_FLAG_PUBLIC, dex_encoded_field_t::access_flags, dex_encoded_method_t::access_flags, dex_class_def_t::access_flags, dex_class_def_t::class_idx, decode_access_flags(), dex_print_encoded_field(), dex_print_encoded_method(), dex_class_def_t::direct_methods, free(), dex_class_def_t::instance_fields, dex_class_def_t::interfaces, dex_class_def_t::n_interfaces, rz_bin_dex_resolve_type_id_by_idx(), rz_cons_printf(), dex_class_def_t::static_fields, dex_class_def_t::superclass_idx, autogen_x86imm::tmp, and dex_class_def_t::virtual_methods.
Referenced by rz_cmd_dexe_handler().
|
static |
Definition at line 56 of file core_dex.c.
References dex_encoded_field_t::access_flags, decode_access_flags(), field_id, dex_t::field_ids, dex_t::field_ids_size, dex_encoded_field_t::field_idx, free(), PFMT64u, PFMT64x, rz_bin_dex_resolve_string_by_idx(), rz_bin_dex_resolve_type_id_by_idx(), rz_cons_printf(), rz_pvector_at(), and autogen_x86imm::tmp.
Referenced by dex_print_class_def(), and dex_print_class_def_exports().
|
static |
Definition at line 77 of file core_dex.c.
References dex_encoded_method_t::access_flags, dex_method_id_t::class_idx, dex_encoded_method_t::code_offset, decode_access_flags(), free(), dex_t::method_ids, dex_t::method_ids_size, dex_encoded_method_t::method_idx, dex_method_id_t::name_idx, PFMT64u, PFMT64x, dex_method_id_t::proto_idx, rz_bin_dex_resolve_proto_by_idx(), rz_bin_dex_resolve_string_by_idx(), rz_bin_dex_resolve_type_id_by_idx(), rz_cons_printf(), RZ_DEX_RELOC_ADDRESS, rz_pvector_at(), and autogen_x86imm::tmp.
Referenced by dex_print_class_def(), and dex_print_class_def_exports().
Definition at line 293 of file core_dex.c.
References dex_usage, NULL, rz_core_t::rcmd, cmd_descs_generate::root_cd, rz_cmd_desc_argv_modes_new_warn, rz_cmd_desc_group_new(), rz_cmd_get_root(), RZ_OUTPUT_MODE_STANDARD, and rz_warn_if_reached.
RZ_IPI RzCmdStatus rz_cmd_dexe_handler | ( | RzCore * | core, |
int | argc, | ||
const char ** | argv, | ||
RzCmdStateOutput * | state | ||
) |
Definition at line 266 of file core_dex.c.
References ACCESS_FLAG_PUBLIC, dex_class_def_t::access_flags, dex_t::class_defs, core_dex_get_class(), dex_print_class_def_exports(), i, RZ_CMD_STATUS_ERROR, RZ_CMD_STATUS_OK, RZ_CMD_STATUS_WRONG_ARGS, rz_pvector_at(), and rz_pvector_len().
RZ_IPI RzCmdStatus rz_cmd_dexs_handler | ( | RzCore * | core, |
int | argc, | ||
const char ** | argv, | ||
RzCmdStateOutput * | state | ||
) |
Definition at line 166 of file core_dex.c.
References dex_t::checksum, dex_t::class_defs, dex_t::class_defs_offset, dex_t::class_defs_size, core_dex_get_class(), dex_t::data_offset, dex_t::data_size, dex_print_class_def(), dex_t::field_ids_offset, dex_t::field_ids_size, dex_t::file_size, free(), dex_t::header_size, i, dex_t::link_offset, dex_t::link_size, dex_t::method_ids_offset, dex_t::method_ids_size, NULL, dex_t::proto_ids_offset, dex_t::proto_ids_size, rz_bin_dex_version(), RZ_CMD_STATUS_ERROR, RZ_CMD_STATUS_OK, RZ_CMD_STATUS_WRONG_ARGS, rz_cons_printf(), rz_pvector_at(), rz_pvector_len(), dex_t::signature, dex_t::string_ids_offset, dex_t::string_ids_size, autogen_x86imm::tmp, dex_t::type_ids_offset, and dex_t::type_ids_size.
static_description_without_args | ( | dexe | , |
"prints the dex exported methods" | |||
) |
static_description_without_args | ( | dexs | , |
"prints the dex structure" | |||
) |
|
static |
Definition at line 286 of file core_dex.c.
Referenced by rz_cmd_dex_init_handler().
RZ_API RzLibStruct rizin_plugin |
Definition at line 322 of file core_dex.c.
RzCorePlugin rz_core_plugin_dex |
Definition at line 312 of file core_dex.c.