Rizin
unix-like reverse engineering framework and cli tools
|
#include "config.h"
#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "getopt.h"
#include "zip.h"
#include "compat.h"
Go to the source code of this file.
Classes | |
struct | dispatch_table_s |
struct | progress_userdata_s |
Macros | |
#define | OPTIONS_REGRESS "" |
#define | USAGE_REGRESS "" |
#define | ziptool_open read_from_file |
Typedefs | |
typedef struct dispatch_table_s | dispatch_table_t |
Variables | |
int | optopt |
zip_t * | za |
zip_t * | z_in [16] |
unsigned int | z_in_count |
zip_flags_t | stat_flags |
struct progress_userdata_s | progress_userdata |
dispatch_table_t | dispatch_table [] |
#define ziptool_open read_from_file |
typedef struct dispatch_table_s dispatch_table_t |
|
static |
Definition at line 84 of file ziptool.c.
References argv, NULL, za, zip_add(), zip_source_buffer(), zip_source_free(), and zip_strerror().
Referenced by avr_il_update_indirect_address_reg(), bf_inc(), bf_right_arrow(), libps_snprint(), LZMA_API(), md5_process_bytes(), mnemonic(), print_loop(), rz_core_get_boundaries_prot(), rz_il_op_new_add(), rz_il_op_pure_dup(), rz_il_op_pure_free(), rz_range_add(), sdb_diff_report(), sdb_diff_report_kv(), sdb_diff_report_ns(), sh_il_mac(), str_to_uint64(), update_size(), and vle_snprint().
|
static |
Definition at line 101 of file ziptool.c.
References argv, za, zip_add_dir(), and zip_strerror().
|
static |
Definition at line 111 of file ziptool.c.
References argv, len, NULL, start, za, zip_add(), zip_source_file(), zip_source_filep(), zip_source_free(), and zip_strerror().
|
static |
Definition at line 138 of file ziptool.c.
References argv, err, error(), setup::idx, len, NULL, PRIu64, start, z_in, z_in_count, za, zip_add(), ZIP_CHECKCONS, zip_close(), zip_error_fini(), zip_error_init_with_code(), zip_error_strerror(), zip_open(), zip_source_free(), zip_source_zip(), and zip_strerror().
|
static |
Definition at line 170 of file ziptool.c.
References argv, err, error(), setup::idx, n, NULL, PRIu64, za, zip_error_init_with_code(), zip_error_strerror(), zip_fclose(), zip_file_strerror(), zip_fopen_index(), zip_fread(), and zip_strerror().
Referenced by categorize(), and hexagon_disasm_instruction().
|
static |
Definition at line 211 of file ziptool.c.
References argv, count, get_flags(), setup::idx, NULL, printf(), PRIu64, za, zip_file_extra_fields_count(), and zip_strerror().
|
static |
Definition at line 228 of file ziptool.c.
References argv, count, get_flags(), setup::idx, NULL, printf(), PRIu64, za, zip_file_extra_fields_count_by_id(), and zip_strerror().
|
static |
Definition at line 246 of file ziptool.c.
References argv, setup::idx, NULL, PRIu64, za, zip_delete(), and zip_strerror().
|
static |
Definition at line 257 of file ziptool.c.
References argv, get_flags(), setup::idx, NULL, PRIu64, za, zip_file_extra_field_delete(), and zip_strerror().
|
static |
Definition at line 272 of file ziptool.c.
References argv, get_flags(), setup::idx, NULL, PRIu64, za, zip_file_extra_field_delete_by_id(), and zip_strerror().
Definition at line 773 of file ziptool.c.
References dispatch_table_s::argument_count, argv, dispatch_table, and i.
Referenced by main().
|
static |
Definition at line 288 of file ziptool.c.
References len, NULL, printf(), za, and zip_get_archive_comment().
|
static |
Definition at line 641 of file ziptool.c.
References ZIP_CM_BZIP2, ZIP_CM_DEFAULT, ZIP_CM_DEFLATE, ZIP_CM_LZMA, ZIP_CM_STORE, ZIP_CM_XZ, and ZIP_CM_ZSTD.
Referenced by set_file_compression().
|
static |
Definition at line 675 of file ziptool.c.
References ZIP_EM_AES_128, ZIP_EM_AES_192, ZIP_EM_AES_256, ZIP_EM_NONE, and ZIP_EM_TRAD_PKWARE.
Referenced by set_file_encryption().
|
static |
Definition at line 300 of file ziptool.c.
References argv, get_flags(), hexdump(), id, setup::idx, NULL, printf(), PRIu64, za, zip_file_extra_field_get(), and zip_strerror().
|
static |
Definition at line 323 of file ziptool.c.
References argv, get_flags(), hexdump(), setup::idx, NULL, printf(), PRIu64, za, zip_file_extra_field_get_by_id(), and zip_strerror().
|
static |
Definition at line 346 of file ziptool.c.
References argv, setup::idx, len, NULL, printf(), za, zip_get_file_comment(), zip_get_name(), and zip_strerror().
|
static |
Definition at line 617 of file ziptool.c.
References flags, NULL, ZIP_FL_CENTRAL, ZIP_FL_ENC_CP437, ZIP_FL_ENC_RAW, ZIP_FL_ENC_STRICT, ZIP_FL_ENC_UTF_8, ZIP_FL_LOCAL, ZIP_FL_NOCASE, ZIP_FL_NODIR, and ZIP_FL_UNCHANGED.
Referenced by count_extra(), count_extra_by_id(), delete_extra(), delete_extra_by_id(), get_extra(), get_extra_by_id(), get_num_entries(), name_locate(), and set_extra().
|
static |
Definition at line 364 of file ziptool.c.
References argv, count, flags, get_flags(), PRId64, printf(), za, and zip_get_num_entries().
|
static |
Definition at line 692 of file ziptool.c.
References i, len, and printf().
Referenced by get_extra(), get_extra_by_id(), and test_command().
Definition at line 882 of file ziptool.c.
References arg(), argv, c, dispatch(), err, error(), flags, getopt(), GETOPT_REGRESS, i, len, NULL, optarg, optind, OPTIONS_REGRESS, optopt, prg, snprintf, stat_flags, usage(), z_in, z_in_count, za, ZIP_CHECKCONS, zip_close(), ZIP_CREATE, zip_error_fini(), zip_error_init(), zip_error_strerror(), ZIP_EXCL, ZIP_FL_ENC_GUESS, ZIP_FL_ENC_RAW, ZIP_FL_ENC_STRICT, zip_strerror(), ZIP_TRUNCATE, ziptool_open, and ziptool_post_close().
|
static |
Definition at line 375 of file ziptool.c.
References argv, flags, get_flags(), setup::idx, PRId64, printf(), za, and zip_name_locate().
|
static |
Definition at line 404 of file ziptool.c.
References NULL, progress_callback(), za, and zip_register_progress_callback_with_state().
|
static |
Definition at line 398 of file ziptool.c.
References percentage, progress_userdata_s::percentage, printf(), and progress_userdata.
Referenced by print_progress(), and zip_register_progress_callback().
|
static |
Definition at line 706 of file ziptool.c.
References err, error(), flags, length, NULL, source, STDIN_FILENO, ZIP_CREATE, ZIP_ER_INVAL, zip_error_set(), zip_fdopen(), ZIP_INT64_MAX, zip_open(), zip_open_from_source(), zip_source_file_create(), and zip_source_free().
Referenced by ziptool_open().
|
static |
Definition at line 421 of file ziptool.c.
References argv, setup::idx, NULL, s, za, zip_file_replace(), zip_source_buffer(), zip_source_free(), and zip_strerror().
|
static |
Definition at line 455 of file ziptool.c.
References argv, za, zip_set_archive_comment(), and zip_strerror().
|
static |
Definition at line 437 of file ziptool.c.
References argv, get_flags(), setup::idx, NULL, PRIu64, za, zip_file_extra_field_set(), and zip_strerror().
|
static |
Definition at line 464 of file ziptool.c.
References argv, setup::idx, NULL, PRIu64, za, zip_file_set_comment(), and zip_strerror().
|
static |
Definition at line 475 of file ziptool.c.
References argv, flags, get_compression_method(), setup::idx, NULL, PRIu32, PRIu64, za, zip_set_file_compression(), and zip_strerror().
|
static |
Definition at line 508 of file ziptool.c.
References argv, setup::idx, NULL, PRIu64, za, zip_file_set_dostime(), and zip_strerror().
|
static |
Definition at line 490 of file ziptool.c.
References argv, get_encryption_method(), setup::idx, NULL, PRIu64, za, zip_file_set_encryption(), and zip_strerror().
|
static |
Definition at line 523 of file ziptool.c.
References argv, setup::idx, NULL, PRIu64, za, zip_file_set_mtime(), and zip_strerror().
|
static |
Definition at line 537 of file ziptool.c.
References argv, setup::idx, NULL, PRIu64, za, zip_file_set_mtime(), zip_get_num_entries(), and zip_strerror().
|
static |
Definition at line 558 of file ziptool.c.
References argv, za, and zip_set_default_password().
Definition at line 796 of file ziptool.c.
References setup::description, dispatch_table, test-lz4-list::exit, benchmark::FILE, FOR_REGRESS, i, NULL, out, progname, USAGE_REGRESS, ZIP_CM_BZIP2, ZIP_CM_XZ, ZIP_CM_ZSTD, zip_compression_method_supported(), ZIP_EM_AES_128, ZIP_EM_AES_192, ZIP_EM_AES_256, and zip_encryption_method_supported().
Referenced by main().
|
static |
Definition at line 410 of file ziptool.c.
References argv, setup::idx, NULL, PRIu64, za, zip_rename(), and zip_strerror().
|
static |
Definition at line 568 of file ziptool.c.
References argv, setup::idx, NULL, printf(), PRIu64, sb, stat_flags, za, ZIP_STAT_COMP_METHOD, ZIP_STAT_COMP_SIZE, ZIP_STAT_CRC, ZIP_STAT_ENCRYPTION_METHOD, ZIP_STAT_FLAGS, ZIP_STAT_INDEX, zip_stat_index(), ZIP_STAT_MTIME, ZIP_STAT_NAME, ZIP_STAT_SIZE, and zip_strerror().
dispatch_table_t dispatch_table[] |
Definition at line 737 of file ziptool.c.
Referenced by dispatch(), and usage().
struct progress_userdata_s progress_userdata |
Definition at line 375 of file ziptool.c.
Referenced by cancel(), cancel_callback(), and progress_callback().
zip_flags_t stat_flags |
zip_t * z_in[16] |
Definition at line 79 of file ziptool.c.
Referenced by add_from_zip(), main(), and zin_close().
Definition at line 80 of file ziptool.c.
Referenced by add_from_zip(), main(), and zin_close().
zip_t* za |
Definition at line 79 of file ziptool.c.
Referenced by _zip_add_entry(), _zip_allocate_new(), _zip_cdir_write(), _zip_changed(), _zip_checkcons(), _zip_deregister_source(), _zip_dirent_write(), _zip_ef_write(), _zip_file_extra_field_prepare_for_change(), _zip_file_get_end(), _zip_file_get_offset(), _zip_file_new(), _zip_file_replace(), _zip_find_central_dir(), _zip_get_dirent(), _zip_get_name(), _zip_name_locate(), _zip_new(), _zip_open(), _zip_progress_new(), _zip_read_cdir(), _zip_read_local_ef(), _zip_register_source(), _zip_set_name(), _zip_source_set_source_archive(), _zip_string_write(), _zip_unchange(), _zip_write(), add(), add_data(), add_dir(), add_file(), add_from_zip(), add_nul(), cancel(), cat(), compare_zip(), compression_source_new(), confirm_replace(), copy_data(), copy_source(), count_extra(), count_extra_by_id(), delete(), delete_extra(), delete_extra_by_id(), ef_read(), get_archive_comment(), get_extra(), get_extra_by_id(), get_file_comment(), get_num_entries(), is_seekable(), list_zip(), LLVMFuzzerTestOneInput(), main(), merge_zip(), name_locate(), print_progress(), replace_file_contents(), seek(), set_archive_comment(), set_extra(), set_file_comment(), set_file_compression(), set_file_dostime(), set_file_encryption(), set_file_mtime(), set_file_mtime_all(), set_password(), test_file(), unchange_all(), unchange_one(), windows_open(), write_cdir(), write_data_descriptor(), zip_add(), zip_add_dir(), zip_close(), zip_delete(), zip_dir_add(), zip_discard(), zip_error_clear(), zip_error_get(), zip_fdopen(), zip_file_add(), zip_file_extra_field_delete(), zip_file_extra_field_delete_by_id(), zip_file_extra_field_get(), zip_file_extra_field_get_by_id(), zip_file_extra_field_set(), zip_file_extra_fields_count(), zip_file_extra_fields_count_by_id(), zip_file_get_comment(), zip_file_get_external_attributes(), zip_file_rename(), zip_file_replace(), zip_file_set_comment(), zip_file_set_dostime(), zip_file_set_encryption(), zip_file_set_external_attributes(), zip_file_set_mtime(), zip_fopen(), zip_fopen_encrypted(), zip_fopen_index(), zip_fopen_index_encrypted(), zip_get_archive_comment(), zip_get_archive_flag(), zip_get_error(), zip_get_file_comment(), zip_get_name(), zip_get_num_entries(), zip_get_num_files(), zip_name_locate(), zip_open(), zip_open_from_source(), zip_register_cancel_callback_with_state(), zip_register_progress_callback(), zip_register_progress_callback_with_state(), zip_rename(), zip_replace(), zip_set_archive_comment(), zip_set_archive_flag(), zip_set_default_password(), zip_set_file_comment(), zip_set_file_compression(), zip_source_buffer(), zip_source_buffer_fragment(), zip_source_buffer_with_attributes(), zip_source_compress(), zip_source_decompress(), zip_source_file(), zip_source_filep(), zip_source_function(), zip_source_layered(), zip_source_pkware_decode(), zip_source_pkware_encode(), zip_source_win32a(), zip_source_win32handle(), zip_source_win32w(), zip_source_winzip_aes_decode(), zip_source_winzip_aes_encode(), zip_source_zip(), zip_stat(), zip_stat_index(), zip_strerror(), zip_unchange(), zip_unchange_all(), zip_unchange_archive(), ziptool_open(), zrename(), and zstat().