Rizin
unix-like reverse engineering framework and cli tools
|
#include <rz_flirt.h>
Go to the source code of this file.
Classes | |
struct | sigdb_move_data_t |
Macros | |
#define | field_cmp(fname, cmpfunction) |
|
static |
Definition at line 250 of file sigdb.c.
References rz_sign_sigdb_signature_free().
Referenced by rz_sign_sigdb_new().
RZ_API bool rz_sign_sigdb_add_entry | ( | RZ_NONNULL RzSigDb * | db, |
RZ_NONNULL const RzSigDBEntry * | entry | ||
) |
Add a new signature entry to a database.
db | Database of signatures |
entry | Single signature entry to add to the database |
Definition at line 158 of file sigdb.c.
References NULL, and rz_return_val_if_fail.
Referenced by rz_sign_sigdb_load_database(), and sigdb_move_entry().
Definition at line 277 of file sigdb.c.
References rz_signature_db_t::entries, and free().
Referenced by analysis_sigdb_add(), and rz_sign_sigdb_load_database().
Return the signature database as a list of entries.
Definition at line 294 of file sigdb.c.
References NULL, rz_list_new(), rz_list_sort(), rz_return_val_if_fail, sigdb_signature_cmp(), and sigdb_to_list().
Referenced by rz_core_analysis_sigdb_list().
RZ_API RZ_OWN RzSigDb* rz_sign_sigdb_load_database | ( | RZ_NONNULL const char * | sigdb_path, |
bool | with_details | ||
) |
Returns a database of signatures loaded from the signature database path.
sigdb_path | The signature database path/location |
with_details | When true, opens each signature within the db for extra details |
Definition at line 105 of file sigdb.c.
References fail, rz_signature_database_entry_t::file_path, files, NULL, rz_file_globsearch(), rz_file_is_directory(), RZ_JOIN_2_PATHS, rz_list_free(), RZ_LOG_ERROR, RZ_NEW0, rz_return_val_if_fail, rz_sign_sigdb_add_entry(), rz_sign_sigdb_free(), rz_sign_sigdb_new(), rz_sign_sigdb_signature_free(), rz_str_endswith(), RZ_STR_ISNOTEMPTY, rz_strf, sigdb_signature_resolve_details(), and strdup().
Referenced by analysis_sigdb_add().
RZ_API bool rz_sign_sigdb_merge | ( | RZ_NONNULL RzSigDb * | db, |
RZ_NONNULL RzSigDb * | db2 | ||
) |
Merge the signatures from db2
into db
.
Data within db2
is moved into db
, making it empty.
db | Database of signatures to extend |
db2 | Database of signatures that need to be merged into db |
Definition at line 184 of file sigdb.c.
References rz_signature_db_t::entries, NULL, rz_return_val_if_fail, sigdb_move_entry(), and sigdb_move_data_t::src.
Referenced by analysis_sigdb_add().
Create a new empty RzSigDb
instance.
Definition at line 260 of file sigdb.c.
References rz_signature_db_t::entries, free(), ht_pu_sigdb_freekv(), NULL, RZ_NEW0, sigdb_entry_cmp(), and sigdb_entry_hash().
Referenced by rz_core_analysis_sigdb_list(), and rz_sign_sigdb_load_database().
RZ_API void rz_sign_sigdb_signature_free | ( | RZ_NULLABLE RzSigDBEntry * | entry | ) |
Frees a RzSigDBEntry structure.
[in] | entry | The RzSigDBEntry to free |
Definition at line 12 of file sigdb.c.
References free().
Referenced by ht_pu_sigdb_freekv(), and rz_sign_sigdb_load_database().
Definition at line 218 of file sigdb.c.
References a, b, field_cmp, sb, strcmp_null(), and ut32cmp().
Referenced by rz_sign_sigdb_new().
Definition at line 241 of file sigdb.c.
References k, r, s, and sdb_hash().
Referenced by rz_sign_sigdb_new().
Definition at line 168 of file sigdb.c.
References sigdb_move_data_t::dst, rz_signature_db_t::entries, k, rz_sign_sigdb_add_entry(), and sigdb_move_data_t::src.
Referenced by rz_sign_sigdb_merge().
|
static |
|
static |
Definition at line 28 of file sigdb.c.
References info(), NULL, O_RDONLY, rz_buf_free(), rz_buf_new_file(), rz_file_basename(), RZ_FLIRT_NODE_OPTIMIZE_NONE, rz_get_input_num_value(), RZ_LOG_WARN, rz_sign_flirt_info_fini(), rz_sign_flirt_node_free(), rz_sign_flirt_parse_header_compressed_pattern_from_buffer(), rz_sign_flirt_parse_string_pattern_from_buffer(), RZ_STR_DUP, rz_str_endswith(), rz_str_replace_char(), RZ_SYS_DIR, and strdup().
Referenced by rz_sign_sigdb_load_database().
Definition at line 285 of file sigdb.c.
References k, and rz_list_append().
Referenced by rz_sign_sigdb_list().