Rizin
unix-like reverse engineering framework and cli tools
|
Go to the source code of this file.
Macros | |
#define | if_true_return(cond, ret) |
#define if_true_return | ( | cond, | |
ret | |||
) |
|
static |
Definition at line 775 of file marshal.c.
References pyc_object::data, dst, free(), memcpy(), NULL, RZ_FREE, rz_list_clone(), RZ_LOG_ERROR, RZ_NEW0, src, strdup(), pyc_object::type, TYPE_ASCII, TYPE_ASCII_INTERNED, TYPE_BINARY_COMPLEX, TYPE_BINARY_FLOAT, TYPE_CODE_v0, TYPE_CODE_v1, TYPE_COMPLEX, TYPE_DICT, TYPE_ELLIPSIS, TYPE_FALSE, TYPE_FLOAT, TYPE_FROZENSET, TYPE_INT, TYPE_INT64, TYPE_INTERNED, TYPE_LIST, TYPE_LONG, TYPE_NONE, TYPE_NULL, TYPE_REF, TYPE_SET, TYPE_SHORT_ASCII, TYPE_SHORT_ASCII_INTERNED, TYPE_SMALL_TUPLE, TYPE_STOPITER, TYPE_STRING, TYPE_STRINGREF, TYPE_TRUE, TYPE_TUPLE, TYPE_UNICODE, and TYPE_UNKNOWN.
Referenced by get_object(), and get_ref_object().
|
static |
Definition at line 1125 of file marshal.c.
References pyc_code_object::consts, pyc_object::data, pyc_code_object::end_offset, fail, free(), i, if_true_return, pyc_code_object::name, rz_bin_symbol_t::name, NULL, rz_bin_symbol_t::ordinal, rz_bin_symbol_t::paddr, prefix, RZ_BIN_TYPE_FUNC_STR, rz_list_append(), RZ_NEW0, rz_str_newf(), sections(), section::size, rz_bin_symbol_t::size, pyc_code_object::start_offset, strdup(), symbols(), pyc_context::symbols_ordinal, pyc_object::type, rz_bin_symbol_t::type, TYPE_ASCII, TYPE_CODE_v0, TYPE_CODE_v1, TYPE_INTERNED, TYPE_SMALL_TUPLE, TYPE_STRING, TYPE_TUPLE, and rz_bin_symbol_t::vaddr.
Referenced by get_sections_symbols_from_code_objects().
|
static |
Definition at line 712 of file marshal.c.
References pyc_code_object::cellvars, pyc_code_object::code, pyc_code_object::consts, pyc_object::data, pyc_code_object::filename, free(), pyc_code_object::freevars, pyc_code_object::lnotab, pyc_code_object::name, pyc_code_object::names, rz_list_free(), RZ_LOG_ERROR, pyc_object::type, TYPE_ASCII, TYPE_ASCII_INTERNED, TYPE_BINARY_COMPLEX, TYPE_BINARY_FLOAT, TYPE_CODE_v0, TYPE_CODE_v1, TYPE_COMPLEX, TYPE_DICT, TYPE_ELLIPSIS, TYPE_FALSE, TYPE_FLOAT, TYPE_FROZENSET, TYPE_INT, TYPE_INT64, TYPE_INTERNED, TYPE_LIST, TYPE_LONG, TYPE_NONE, TYPE_NULL, TYPE_REF, TYPE_SET, TYPE_SHORT_ASCII, TYPE_SHORT_ASCII_INTERNED, TYPE_SMALL_TUPLE, TYPE_STOPITER, TYPE_STRING, TYPE_STRINGREF, TYPE_TRUE, TYPE_TUPLE, TYPE_UNICODE, TYPE_UNKNOWN, and pyc_code_object::varnames.
Referenced by get_array_object_generic(), get_code_object(), get_code_object_addr(), get_dict_object(), get_object(), and get_sections_symbols_from_code_objects().
|
static |
Definition at line 479 of file marshal.c.
References pyc_object::data, free(), free_object(), get_object(), i, NULL, RZ_FREE, rz_list_append(), rz_list_free(), rz_list_newf(), RZ_NEW0, and autogen_x86imm::tmp.
Referenced by get_list_object(), get_set_object(), get_small_tuple_object(), and get_tuple_object().
|
static |
Definition at line 658 of file marshal.c.
References error(), get_ascii_object_generic(), get_ut32(), n, and NULL.
Referenced by get_object().
|
static |
Definition at line 647 of file marshal.c.
References error(), get_ascii_object_generic(), get_ut32(), n, and NULL.
Referenced by get_object().
|
static |
Definition at line 632 of file marshal.c.
References pyc_object::data, get_bytes(), NULL, RZ_FREE, RZ_NEW0, pyc_object::type, and TYPE_ASCII.
Referenced by get_ascii_interned_object(), get_ascii_object(), get_short_ascii_interned_object(), and get_short_ascii_object().
|
static |
Definition at line 379 of file marshal.c.
References a, b, pyc_object::data, error(), get_float64(), NULL, RZ_FREE, RZ_NEW0, rz_str_newf(), pyc_object::type, and TYPE_BINARY_COMPLEX.
Referenced by get_object().
|
static |
Definition at line 291 of file marshal.c.
References pyc_object::data, error(), f, get_float64(), NULL, RZ_FREE, RZ_NEW0, rz_str_newf(), pyc_object::type, and TYPE_FLOAT.
Referenced by get_object().
Definition at line 71 of file marshal.c.
References free(), NULL, rz_buf_read(), and RZ_NEWS0.
Referenced by get_ascii_object_generic(), get_interned_object(), get_string_object(), and get_unicode_object().
|
static |
Definition at line 850 of file marshal.c.
References pyc_code_object::argcount, pyc_code_object::cellvars, pyc_code_object::code, pyc_code_object::consts, pyc_object::data, pyc_code_object::end_offset, error(), pyc_code_object::filename, pyc_code_object::firstlineno, pyc_code_object::flags, free(), free_object(), pyc_code_object::freevars, get_object(), get_ut16(), get_ut32(), pyc_code_object::kwonlyargcount, pyc_code_object::lnotab, pyc_context::magic_int, magic_int_within(), pyc_code_object::name, pyc_code_object::names, pyc_code_object::nlocals, NULL, pyc_code_object::posonlyargcount, pyc_context::refs, rz_buf_tell(), RZ_FREE, RZ_NEW0, pyc_code_object::stacksize, pyc_code_object::start_offset, and pyc_code_object::varnames.
Referenced by get_code_object_addr(), and get_object().
ut64 get_code_object_addr | ( | RzBinPycObj * | pyc, |
RzBuffer * | buffer, | ||
ut32 | magic | ||
) |
Definition at line 981 of file marshal.c.
References pyc_object::data, free_object(), get_code_object(), pyc_context::magic_int, pyc_code_object::start_offset, and ut64().
Referenced by get_entrypoint().
|
static |
Definition at line 313 of file marshal.c.
References pyc_object::data, error(), free(), get_st32(), get_ut8(), pyc_context::magic_int, malloc(), NULL, rz_buf_read(), RZ_FREE, RZ_NEW0, rz_str_newf(), s1, s2, pyc_object::type, and TYPE_COMPLEX.
Referenced by get_object().
|
static |
Definition at line 571 of file marshal.c.
References pyc_object::data, free_object(), get_object(), key, NULL, RZ_FREE, rz_list_append(), rz_list_free(), rz_list_newf(), RZ_NEW0, pyc_object::type, TYPE_DICT, and val.
Referenced by get_object().
|
static |
Definition at line 98 of file marshal.c.
References pyc_object::data, NULL, RZ_FREE, RZ_NEW0, strdup(), pyc_object::type, and TYPE_FALSE.
Referenced by get_object().
Definition at line 63 of file marshal.c.
References error(), rz_buf_read_le64, and ut64().
Referenced by get_binary_complex_object(), and get_binary_float_object().
|
static |
Definition at line 259 of file marshal.c.
References pyc_object::data, error(), free(), get_ut8(), malloc(), n, NULL, rz_buf_read(), RZ_FREE, RZ_NEW0, s, pyc_object::type, and TYPE_FLOAT.
Referenced by get_object().
|
static |
Definition at line 144 of file marshal.c.
References pyc_object::data, error(), get_st64(), i, NULL, RZ_FREE, RZ_NEW0, rz_str_newf(), st64, pyc_object::type, and TYPE_INT64.
Referenced by get_object().
|
static |
Definition at line 124 of file marshal.c.
References pyc_object::data, error(), get_st32(), i, NULL, RZ_FREE, RZ_NEW0, rz_str_newf(), st32, pyc_object::type, and TYPE_INT.
Referenced by get_object().
|
static |
Definition at line 452 of file marshal.c.
References pyc_object::data, error(), get_bytes(), get_ut32(), pyc_context::interned_table, n, NULL, RZ_FREE, rz_list_append(), RZ_LOG_ERROR, RZ_NEW0, ST32_MAX, pyc_object::type, and TYPE_INTERNED.
Referenced by get_object().
|
static |
Definition at line 550 of file marshal.c.
References error(), get_array_object_generic(), get_ut32(), n, NULL, RZ_LOG_ERROR, ST32_MAX, pyc_object::type, and TYPE_LIST.
Referenced by get_object().
|
static |
Definition at line 167 of file marshal.c.
References pyc_object::data, error(), free(), get_st32(), get_ut16(), i, malloc(), memset(), n, neg(), NULL, RZ_NEW0, rz_str_trim(), st32, strdup(), autogen_x86imm::tmp, pyc_object::type, and TYPE_LONG.
Referenced by get_object().
|
static |
Definition at line 83 of file marshal.c.
References pyc_object::data, NULL, RZ_FREE, RZ_NEW0, strdup(), pyc_object::type, and TYPE_NONE.
Referenced by get_object().
|
static |
Definition at line 996 of file marshal.c.
References copy_object(), rz_list_iter_t::data, error(), FLAG_REF, free_object(), get_ascii_interned_object(), get_ascii_object(), get_binary_complex_object(), get_binary_float_object(), get_code_object(), get_complex_object(), get_dict_object(), get_false_object(), get_float_object(), get_int64_object(), get_int_object(), get_interned_object(), get_list_object(), get_long_object(), get_none_object(), get_ref_object(), get_set_object(), get_short_ascii_interned_object(), get_short_ascii_object(), get_small_tuple_object(), get_string_object(), get_stringref_object(), get_true_object(), get_tuple_object(), get_unicode_object(), get_ut8(), NULL, pyc_context::refs, rz_list_append(), RZ_LOG_ERROR, RZ_NEW0, type, pyc_object::type, TYPE_ASCII, TYPE_ASCII_INTERNED, TYPE_BINARY_COMPLEX, TYPE_BINARY_FLOAT, TYPE_CODE_v0, TYPE_CODE_v1, TYPE_COMPLEX, TYPE_DICT, TYPE_ELLIPSIS, TYPE_FALSE, TYPE_FLOAT, TYPE_FROZENSET, TYPE_INT, TYPE_INT64, TYPE_INTERNED, TYPE_LIST, TYPE_LONG, TYPE_NONE, TYPE_NULL, TYPE_REF, TYPE_SET, TYPE_SHORT_ASCII, TYPE_SHORT_ASCII_INTERNED, TYPE_SMALL_TUPLE, TYPE_STOPITER, TYPE_STRING, TYPE_STRINGREF, TYPE_TRUE, TYPE_TUPLE, TYPE_UNICODE, and TYPE_UNKNOWN.
Referenced by get_array_object_generic(), get_code_object(), get_dict_object(), and get_sections_symbols_from_code_objects().
|
static |
Definition at line 691 of file marshal.c.
References copy_object(), error(), get_ut32(), NULL, pyc_context::refs, rz_list_get_n(), and rz_list_length().
Referenced by get_object().
bool get_sections_symbols_from_code_objects | ( | RzBinPycObj * | pyc, |
RzBuffer * | buffer, | ||
RzList * | sections, | ||
RzList * | symbols, | ||
RzList * | cobjs, | ||
ut32 | magic | ||
) |
Definition at line 1190 of file marshal.c.
References extract_sections_symbols(), free_object(), get_object(), pyc_context::magic_int, NULL, pyc_context::refs, rz_list_free(), rz_list_newf(), sections(), and symbols().
Referenced by pyc_get_sections_symbols().
|
static |
Definition at line 611 of file marshal.c.
References error(), get_array_object_generic(), get_ut32(), n, NULL, RZ_LOG_ERROR, ST32_MAX, pyc_object::type, and TYPE_SET.
Referenced by get_object().
|
static |
Definition at line 680 of file marshal.c.
References error(), get_ascii_object_generic(), get_ut8(), n, and NULL.
Referenced by get_object().
|
static |
Definition at line 669 of file marshal.c.
References error(), get_ascii_object_generic(), get_ut8(), n, and NULL.
Referenced by get_object().
|
static |
Definition at line 512 of file marshal.c.
References error(), get_array_object_generic(), get_ut8(), n, NULL, pyc_object::type, and TYPE_SMALL_TUPLE.
Referenced by get_object().
Definition at line 47 of file marshal.c.
References error(), rz_buf_read_le32, and st32.
Referenced by get_complex_object(), get_int_object(), get_long_object(), and get_stringref_object().
Definition at line 55 of file marshal.c.
References error(), rz_buf_read_le64, st64, and ut64().
Referenced by get_int64_object().
|
static |
Definition at line 403 of file marshal.c.
References pyc_object::data, error(), get_bytes(), get_ut32(), n, NULL, RZ_FREE, RZ_LOG_ERROR, RZ_NEW0, ST32_MAX, pyc_object::type, and TYPE_STRING.
Referenced by get_object().
|
static |
Definition at line 234 of file marshal.c.
References pyc_object::data, error(), get_st32(), pyc_context::interned_table, n, NULL, RZ_FREE, rz_list_get_n(), rz_list_length(), RZ_LOG_ERROR, RZ_NEW0, pyc_object::type, and TYPE_STRINGREF.
Referenced by get_object().
|
static |
Definition at line 111 of file marshal.c.
References pyc_object::data, NULL, RZ_FREE, RZ_NEW0, strdup(), pyc_object::type, and TYPE_TRUE.
Referenced by get_object().
|
static |
Definition at line 529 of file marshal.c.
References error(), get_array_object_generic(), get_ut32(), n, NULL, RZ_LOG_ERROR, ST32_MAX, pyc_object::type, and TYPE_TUPLE.
Referenced by get_object().
|
static |
Definition at line 429 of file marshal.c.
References pyc_object::data, error(), get_bytes(), get_ut32(), n, NULL, RZ_FREE, RZ_LOG_ERROR, RZ_NEW0, ST32_MAX, pyc_object::type, and TYPE_UNICODE.
Referenced by get_object().
Definition at line 30 of file marshal.c.
References error(), and rz_buf_read_le16.
Referenced by get_code_object(), and get_long_object().
Definition at line 39 of file marshal.c.
References error(), and rz_buf_read_le32.
Referenced by get_ascii_interned_object(), get_ascii_object(), get_code_object(), get_interned_object(), get_list_object(), get_ref_object(), get_set_object(), get_string_object(), get_tuple_object(), and get_unicode_object().
Definition at line 21 of file marshal.c.
References error(), and rz_buf_read().
Referenced by get_complex_object(), get_float_object(), get_object(), get_short_ascii_interned_object(), get_short_ascii_object(), and get_small_tuple_object().