Rizin
unix-like reverse engineering framework and cli tools
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include "mspack/mspack.h"
#include "mspack/macros.h"
#include "mspack/cab.h"
Go to the source code of this file.
Macros | |
#define | FSEEK fseek |
#define | FTELL ftell |
#define | FILELEN long |
#define | MIN(a, b) ((a)<(b)?(a):(b)) |
#define | GETOFFSET (FTELL(fh)) |
#define | READ(buf, len) if (myread((void *)(buf),(len))) return |
#define | SKIP(offset) if (FSEEK(fh,(offset),SEEK_CUR)) return |
#define | SEEK(offset) if (FSEEK(fh,(offset),SEEK_SET)) return |
#define | SEARCH_SIZE (32*1024) |
#define | GETLONG(n) EndGetI32(&buf[n]) |
#define | GETWORD(n) EndGetI16(&buf[n]) |
#define | GETBYTE(n) ((int)buf[n]) |
#define | CAB_NAMEMAX (1024) |
Functions | |
void | search () |
void | getinfo (FILELEN base_offset) |
char * | read_name () |
int | main (int argc, char *argv[]) |
int | myread (void *buf, size_t length) |
Variables | |
FILE * | fh |
char * | filename |
FILELEN | filelen |
unsigned char | search_buf [SEARCH_SIZE] |
char | namebuf [CAB_NAMEMAX] |
void getinfo | ( | FILELEN | base_offset | ) |
Definition at line 177 of file cabinfo.c.
References cfdata_CheckSum, cfdata_CompressedSize, cfdata_SIZEOF, cfdata_UncompressedSize, cffile_Attribs, cffile_Date, cffile_FolderIndex, cffile_FolderOffset, cffile_SIZEOF, cffile_Time, cffile_UncompressedSize, cffileCONTINUED_FROM_PREV, cffileCONTINUED_PREV_AND_NEXT, cffileCONTINUED_TO_NEXT, cffold_CompType, cffold_DataOffset, cffold_NumBlocks, cffold_SIZEOF, cffoldCOMPTYPE_LZX, cffoldCOMPTYPE_MASK, cffoldCOMPTYPE_MSZIP, cffoldCOMPTYPE_NONE, cffoldCOMPTYPE_QUANTUM, cfhead_CabinetIndex, cfhead_CabinetSize, cfhead_FileOffset, cfhead_Flags, cfhead_MajorVersion, cfhead_MinorVersion, cfhead_NumFiles, cfhead_NumFolders, cfhead_SetID, cfhead_SIZEOF, cfheadext_DataReserved, cfheadext_FolderReserved, cfheadext_HeaderReserved, cfheadext_SIZEOF, cfheadNEXT_CABINET, cfheadPREV_CABINET, cfheadRESERVE_PRESENT, FILELEN, filelen, flags, GETBYTE, GETLONG, GETOFFSET, GETWORD, i, LD, MIN, MSCAB_ATTRIB_ARCH, MSCAB_ATTRIB_EXEC, MSCAB_ATTRIB_HIDDEN, MSCAB_ATTRIB_RDONLY, MSCAB_ATTRIB_SYSTEM, MSCAB_ATTRIB_UTF_NAME, printf(), READ, read_name(), SEEK, and SKIP.
Referenced by search().
Definition at line 56 of file cabinfo.c.
Definition at line 83 of file cabinfo.c.
References fh, filelen, GETOFFSET, length, and MIN.
Referenced by read_name().
char * read_name | ( | ) |
void search | ( | ) |
Definition at line 91 of file cabinfo.c.
References fh, FILELEN, filelen, FSEEK, FTELL, getinfo(), LD, length, p, printf(), READ, search_buf, SEARCH_SIZE, SEEK, SEEK_END, and SEEK_SET.
Referenced by _cb_hit(), do_analysis_search(), do_esil_search(), do_string_search(), do_syscall_search(), main(), rz_cmd_search(), and rz_core_search_rop().
FILE* fh |
Definition at line 52 of file cabinfo.c.
Referenced by add_file_hash(), cabd_extract(), cabd_find(), cabd_init_decomp(), cabd_open(), cabd_read_headers(), cabd_read_string(), cabd_search(), cabx_close(), cabx_open(), cabx_read(), cabx_seek(), cabx_tell(), cabx_write(), chmd_extract(), chmd_fast_find(), chmd_read_headers(), chmd_real_open(), create_filename_from_handle(), is_valid_dmp_file(), is_valid_gdb_file(), kwajd_extract(), kwajd_open(), kwajd_read_headers(), m_close(), m_open_file(), m_open_mem(), m_read(), m_seek(), m_tell(), m_write(), main(), mem_close(), mem_open(), mem_read(), mem_seek(), mem_write(), msp_open(), myread(), read_chunk(), read_name(), read_off64(), rz_core_file_close(), rz_core_file_open(), rz_core_file_open_many(), rz_core_rtr_cmd(), rz_lib_opendir(), rz_main_rizin(), rz_main_rz_bin(), rz_sys_dir(), search(), szddd_extract(), szddd_open(), szddd_read_headers(), and try_load_file().
FILELEN filelen |
Definition at line 54 of file cabinfo.c.
Referenced by cabd_extract(), cabd_search(), create_output_name(), getinfo(), myread(), and search().
char namebuf[CAB_NAMEMAX] |
Definition at line 331 of file cabinfo.c.
Referenced by read_name(), and uv__pthread_setname_np().
unsigned char search_buf[SEARCH_SIZE] |
Definition at line 89 of file cabinfo.c.
Referenced by cabd_search(), and search().