52 return (
a &&
b &&
a->name &&
b->name ? strcmp(
a->name,
b->name) : 0);
57 if (!
a || !
b || !
a->name || !
b->name) {
62 return (la > lb) - (la < lb);
66 return (
a &&
b &&
a->addr &&
b->addr ? (
a->addr >
b->addr) - (
a->addr <
b->addr) : 0);
70 return (
a &&
b &&
a->diff->type &&
b->diff->type ? (
a->diff->type >
b->diff->type) - (
a->diff->type <
b->diff->type) : 0);
81 return (sa >
sb) - (sa <
sb);
85 return (
a &&
b &&
a->diff->dist &&
b->diff->dist ? (
a->diff->dist >
b->diff->dist) - (
a->diff->dist <
b->diff->dist) : 0);
90 const char *column = node->
value;
92 if (column && strcmp(column,
"?")) {
93 if (!strcmp(column,
"name")) {
95 }
else if (!strcmp(column,
"namelen")) {
97 }
else if (!strcmp(column,
"addr")) {
99 }
else if (!strcmp(column,
"type")) {
101 }
else if (!strcmp(column,
"size")) {
103 }
else if (!strcmp(column,
"dist")) {
111 eprintf(
"e diff.sort = [name, namelen, addr, type, size, dist]\n");
116 int autoseg = (!strncmp(asmarch,
"x86", 3) && asmbits == 16);
257 if (core && core->
analysis && node) {
268 if (*node->
value ==
'?') {
278 if (!aa || strcmp(aa, node->
value)) {
279 eprintf(
"analysis.arch: cannot find '%s'\n", node->
value);
402 if (
h->cpus && !strcmp(
arch,
h->name)) {
405 for (
i = 0;
i <
n;
i++) {
420 if (*node->
value ==
'?') {
447 if (core && node && core->
rasm) {
456 if (core && core->
rasm && core->
rasm->
cur && node) {
461 for (
i = 1;
i <=
bits;
i <<= 1) {
481 const char *asmos =
NULL;
483 if (!*node->
value || !core || !core->
rasm) {
490 if (node->
value[0] ==
'?') {
492 if (strlen(node->
value) > 1 && node->
value[1] ==
'?') {
515 const char *newAsmCPU = core->
rasm->
cur->cpus;
518 char *nac =
strdup(newAsmCPU);
519 char *
comma = strchr(nac,
',');
521 if (!*asm_cpu || (*asm_cpu && !strstr(nac, asm_cpu))) {
534 }
else if (16 &
bits) {
536 }
else if (32 &
bits) {
543 snprintf(asmparser,
sizeof(asmparser),
"%s.pseudo", node->
value);
638 if (node->
value[0] ==
'?') {
646 eprintf(
"user can't be NULL\n");
659 eprintf(
"e asm.bits: Cannot set value, no plugins defined yet\n");
665 eprintf(
"asm.arch: Cannot setup '%d' bits analysis engine\n",
bits);
699 if (core->
rasm->
cur->features) {
703 for (
i = 0;
i < argc;
i++) {
725 if (*node->
value ==
'?') {
731 if (node->
value[0]) {
741 if (core->
rasm->
cur->platforms) {
745 for (
i = 0;
i < argc;
i++) {
763 if (*node->
value ==
'?') {
769 if (node->
value[0]) {
798 if (*node->
value ==
'?') {
799 if (strlen(node->
value) > 1 && node->
value[1] ==
'?') {
800 rz_cons_printf(
"Concatenation of meta types encoded as characters:\n"
801 "'d': data\n'c': code\n's': string\n'f': format\n'm': magic\n"
802 "'h': hide\n'C': comment\n'r': run\n"
803 "(default is 'ds' to skip data and strings)\n");
843 if (*node->
value ==
'?') {
847 if (!node->
value[0]) {
877 if (node->
value[0] ==
'?') {
894 if (node->
value[0] ==
'?') {
896 rz_cons_printf(
" -- if string's 2nd & 4th bytes are 0 then utf16le else "
897 "if 2nd - 4th & 6th bytes are 0 & no char > 0x10ffff then utf32le else "
898 "if utf8 char detected then utf8 else 8bit\n");
905 {
"utf16le",
"utf-16le,utf16-le" },
906 {
"utf32le",
"utf-32le,utf32-le" },
907 {
"utf16be",
"utf-16be,utf16-be" },
908 {
"utf32be",
"utf-32be,utf32-be" },
909 {
"ibm037",
"ebcdic" },
911 {
"ebcdices",
NULL },
912 {
"ebcdicuk",
NULL },
913 {
"ebcdicus",
NULL },
968 if (*node->
value ==
'?') {
970 "There can be multiple entries separated by commas. No whitespace before/after entries.\n"
971 "Possible entries:\n"
972 " all : purge all strings\n"
973 " true : use the false_positive() classifier in cbin.c\n"
974 " addr : purge string at addr\n"
975 " addr1-addr2 : purge all strings in the range addr1-addr2 inclusive\n"
976 " !addr : prevent purge of string at addr by prev entries\n"
977 " !addr1-addr2 : prevent purge of strings in range addr1-addr2 inclusive by prev entries\n"
978 "Neither !true nor !false is supported.\n"
981 " e bin.str.purge=true,0-0xff,!0x1a\n"
982 " -- purge strings using the false_positive() classifier in cbin.c and also strings \n"
983 " with addresses in the range 0-0xff, but not the string at 0x1a.\n"
984 " e bin.str.purge=all,!0x1000-0x1fff\n"
985 " -- purge all strings except the strings with addresses in the range 0x1000-0x1fff.\n");
1004 if (node->
value[0] ==
'?') {
1014 if (node->
value[0] ==
'?') {
1015 if (strlen(node->
value) > 1 && node->
value[1] ==
'?') {
1017 "a only alphanumeric printable\n"
1018 "8 only strings with utf8 chars\n"
1019 "p file/directory paths\n"
1020 "e email-like addresses\n"
1022 "i IPv4 address-like strings\n"
1023 "U only uppercase strings\n"
1024 "f format-strings\n");
1045 if (*node->
value ==
'?') {
1105 if (!strcmp(dbgbackend,
"bf")) {
1167 if (node->
value[0] ==
'?') {
1176 if (node->
value[0] ==
'?') {
1212 if (!strcmp(node->
value,
"true")) {
1214 }
else if (!strcmp(node->
value,
"false")) {
1251 if (*node->
value ==
'?') {
1261 if (*node->
value ==
'?') {
1341 eprintf(
"Warning: dbg.execs is not supported in this platform.\n");
1391 free((
void *)
r->io->runprofile);
1392 if (!node || !*(node->
value)) {
1393 r->io->runprofile =
NULL;
1403 if (!node || !*(node->
value)) {
1416 if (!strcmp(node->
value,
"?")) {
1422 if (!strcmp(node->
value,
"bf")) {
1451 eprintf(
"esil.stack.depth must be greater than 2\n");
1622 if (core && core->
io) {
1635 if (core && core->
io) {
1654 if (core && core->
io) {
1712 pj_ks(pj,
"desc", es);
1716 if (!rz_list_empty(node->
options)) {
1717 pj_ka(pj,
"options");
1730 if (!rz_list_empty(node->
options)) {
1783 rz_list_foreach (cfg->
nodes,
iter, node) {
1963 eprintf(
"WARNING: You may probably want to disable io.va too\n");
2004 char *pikaboo = strstr(node->
value,
"://");
2006 if (pikaboo[3] ==
'/') {
2008 char *ovalue = node->
value;
2045 if (!strcmp(node->
value,
"?")) {
2046 eprintf(
"Usage: scr.pager must be '..' for internal less, or the path to a program in $PATH");
2081 int n = atoi(node->
value);
2112 static bool scr_vtmode(
void *user,
void *data) {
2124 SetConsoleMode(
input,
mode & ENABLE_VIRTUAL_TERMINAL_INPUT);
2127 SetConsoleMode(
input,
mode & ~ENABLE_VIRTUAL_TERMINAL_INPUT);
2130 HANDLE streams[] = { GetStdHandle(STD_OUTPUT_HANDLE), GetStdHandle(STD_ERROR_HANDLE) };
2176 if (node->
value[0] ==
'?') {
2177 if (strlen(node->
value) > 1 && node->
value[1] ==
'?') {
2179 " asciiesc convert to ascii with non-ascii chars escaped\n"
2180 " asciidot convert to ascii with non-ascii chars turned into a dot (except control chars stated below)\n"
2182 "Ascii chars are in the range 0x20-0x7e. Always escaped control chars are alert (\\a),\n"
2183 "backspace (\\b), formfeed (\\f), newline (\\n), carriage return (\\r), horizontal tab (\\t)\n"
2184 "and vertical tab (\\v). Also, double quotes (\\\") are always escaped, but backslashes (\\\\)\n"
2185 "are only escaped if str.escbslash = true.\n");
2199 if (!strcmp(node->
value,
"?")) {
2244 if (!strcmp(node->
value,
"help") || *node->
value ==
'?') {
2268 int n = atoi(node->
value);
2269 ((
RzCore *)user)->cons->force_rows =
n;
2391 switch (*node->
value) {
2402 eprintf(
"Invalid zoom.byte value. See pz? for help\n");
2438 if (!core || !core->
bin) {
2448 if (!core || !core->
bin) {
2452 if (!strcmp(node->
value,
"auto")) {
2530 if (node->
value[0] ==
'?') {
2531 if (strlen(node->
value) > 1 && node->
value[1] ==
'?') {
2532 rz_cons_printf(
"Valid values for search.in (depends on .from/.to and io.va):\n"
2533 "raw search in raw io (ignoring bounds)\n"
2534 "block search in the current block\n"
2535 "io.map search in current map\n"
2536 "io.sky.[rwx] search in all skyline segments\n"
2537 "io.maps search in all maps\n"
2538 "io.maps.[rwx] search in all r-w-x io maps\n"
2539 "bin.segment search in current mapped segment\n"
2540 "bin.segments search in all mapped segments\n"
2541 "bin.segments.[rwx] search in all r-w-x segments\n"
2542 "bin.section search in current mapped section\n"
2543 "bin.sections search in all mapped sections\n"
2544 "bin.sections.[rwx] search in all r-w-x sections\n"
2545 "dbg.stack search in the stack\n"
2546 "dbg.heap search in the heap\n"
2547 "dbg.map search in current memory map\n"
2548 "dbg.maps search in all memory maps\n"
2549 "dbg.maps.[rwx] search in all executable marked memory maps\n"
2550 "analysis.fcn search in the current function\n"
2551 "analysis.bb search in the current basic-block\n");
2580 if (!strcmp(node->
value,
"?")) {
2591 if (!strcmp(node->
value,
"?")) {
2734 if (*node->
value ==
'?') {
2740 if (strcmp(node->
value,
"itanium") == 0) {
2743 }
else if (strcmp(node->
value,
"msvc") == 0) {
2747 eprintf(
"analysis.cpp.abi: cannot find '%s'\n", node->
value);
2757 if (!strcmp(
"jemalloc", node->
value) || !strcmp(
"glibc", node->
value)) {
2823 if (*node->
value ==
'?') {
2832 char buf[128], *
p, *tmpdir;
2845 SETCB(
"dir.prefix", pfx,
NULL,
"Default prefix rizin was compiled for");
2852 if (!strcmp(
h,
"/")) {
2859 SETCB(
"cmd.times",
"", &
cb_cmdtimes,
"Run when a command is repeated (number prefix)");
2861 SETPREF(
"pdb.server",
"https://msdl.microsoft.com/download/symbols",
"Semi-colon separated list of base URLs for Microsoft symbol servers");
2864 SETPREF(
"pdb.symstore", pdb_path,
"Path to downstream symbol store");
2867 SETI(
"pdb.extract", 1,
"Avoid extract of the pdb file, just download");
2868 SETI(
"pdb.autoload",
false,
"Automatically load the required pdb files for loaded DLLs");
2871 SETBPREF(
"elf.checks.sections",
"true",
"Check elf sections during loading");
2872 SETBPREF(
"elf.checks.segments",
"true",
"Check elf segments during loading");
2873 SETBPREF(
"elf.load.sections",
"true",
"Automatically load elf sections");
2876 SETBPREF(
"analysis.detectwrites",
"false",
"Automatically reanalyze function after a write");
2877 SETPREF(
"analysis.fcnprefix",
"fcn",
"Prefix new function names with this");
2884 SETBPREF(
"analysis.gpfixed",
"true",
"Set gp register to analysis.gp before emulating each instruction in aae");
2891 SETDESC(
n,
"Specify search boundaries for analysis");
2893 "bin.segment",
"bin.segments",
"bin.segments.x",
"bin.segments.r",
"bin.section",
"bin.sections",
"bin.sections.rwx",
"bin.sections.r",
"bin.sections.rw",
"bin.sections.rx",
"bin.sections.wx",
"bin.sections.x",
2894 "io.map",
"io.maps",
"io.maps.rwx",
"io.maps.r",
"io.maps.rw",
"io.maps.rx",
"io.maps.wx",
"io.maps.x",
2895 "dbg.stack",
"dbg.heap",
2896 "dbg.map",
"dbg.maps",
"dbg.maps.rwx",
"dbg.maps.r",
"dbg.maps.rw",
"dbg.maps.rx",
"dbg.maps.wx",
"dbg.maps.x",
2897 "analysis.fcn",
"analysis.bb",
2899 SETI(
"analysis.timeout", 0,
"Stop analyzing after a couple of seconds");
2903 SETCB(
"analysis.armthumb",
"false", &
cb_analysis_armthumb,
"aae computes arm/thumb changes (lot of false positives ahead)");
2906 SETCB(
"analysis.delay",
"true", &
cb_analysis_delay,
"Enable delay slot analysis if supported by the architecture");
2909 SETICB(
"analysis.sleep", 0, &
cb_analysis_sleep,
"Sleep N usecs every so often during analysis. Avoid 100% CPU usage");
2911 SETBPREF(
"analysis.calls",
"false",
"Make basic af analysis walk into calls");
2912 SETBPREF(
"analysis.autoname",
"false",
"Speculatively set a name for the functions, may result in some false positives");
2913 SETBPREF(
"analysis.hasnext",
"false",
"Continue analysis after each function");
2915 SETBPREF(
"analysis.esil",
"false",
"Use the new ESIL code analysis");
2916 SETCB(
"analysis.strings",
"false", &
cb_analysis_strings,
"Identify and register strings during analysis (aar only)");
2917 SETPREF(
"analysis.types.spec",
"gcc",
"Set profile for specifying format chars used in type analysis");
2918 SETBPREF(
"analysis.types.verbose",
"false",
"Verbose output from type analysis");
2919 SETBPREF(
"analysis.types.constraint",
"false",
"Enable constraint types analysis for variables");
2922 SETBPREF(
"analysis.vinfun",
"true",
"Search values in functions (aav) (false by default to only find on non-code)");
2923 SETBPREF(
"analysis.vinfunrange",
"false",
"Search values outside function ranges (requires analysis.vinfun=false)\n");
2926 SETCB(
"analysis.hpskip",
"false", &
cb_analysis_hpskip,
"Skip `mov reg, reg` and `lea reg, [reg] at the beginning of functions");
2928 SETDESC(
n,
"Select the architecture to use");
2931 SETPREF(
"analysis.prelude",
"",
"Specify an hexpair to find preludes in code");
2932 SETCB(
"analysis.recont",
"false", &
cb_analysis_recont,
"End block after splitting a basic block instead of error");
2933 SETCB(
"analysis.jmp.indir",
"false", &
cb_analysis_ijmp,
"Follow the indirect jumps in function analysis");
2934 SETI(
"analysis.ptrdepth", 3,
"Maximum number of nested pointers to follow in analysis");
2935 SETICB(
"asm.lines.maxref", 0, &
cb_analysis_maxrefs,
"Maximum number of reflines to be analyzed and displayed in asm.lines with pd");
2945 SETCB(
"analysis.loads",
"false", &
cb_analysis_loads,
"Define as dword/string/qword when analyzing load instructions");
2947 SETCB(
"analysis.brokenrefs",
"false", &
cb_analysis_brokenrefs,
"Follow function references as well if function analysis was failed");
2948 SETCB(
"analysis.jmp.mid",
"true", &
cb_analysis_jmpmid,
"Continue analysis after jump to middle of instruction (x86 only)");
2956 SETDESC(
n,
"Select C++ ABI (Compiler)");
2958 SETB(
"analysis.apply.signature",
true,
"enables/disables auto-applying signatures to the loaded binary (see also flirt.sigdb.path)");
2960 #if __linux__ && __GNU_LIBRARY__ && __GLIBC__ && __GLIBC_MINOR__
2961 SETCB(
"dbg.malloc",
"glibc", &
cb_malloc,
"Choose malloc structure parser");
2963 SETCB(
"dbg.malloc",
"jemalloc", &
cb_malloc,
"Choose malloc structure parser");
2965 #if __GLIBC_MINOR__ > 25
2966 SETBPREF(
"dbg.glibc.tcache",
"true",
"Set glib tcache parsing");
2968 SETBPREF(
"dbg.glibc.tcache",
"false",
"Set glib tcache parsing");
2971 SETI(
"dbg.glibc.ma_offset", 0x000000,
"Main_arena offset from his symbol");
2972 SETI(
"dbg.glibc.fc_offset", 0x00280,
"First chunk offset from brk_start");
2974 SETI(
"dbg.glibc.ma_offset", 0x1bb000,
"Main_arena offset from his symbol");
2975 SETI(
"dbg.glibc.fc_offset", 0x148,
"First chunk offset from brk_start");
2977 SETI(
"dbg.glibc.fastbinmax", 10,
"Upper bound on the number of fastbins printed");
2979 SETBPREF(
"esil.prestep",
"true",
"Step before esil evaluation in `de` commands");
2980 SETPREF(
"esil.fillstack",
"",
"Initialize ESIL stack with (random, debrujn, sequence, zeros, ...)");
2983 SETICB(
"esil.stack.depth", 256, &
cb_esilstackdepth,
"Number of elements that can be pushed on the esilstack");
2984 SETI(
"esil.stack.size", 0xf0000,
"Set stack size in ESIL VM");
2985 SETI(
"esil.stack.addr", 0x100000,
"Set stack address in ESIL VM");
2986 SETPREF(
"esil.stack.pattern",
"0",
"Specify fill pattern to initialize the stack (0, w, d, i)");
2987 SETI(
"esil.addr.size", 64,
"Maximum address size in accessed by the ESIL VM");
2988 SETBPREF(
"esil.breakoninvalid",
"false",
"Break esil execution when instruction is invalid");
2989 SETI(
"esil.timeout", 0,
"A timeout (in seconds) for when we should give up emulating");
2993 SETDESC(
n,
"Select operating system (kernel)");
2994 SETOPTIONS(
n,
"ios",
"dos",
"darwin",
"linux",
"freebsd",
"openbsd",
"netbsd",
"windows",
"s110",
"none",
NULL);
2995 SETI(
"asm.xrefs.fold", 5,
"Maximum number of xrefs to be displayed as list (use columns above)");
2996 SETBPREF(
"asm.xrefs.code",
"true",
"Show the code xrefs (generated by jumps instead of calls)");
2997 SETI(
"asm.xrefs.max", 20,
"Maximum number of xrefs to be displayed without folding");
2998 SETCB(
"asm.invhex",
"false", &
cb_asm_invhex,
"Show invalid instructions as hexadecimal numbers");
2999 SETBPREF(
"asm.instr",
"true",
"Display the disassembled instruction");
3000 SETBPREF(
"asm.meta",
"true",
"Display the code/data/format conversions in disasm");
3001 SETBPREF(
"asm.bytes",
"false",
"Display the bytes of each instruction");
3002 SETBPREF(
"asm.bytes.right",
"false",
"Display the bytes at the right of the disassembly");
3003 SETI(
"asm.types", 1,
"Display the fcn types in calls (0=no,1=quiet,2=verbose)");
3004 SETBPREF(
"asm.midcursor",
"false",
"Cursor in visual disasm mode breaks the instruction");
3005 SETBPREF(
"asm.cmt.flgrefs",
"true",
"Show comment flags associated to branch reference");
3006 SETBPREF(
"asm.cmt.right",
"true",
"Show comments at right of disassembly if they fit in screen");
3007 SETBPREF(
"asm.cmt.esil",
"false",
"Show ESIL expressions as comments");
3008 SETBPREF(
"asm.cmt.il",
"false",
"Show RzIL expressions as comments");
3009 SETI(
"asm.cmt.col", 71,
"Column to align comments");
3010 SETICB(
"asm.pcalign", 0, &
cb_asm_pcalign,
"Only recognize as valid instructions aligned to this value");
3012 SETBPREF(
"asm.calls",
"true",
"Show callee function related info as comments in disasm");
3013 SETBPREF(
"asm.comments",
"true",
"Show comments in disassembly view");
3014 SETBPREF(
"asm.usercomments",
"false",
"Show user comments even if asm.comments is false");
3015 SETBPREF(
"asm.sub.jmp",
"true",
"Always substitute jump, call and branch targets in disassembly");
3016 SETBPREF(
"asm.hints",
"true",
"Disable all asm.hint* if false");
3017 SETBPREF(
"asm.hint.jmp",
"false",
"Show jump hints [numbers] in disasm");
3018 SETBPREF(
"asm.hint.call",
"true",
"Show call hints [numbers] in disasm");
3019 SETBPREF(
"asm.hint.call.indirect",
"true",
"Hints for indirect call intructions go to the call destination");
3020 SETBPREF(
"asm.hint.lea",
"false",
"Show LEA hints [numbers] in disasm");
3021 SETBPREF(
"asm.hint.emu",
"false",
"Show asm.emu hints [numbers] in disasm");
3022 SETBPREF(
"asm.hint.cdiv",
"false",
"Show CDIV hints optimization hint");
3023 SETI(
"asm.hint.pos", 1,
"Shortcut hint position (-1, 0, 1)");
3024 SETBPREF(
"asm.slow",
"true",
"Perform slow analysis operations in disasm");
3025 SETBPREF(
"asm.decode",
"false",
"Use code analysis as a disassembler");
3026 SETICB(
"asm.imm.hash", 0, &
cb_asm_immhash,
"Display # for immediates in ARM and Hexagon (0 = on)");
3027 SETBPREF(
"asm.imm.str",
"true",
"Show immediates values as strings");
3028 SETBPREF(
"asm.imm.trim",
"false",
"Remove all offsets and constants from disassembly");
3029 SETBPREF(
"asm.indent",
"false",
"Indent disassembly based on reflines depth");
3030 SETI(
"asm.indentspace", 2,
"How many spaces to indent the code");
3031 SETBPREF(
"asm.dwarf",
"false",
"Show dwarf comment at disassembly");
3032 SETBPREF(
"asm.dwarf.abspath",
"false",
"Show absolute path in asm.dwarf");
3033 SETBPREF(
"asm.dwarf.file",
"true",
"Show filename of asm.dwarf in pd");
3034 SETBPREF(
"asm.esil",
"false",
"Show ESIL instead of mnemonic");
3035 SETBPREF(
"asm.nodup",
"false",
"Do not show dupped instructions (collapse disasm)");
3036 SETBPREF(
"asm.emu",
"false",
"Run ESIL emulation analysis on disasm");
3037 SETBPREF(
"emu.pre",
"false",
"Run ESIL emulation starting at the closest flag in pd");
3038 SETBPREF(
"asm.refptr",
"true",
"Show refpointer information in disasm");
3039 SETBPREF(
"emu.lazy",
"false",
"Do not emulate all instructions with aae (optimization)");
3040 SETBPREF(
"emu.stack",
"false",
"Create a temporary fake stack when emulating in disasm (asm.emu)");
3041 SETCB(
"emu.str",
"false", &
cb_emustr,
"Show only strings if any in the asm.emu output");
3042 SETBPREF(
"emu.str.lea",
"true",
"Disable this in ARM64 code to remove some false positives");
3043 SETBPREF(
"emu.str.off",
"false",
"Always show offset when printing asm.emu strings");
3044 SETBPREF(
"emu.str.inv",
"true",
"Color-invert emu.str strings");
3045 SETBPREF(
"emu.str.flag",
"true",
"Also show flag (if any) for asm.emu string");
3046 SETBPREF(
"emu.write",
"false",
"Allow asm.emu to modify memory (WARNING)");
3047 SETBPREF(
"emu.ssa",
"false",
"Perform SSA checks and show the ssa reg names as comments");
3049 SETDESC(
n,
"Skip metadata of given types in asm.emu");
3051 SETBPREF(
"asm.sub.names",
"true",
"Replace numeric values by flags (e.g. 0x4003e0 -> sym.imp.printf)");
3052 SETPREF(
"asm.strip",
"",
"strip all instructions given comma separated types");
3053 SETBPREF(
"asm.optype",
"false",
"show opcode type next to the instruction bytes");
3054 SETBPREF(
"asm.lines.fcn",
"true",
"Show function boundary lines");
3055 SETBPREF(
"asm.flags",
"true",
"Show flags");
3056 SETICB(
"asm.flags.maxname", 0, &
cb_maxname,
"Maximum length of flag name with smart chopping");
3057 SETI(
"asm.flags.limit", 0,
"Maximum number of flags to show in a single offset");
3058 SETBPREF(
"asm.flags.offset",
"false",
"Show offset in flags");
3059 SETBPREF(
"asm.flags.inbytes",
"false",
"Display flags inside the bytes space");
3060 SETBPREF(
"asm.flags.inline",
"false",
"Display flags in line separated by commas instead of newlines");
3062 SETOPTIONS(
n,
"0 = do not show flag",
"1 = show without realign",
"2 = realign at middle flag",
3063 "3 = realign at middle flag if sym.*",
NULL);
3064 SETDESC(
n,
"Realign disassembly if there is a flag in the middle of an instruction");
3066 "Show flags' unfiltered realnames instead of names, except realnames from demangling");
3067 SETBPREF(
"asm.bb.line",
"false",
"Show empty line after every basic block");
3068 SETBPREF(
"asm.bb.middle",
"true",
"Realign disassembly if a basic block starts in the middle of an instruction");
3069 SETBPREF(
"asm.lbytes",
"true",
"Align disasm bytes to left");
3070 SETBPREF(
"asm.lines",
"true",
"Show ASCII-art lines at disassembly");
3071 SETBPREF(
"asm.lines.bb",
"true",
"Show flow lines at jumps");
3072 SETBPREF(
"asm.lines.call",
"false",
"Enable call lines");
3073 SETBPREF(
"asm.lines.ret",
"false",
"Show separator lines after ret");
3074 SETBPREF(
"asm.lines.out",
"true",
"Show out of block lines");
3075 SETBPREF(
"asm.lines.right",
"false",
"Show lines before opcode instead of offset");
3076 SETBPREF(
"asm.lines.wide",
"false",
"Put a space between lines");
3077 SETBPREF(
"asm.fcn.signature",
"true",
"Show function signature in disasm");
3078 SETBPREF(
"asm.fcn.size",
"false",
"Show function size in disasm");
3080 SETICB(
"asm.sub.varmin", 0x100, &
cb_asmsubvarmin,
"Minimum value to substitute in instructions (asm.sub.var)");
3081 SETCB(
"asm.sub.tail",
"false", &
cb_asmsubtail,
"Replace addresses with prefix .. syntax");
3082 SETBPREF(
"asm.middle",
"false",
"Allow disassembling jumps in the middle of an instruction");
3083 SETBPREF(
"asm.noisy",
"true",
"Show comments considered noisy but possibly useful");
3084 SETBPREF(
"asm.offset",
"true",
"Show offsets in disassembly");
3085 SETBPREF(
"hex.offset",
"true",
"Show offsets in hex-dump");
3086 SETBPREF(
"scr.square",
"true",
"Use square pixels or not");
3087 SETCB(
"scr.prompt.vi",
"false", &
cb_scr_vi,
"Use vi mode for input prompt");
3090 SETCB(
"scr.rainbow",
"false", &
cb_scrrainbow,
"Shows rainbow colors depending of address");
3091 SETCB(
"scr.last",
"true", &
cb_scrlast,
"Cache last output after flush to make _ command work (disable for performance)");
3092 SETBPREF(
"asm.reloff",
"false",
"Show relative offsets instead of absolute address in disasm");
3093 SETBPREF(
"asm.reloff.flags",
"false",
"Show relative offsets to flags (not only functions)");
3094 SETBPREF(
"asm.section",
"false",
"Show section name before offset");
3095 SETBPREF(
"asm.section.perm",
"false",
"Show section permissions in the disasm");
3096 SETBPREF(
"asm.section.name",
"true",
"Show section name in the disasm");
3097 SETI(
"asm.section.col", 30,
"Columns width to show asm.section");
3098 SETCB(
"asm.sub.section",
"false", &
cb_asmsubsec,
"Show offsets in disasm prefixed with section/map name");
3100 SETBPREF(
"asm.size",
"false",
"Show size of opcodes in disassembly (pd)");
3101 SETBPREF(
"asm.stackptr",
"false",
"Show stack pointer at disassembly");
3102 SETBPREF(
"asm.cyclespace",
"false",
"Indent instructions depending on CPU-cycles");
3103 SETBPREF(
"asm.cycles",
"false",
"Show CPU-cycles taken by instruction at disassembly");
3104 SETI(
"asm.tabs", 6,
"Use tabs in disassembly");
3105 SETBPREF(
"asm.tabs.once",
"true",
"Only tabulate the opcode, not the arguments");
3106 SETI(
"asm.tabs.off", 0,
"tabulate spaces after the offset");
3107 SETBPREF(
"asm.trace",
"false",
"Show execution traces for each opcode");
3108 SETBPREF(
"asm.tracespace",
"false",
"Indent disassembly with trace.count information");
3109 SETBPREF(
"asm.ucase",
"false",
"Use uppercase syntax at disassembly");
3110 SETBPREF(
"asm.capitalize",
"false",
"Use camelcase at disassembly");
3111 SETBPREF(
"asm.var",
"true",
"Show local function variables in disassembly");
3112 SETBPREF(
"asm.var.access",
"false",
"Show accesses of local variables");
3113 SETBPREF(
"asm.sub.var",
"true",
"Substitute variables in disassembly");
3114 SETI(
"asm.var.summary", 0,
"Show variables summary instead of full list in disasm (0, 1, 2)");
3115 SETBPREF(
"asm.sub.varonly",
"true",
"Substitute the entire variable expression with the local variable name (e.g. [local10h] instead of [ebp+local10h])");
3116 SETBPREF(
"asm.sub.reg",
"false",
"Substitute register names with their associated role name (drp~=)");
3117 SETBPREF(
"asm.sub.rel",
"true",
"Substitute pc relative expressions in disasm");
3118 SETBPREF(
"asm.family",
"false",
"Show family name in disasm");
3119 SETBPREF(
"asm.symbol",
"false",
"Show symbol+delta instead of absolute offset");
3120 SETBPREF(
"asm.analysis",
"false",
"Analyze code and refs while disassembling (see analysis.strings)");
3121 SETI(
"asm.symbol.col", 40,
"Columns width to show asm.section");
3123 SETBPREF(
"asm.minicols",
"false",
"Only show the instruction in the column disasm");
3125 SETDESC(asmcpu,
"Set the kind of asm.arch cpu");
3127 SETDESC(asmarch,
"Set the arch to be used by asm");
3132 SETDESC(
n,
"Specify supported features by the target CPU");
3135 SETDESC(
n,
"Specify supported platforms by the target architecture");
3138 SETDESC(
n,
"Set the asm parser to use");
3140 SETCB(
"asm.segoff",
"false", &
cb_segoff,
"Show segmented address in prompt (x86-16)");
3141 SETCB(
"asm.decoff",
"false", &
cb_decoff,
"Show segmented address in prompt (x86-16)");
3142 SETICB(
"asm.seggrn", 4, &
cb_seggrn,
"Segment granularity in bits (x86-16)");
3144 SETDESC(
n,
"Select assembly syntax");
3146 SETI(
"asm.nbytes", 6,
"Number of bytes for each opcode at disassembly");
3147 SETBPREF(
"asm.bytes.space",
"false",
"Separate hexadecimal bytes with a whitespace");
3148 #if RZ_SYS_BITS == RZ_SYS_BITS_64
3155 SETBPREF(
"asm.functions",
"true",
"Show functions in disassembly");
3156 SETBPREF(
"asm.xrefs",
"true",
"Show xrefs in disassembly");
3157 SETBPREF(
"asm.demangle",
"true",
"Show demangled symbols in disasm");
3158 SETBPREF(
"asm.describe",
"false",
"Show opcode description");
3159 SETPREF(
"asm.highlight",
"",
"Highlight current line");
3160 SETBPREF(
"asm.marks",
"true",
"Show marks before the disassembly");
3161 SETBPREF(
"asm.cmt.refs",
"false",
"Show flag and comments from refs in disasm");
3162 SETBPREF(
"asm.cmt.patch",
"false",
"Show patch comments in disasm");
3163 SETBPREF(
"asm.cmt.off",
"nodup",
"Show offset comment in disasm (true, false, nodup)");
3164 SETBPREF(
"asm.payloads",
"false",
"Show payload bytes in disasm");
3167 SETPREF(
"bin.hashlimit",
"10M",
"Only compute hash when opening a file if smaller than this size");
3168 SETCB(
"bin.usextr",
"true", &
cb_usextr,
"Use extract plugins when loading files");
3169 SETCB(
"bin.str.purge",
"", &
cb_strpurge,
"Purge strings (e bin.str.purge=? provides more detail)");
3170 SETBPREF(
"bin.b64str",
"false",
"Try to debase64 the strings");
3171 SETCB(
"bin.at",
"false", &
cb_binat,
"RzBin.cur depends on RzCore.offset");
3172 SETBPREF(
"bin.libs",
"false",
"Try to load libraries after loading main binary");
3176 SETCB(
"bin.filter",
"true", &
cb_binfilter,
"Filter symbol names to fix dupped names");
3178 SETPREF(
"bin.lang",
"",
"Language for bin.demangle");
3179 SETBPREF(
"bin.demangle",
"true",
"Import demangled symbols from RzBin");
3180 SETBPREF(
"bin.demangle.libs",
"false",
"Show library name on demangled symbols names");
3181 SETI(
"bin.baddr", -1,
"Base address of the binary");
3182 SETI(
"bin.laddr", 0,
"Base address for loading library ('*.so')");
3183 SETCB(
"bin.dbginfo",
"true", &
cb_bindbginfo,
"Load debug information at startup if available");
3184 SETBPREF(
"bin.relocs",
"true",
"Load relocs information at startup if available");
3187 SETICB(
"bin.maxstrbuf", 1024 * 1024 * 10, &
cb_binmaxstrbuf,
"Maximum size of range to load strings from");
3189 SETDESC(
n,
"Default string encoding of binary");
3190 SETOPTIONS(
n,
"ascii",
"8bit",
"utf8",
"utf16le",
"utf32le",
"utf16be",
"utf32be",
"guess",
NULL);
3191 SETCB(
"bin.prefix",
"", &
cb_binprefix,
"Prefix all symbols/sections/relocs with a specific string");
3193 SETCB(
"bin.debase64",
"false", &
cb_debase64,
"Try to debase64 all strings");
3194 SETBPREF(
"bin.classes",
"true",
"Load classes from rbin on startup");
3195 SETCB(
"bin.verbose",
"false", &
cb_binverbose,
"Show RzBin warnings when loading binaries");
3198 SETPREF(
"prj.file",
"",
"Path of the currently opened project");
3199 SETBPREF(
"prj.compress",
"false",
"Compress the project file while saving");
3202 SETBPREF(
"cfg.plugins",
"true",
"Load plugins at startup");
3203 SETCB(
"time.fmt",
"%Y-%m-%d %H:%M:%S %z", &
cb_cfgdatefmt,
"Date format (%Y-%m-%d %H:%M:%S %z)");
3204 SETICB(
"time.zone", 0, &
cb_timezone,
"Time zone, in hours relative to GMT: +2, -1,..");
3205 SETBPREF(
"cfg.newtab",
"false",
"Show descriptions in command completion");
3214 rz_config_desc(cfg,
"cfg.editor",
"Select default editor program");
3218 SETBPREF(
"cfg.fortunes.clippy",
"false",
"Use ?E instead of ?e");
3219 SETPREF(
"cfg.prefixdump",
"dump",
"Filename prefix for automated dumps");
3220 SETBPREF(
"cfg.wseek",
"false",
"Seek after write");
3221 SETICB(
"cfg.seek.histsize", 63,
NULL,
"Maximum size of the seek history");
3222 SETCB(
"cfg.seek.silent",
"false",
NULL,
"When true, seek movements are not logged in seek history");
3223 SETCB(
"cfg.bigendian",
"false", &
cb_bigendian,
"Use little (false) or big (true) endianness");
3224 SETI(
"cfg.cpuaffinity", 0,
"Run on cpuid");
3230 " (0:SILLY, 1:DEBUG, 2:VERBOSE, 3:INFO, 4:WARN, 5:ERROR, 6:FATAL)");
3235 " (0:SILLY, 1:VERBOSE, 2:DEBUG, 3:INFO, 4:WARN, 5:ERROR, 6:FATAL)");
3250 SETCB(
"log.events",
"false", &
cb_log_events,
"Remote HTTP server to sync events with");
3253 SETCB(
"diff.sort",
"addr", &
cb_diff_sort,
"Specify function diff sorting column see (e diff.sort=?)");
3254 SETI(
"diff.from", 0,
"Set source diffing address for px (uses cc command)");
3255 SETI(
"diff.to", 0,
"Set destination diffing address for px (uses cc command)");
3256 SETBPREF(
"diff.bare",
"false",
"Never show function names in diff output");
3257 SETBPREF(
"diff.levenstein",
"false",
"Use faster (and buggy) levenstein algorithm for buffer distance diffing");
3260 SETI(
"dir.depth", 10,
"Maximum depth when searching recursively for files");
3263 SETPREF(
"dir.magic",
path,
"Path to rz_magic files");
3266 SETPREF(
"dir.plugins",
path,
"Path to plugin files to be loaded at startup");
3269 SETCB(
"dir.source",
"", &
cb_dirsrc,
"Path to find source files");
3270 SETPREF(
"dir.types",
"/usr/include",
"Default path to look for cparse type files");
3271 SETPREF(
"dir.libs",
"",
"Specify path to find libraries to load when bin.libs=true");
3279 SETPREF(
"dir.projects",
"/data/data/org.rizin.rizininstaller/rizin/projects",
"Default path for projects");
3282 SETPREF(
"dir.projects", projects_dir,
"Default path for projects");
3285 SETPREF(
"stack.reg",
"SP",
"Which register to use as stack pointer in the visual debug");
3286 SETBPREF(
"stack.bytes",
"true",
"Show bytes instead of words in stack");
3287 SETBPREF(
"stack.anotated",
"false",
"Show anotated hexdump in visual debug");
3288 SETI(
"stack.size", 64,
"Size in bytes of stack hexdump in visual debug");
3289 SETI(
"stack.delta", 0,
"Delta for the stack dump");
3291 SETCB(
"dbg.libs",
"", &
cb_dbg_libs,
"If set stop when loading matching libname");
3292 SETBPREF(
"dbg.skipover",
"false",
"Make dso perform a dss (same goes for esil and visual/graph");
3293 SETI(
"dbg.hwbp", 0,
"Set HW or SW breakpoints");
3294 SETCB(
"dbg.unlibs",
"", &
cb_dbg_unlibs,
"If set stop when unloading matching libname");
3296 SETBPREF(
"dbg.slow",
"false",
"Show stack and regs in visual mode in a slow but verbose mode");
3297 SETBPREF(
"dbg.funcarg",
"false",
"Display arguments to function call in visual mode");
3299 SETCB(
"dbg.bpinmaps",
"true", &
cb_dbg_bpinmaps,
"Activate breakpoints only if they are inside a valid map");
3300 SETCB(
"dbg.forks",
"false", &
cb_dbg_forks,
"Stop execution if fork() is done (see dbg.threads)");
3306 SETDESC(
n,
"Select backtrace algorithm");
3308 SETCB(
"dbg.threads",
"false", &
cb_stopthreads,
"Stop all threads when debugger breaks (see dbg.forks)");
3309 SETCB(
"dbg.clone",
"false", &
cb_dbg_clone,
"Stop execution if new thread is created");
3310 SETCB(
"dbg.aftersyscall",
"true", &
cb_dbg_aftersc,
"Stop execution before the syscall is executed (see dcs)");
3312 SETCB(
"dbg.args",
"", &
cb_dbg_args,
"Set the args of the program to debug");
3313 SETCB(
"dbg.follow.child",
"false", &
cb_dbg_follow_child,
"Continue tracing the child process on fork. By default the parent process is traced");
3314 SETCB(
"dbg.trace_continue",
"true", &
cb_dbg_trace_continue,
"Trace every instruction between the initial PC position and the PC position at the end of continue's execution");
3317 SETBPREF(
"dbg.status",
"false",
"Set cmd.prompt to '.dr*' or '.dr*;drd;sr PC;pi 1;shu'");
3331 rz_config_desc(cfg,
"dbg.follow",
"Follow program counter when pc > core->offset + dbg.follow");
3332 SETBPREF(
"dbg.rebase",
"true",
"Rebase analysis/meta/comments/flags when reopening file in debugger");
3333 SETCB(
"dbg.swstep",
"false", &
cb_swstep,
"Force use of software steps (code analysis+breakpoint)");
3334 SETBPREF(
"dbg.trace.inrange",
"false",
"While tracing, avoid following calls outside specified range");
3335 SETBPREF(
"dbg.trace.libs",
"true",
"Trace library code too");
3336 SETBPREF(
"dbg.exitkills",
"true",
"Kill process on exit");
3337 SETPREF(
"dbg.exe.path",
"",
"Path to binary being debugged");
3338 SETCB(
"dbg.execs",
"false", &
cb_dbg_execs,
"Stop execution if new thread is created");
3341 SETCB(
"dbg.consbreak",
"false", &
cb_consbreak,
"SIGINT handle for attached processes");
3345 SETBPREF(
"dbg.bpsysign",
"false",
"Ignore system breakpoints");
3347 SETCB(
"dbg.trace",
"false", &
cb_trace,
"Trace program execution (see asm.trace)");
3352 SETPREF(
"cmd.bp",
"",
"Run when a breakpoint is hit");
3353 SETPREF(
"cmd.onsyscall",
"",
"Run when a syscall is hit");
3355 SETPREF(
"cmd.stack",
"",
"Command to display the stack in visual debug mode");
3356 SETPREF(
"cmd.cprompt",
"",
"Column visual prompt commands");
3357 SETPREF(
"cmd.gprompt",
"",
"Graph visual prompt commands");
3358 SETPREF(
"cmd.hit",
"",
"Run when a search hit is found");
3359 SETPREF(
"cmd.open",
"",
"Run when file is opened");
3360 SETPREF(
"cmd.load",
"",
"Run when binary is loaded");
3361 SETPREF(
"cmd.prompt",
"",
"Prompt commands");
3362 SETCB(
"cmd.repeat",
"false", &
cb_cmdrepeat,
"Empty command an alias for '..' (repeat last command)");
3363 SETPREF(
"cmd.fcn.new",
"",
"Run when new function is analyzed");
3364 SETPREF(
"cmd.fcn.delete",
"",
"Run when a function is deleted");
3365 SETPREF(
"cmd.fcn.rename",
"",
"Run when a function is renamed");
3366 SETPREF(
"cmd.visual",
"",
"Replace current print mode");
3367 SETPREF(
"cmd.vprompt",
"",
"Visual prompt commands");
3369 SETCB(
"cmd.esil.step",
"", &
cb_cmd_esil_step,
"Command to run before performing a step in the emulator");
3371 SETCB(
"cmd.esil.mdev",
"", &
cb_cmd_esil_mdev,
"Command to run when memory device address is accessed");
3374 SETCB(
"cmd.esil.todo",
"", &
cb_cmd_esil_todo,
"Command to run when the esil instruction contains TODO");
3375 SETCB(
"cmd.esil.ioer",
"", &
cb_cmd_esil_ioer,
"Command to run when esil fails to IO (invalid read/write)");
3381 SETCB(
"hex.hdroff",
"false", &
cb_hex_hdroff,
"Show aligned 1 byte in header instead of delta nibble");
3384 SETCB(
"hex.align",
"false", &
cb_hex_align,
"Align hexdump with flag + flagsize");
3386 SETCB(
"hex.compact",
"false", &
cb_hexcompact,
"Show smallest 16 byte col hexdump (60 columns)");
3387 SETCB(
"cmd.hexcursor",
"", &
cb_cmd_hexcursor,
"If set and cursor is enabled display given pf format string");
3388 SETI(
"hex.flagsz", 0,
"If non zero, overrides the flag size in pxa");
3390 SETI(
"hex.depth", 5,
"Maximal level of recurrence while telescoping memory");
3391 SETBPREF(
"hex.onechar",
"false",
"Number of columns in hexdump");
3396 SETBPREF(
"http.log",
"true",
"Show HTTP requests processed");
3397 SETBPREF(
"http.colon",
"false",
"Only accept the : command");
3398 SETPREF(
"http.logfile",
"",
"Specify a log file instead of stderr for http requests");
3399 SETBPREF(
"http.cors",
"false",
"Enable CORS");
3400 SETPREF(
"http.referer",
"",
"CSFR protection if set");
3401 SETBPREF(
"http.dirlist",
"false",
"Enable directory listing");
3402 SETPREF(
"http.allow",
"",
"Only accept clients from the comma separated IP list");
3410 "LD_LIBRARY_PATH=/system/lib am start -a android.intent.action.VIEW -d");
3418 rz_config_desc(cfg,
"http.browser",
"Command to open HTTP URLs");
3420 SETI(
"http.maxsize", 0,
"Maximum file size for upload");
3421 SETPREF(
"http.index",
"index.html",
"Main html file to check in directory");
3422 SETPREF(
"http.bind",
"localhost",
"Server address");
3424 SETPREF(
"http.homeroot", wwwroot_dir,
"http home root directory");
3427 SETPREF(
"http.root",
"/data/data/org.rizin.rizininstaller/www",
"http root directory");
3430 SETPREF(
"http.root", wwwroot,
"http root directory");
3433 SETPREF(
"http.port",
"9090",
"HTTP server port");
3434 SETPREF(
"http.maxport",
"9999",
"Last HTTP server port");
3435 SETI(
"http.timeout", 3,
"Disconnect clients after N seconds of inactivity");
3436 SETI(
"http.dietime", 0,
"Kill server after N seconds with no client");
3437 SETBPREF(
"http.verbose",
"false",
"Output server logs to stdout");
3438 SETBPREF(
"http.upget",
"false",
"/up/ answers GET requests, in addition to POST");
3439 SETBPREF(
"http.upload",
"false",
"Enable file uploads to /up/<filename>");
3440 SETPREF(
"http.uri",
"",
"Address of HTTP proxy");
3441 SETBPREF(
"http.auth",
"false",
"Enable/Disable HTTP Authentification");
3443 SETPREF(
"http.authfile",
p ?
p :
"",
"HTTP Authentification user file");
3447 rz_config_desc(cfg,
"http.uproot",
"Path where files are uploaded");
3450 SETBPREF(
"tcp.islocal",
"false",
"Bind a loopback for tcp command server");
3453 SETBPREF(
"graph.aeab",
"false",
"Show aeab info on each basic block instead of disasm");
3454 SETBPREF(
"graph.trace",
"false",
"Fold all non-traced basic blocks");
3455 SETBPREF(
"graph.dummy",
"true",
"Create dummy nodes in the graph for better layout (20% slower)");
3456 SETBPREF(
"graph.few",
"false",
"Show few basic blocks in the graph");
3457 SETBPREF(
"graph.comments",
"true",
"Show disasm comments in graph");
3458 SETBPREF(
"graph.cmtright",
"false",
"Show comments at right");
3459 SETCB(
"graph.gv.format",
"gif", &
cb_graphformat,
"Graph image extension when using 'w' format (png, jpg, pdf, ps, svg, json)");
3460 SETBPREF(
"graph.refs",
"false",
"Graph references in callgraphs (.agc*;aggi)");
3461 SETBPREF(
"graph.json.usenames",
"true",
"Use names instead of addresses in Global Call Graph (agCj)");
3462 SETI(
"graph.edges", 2,
"0=no edges, 1=simple edges, 2=avoid collisions");
3463 SETI(
"graph.layout", 0,
"Graph layout (0=vertical, 1=horizontal)");
3464 SETI(
"graph.linemode", 1,
"Graph edges (0=diagonal, 1=square)");
3465 SETPREF(
"graph.font",
"Courier",
"Font for dot graphs");
3466 SETBPREF(
"graph.offset",
"false",
"Show offsets in graphs");
3467 SETBPREF(
"graph.bytes",
"false",
"Show opcode bytes in graphs");
3468 SETI(
"graph.from",
UT64_MAX,
"Lower bound address when drawing global graphs");
3469 SETI(
"graph.to",
UT64_MAX,
"Upper bound address when drawing global graphs");
3470 SETI(
"graph.scroll", 5,
"Scroll speed in ascii-art graph");
3471 SETBPREF(
"graph.invscroll",
"false",
"Invert scroll direction in ascii-art graph");
3472 SETPREF(
"graph.title",
"",
"Title of the graph");
3473 SETBPREF(
"graph.body",
"true",
"Show body of the nodes in the graph");
3474 SETBPREF(
"graph.ntitles",
"true",
"Display title of node");
3475 SETPREF(
"graph.gv.node",
"",
"Graphviz node style. (color=gray, style=filled shape=box)");
3476 SETPREF(
"graph.gv.edge",
"",
"Graphviz edge style. (arrowhead=\"vee\")");
3477 SETPREF(
"graph.gv.spline",
"",
"Graphviz spline style. (splines=\"ortho\")");
3478 SETPREF(
"graph.gv.graph",
"",
"Graphviz global style attributes. (bgcolor=white)");
3479 SETPREF(
"graph.gv.current",
"false",
"Highlight the current node in graphviz graph.");
3480 SETBPREF(
"graph.nodejmps",
"true",
"Enables shortcuts for every node.");
3481 SETBPREF(
"graph.hints",
"true",
"Show true (t) and false (f) hints for conditional edges in graph");
3482 SETCB(
"graph.dotted",
"false", &
cb_dotted,
"Dotted lines for conditional jumps in graph");
3485 SETPREF(
"hud.path",
"",
"Set a custom path for the HUD file");
3487 SETCB(
"esil.exectrap",
"false", &
cb_exectrap,
"trap when executing code in non-executable memory");
3488 SETCB(
"esil.iotrap",
"true", &
cb_iotrap,
"invalid read or writes produce a trap exception");
3489 SETBPREF(
"esil.romem",
"false",
"Set memory as read-only for ESIL");
3490 SETBPREF(
"esil.stats",
"false",
"Statistics from ESIL emulation stored in sdb");
3491 SETBPREF(
"esil.nonull",
"false",
"Prevent memory read, memory write at null pointer");
3492 SETCB(
"esil.mdev.range",
"", &
cb_mdevrange,
"Specify a range of memory to be handled by cmd.esil.mdev");
3500 rz_config_desc(cfg,
"scr.fgets",
"Use fgets() instead of dietline for prompt input");
3501 SETCB(
"scr.echo",
"false", &
cb_screcho,
"Show rcons output in realtime to stderr and buffer");
3505 SETCB(
"scr.flush",
"false", &
cb_scrflush,
"Force flush to console in realtime (breaks scripting)");
3506 SETBPREF(
"scr.slow",
"true",
"Do slow stuff on visual mode like RzFlag.get_at(true)");
3510 &scr_vtmode,
"Use VT sequences on Windows (0: Disable, 1: Output, 2: Input & Output)");
3513 SETBPREF(
"scr.responsive",
"true",
"Auto-adjust Visual depending on screen (e.g. unset asm.bytes)");
3514 SETI(
"scr.wheel.speed", 1,
"Mouse wheel speed");
3516 SETBPREF(
"scr.responsive",
"false",
"Auto-adjust Visual depending on screen (e.g. unset asm.bytes)");
3517 SETI(
"scr.wheel.speed", 4,
"Mouse wheel speed");
3519 SETBPREF(
"scr.wheel.nkey",
"false",
"Use sn/sp and scr.nkey on wheel instead of scroll");
3521 SETBPREF(
"scr.wheel",
"true",
"Mouse wheel in Visual; temporaryly disable/reenable by right click/Enter)");
3522 SETPREF(
"scr.layout",
"",
"Name of the selected layout");
3524 SETCB(
"scr.breakword",
"", &
cb_scrbreakword,
"Emulate console break (^C) when a word is printed (useful for pD)");
3525 SETCB(
"scr.breaklines",
"false", &
cb_breaklines,
"Break lines in Visual instead of truncating them");
3527 SETBPREF(
"scr.panelborder",
"false",
"Specify panels border active area (0 by default)");
3529 SETBPREF(
"scr.dumpcols",
"false",
"Prefer pC commands before p ones");
3530 SETCB(
"scr.rows",
"0", &
cb_scrrows,
"Force console row count (height) ");
3531 SETICB(
"scr.rows", 0, &
cb_rows,
"Force console row count (height) (duplicate?)");
3535 SETCB(
"scr.interactive",
"true", &
cb_scrint,
"Start in interactive mode");
3536 SETCB(
"scr.bgfill",
"false", &
cb_scr_bgfill,
"Fill background for ascii art when possible");
3537 SETI(
"scr.feedback", 1,
"Set visual feedback level (1=arrow on jump, 2=every key (useful for videos))");
3538 SETCB(
"scr.html",
"false", &
cb_scrhtml,
"Disassembly uses HTML syntax");
3540 SETDESC(
n,
"Select visual seek mode (affects n/N visual commands)");
3542 SETCB(
"scr.pager",
"", &
cb_pager,
"System program (or '..') to use when output exceeds screen boundaries");
3543 SETI(
"scr.scrollbar", 0,
"Show flagzone (fz) scrollbar in visual mode (0=no,1=right,2=top,3=bottom)");
3544 SETBPREF(
"scr.randpal",
"false",
"Random color palete or just get the next one from 'eco'");
3546 SETBPREF(
"scr.prompt.file",
"false",
"Show user prompt file (used by rizin -q)");
3547 SETBPREF(
"scr.prompt.flag",
"false",
"Show flag name in the prompt");
3548 SETBPREF(
"scr.prompt.flag.only",
"false",
"Show the flag name only in the prompt");
3549 SETBPREF(
"scr.prompt.sect",
"false",
"Show section name in the prompt");
3551 SETCB(
"scr.prompt",
"true", &
cb_scrprompt,
"Show user prompt (used by rizin -q)");
3552 SETCB(
"scr.tee",
"", &
cb_teefile,
"Pipe output to file of this name");
3553 SETPREF(
"scr.seek",
"",
"Seek to the specified address on startup");
3557 SETBPREF(
"scr.color.pipe",
"false",
"Enable colors when using pipes");
3558 SETBPREF(
"scr.color.ops",
"true",
"Colorize numbers and registers in opcodes");
3559 SETBPREF(
"scr.color.args",
"true",
"Colorize arguments and variables of functions");
3560 SETBPREF(
"scr.color.bytes",
"true",
"Colorize bytes that represent the opcodes of the instruction");
3563 SETCB(
"scr.utf8.curvy",
"false", &
cb_utf8_curvy,
"Show curved UTF-8 corners (requires scr.utf8)");
3564 SETBPREF(
"scr.histsave",
"true",
"Always save history on exit");
3566 SETDESC(
n,
"Convert string before display");
3568 SETBPREF(
"scr.confirmquit",
"false",
"Confirm on quit");
3574 "Perform ASCII frequency analysis when looking for false positives during string search");
3577 SETCB(
"search.contiguous",
"true", &
cb_contiguous,
"Accept contiguous/adjacent search hits");
3579 SETI(
"search.chunk", 0,
"Chunk size for /+ (default size is asm.bits/8");
3580 SETI(
"search.esilcombo", 8,
"Stop search after N consecutive hits");
3581 SETI(
"search.distance", 0,
"Search string distance");
3582 SETBPREF(
"search.flags",
"true",
"All search results are flagged, otherwise only printed");
3583 SETBPREF(
"search.overlap",
"false",
"Look for overlapped search hits");
3584 SETI(
"search.maxhits", 0,
"Maximum number of hits (0: no limit)");
3585 SETI(
"search.from", -1,
"Search start address");
3587 SETDESC(
n,
"Specify search boundaries");
3589 "bin.section",
"bin.sections",
"bin.sections.rwx",
"bin.sections.r",
"bin.sections.rw",
"bin.sections.rx",
"bin.sections.wx",
"bin.sections.x",
3590 "io.map",
"io.maps",
"io.maps.rwx",
"io.maps.r",
"io.maps.rw",
"io.maps.rx",
"io.maps.wx",
"io.maps.x",
3591 "dbg.stack",
"dbg.heap",
3592 "dbg.map",
"dbg.maps",
"dbg.maps.rwx",
"dbg.maps.r",
"dbg.maps.rw",
"dbg.maps.rx",
"dbg.maps.wx",
"dbg.maps.x",
3593 "analysis.fcn",
"analysis.bb",
3596 SETPREF(
"search.prefix",
"hit",
"Prefix name in search hits label");
3597 SETBPREF(
"search.show",
"true",
"Show search results");
3598 SETI(
"search.to", -1,
"Search end address");
3601 SETI(
"rop.len", 5,
"Maximum ROP gadget length");
3602 SETBPREF(
"rop.sdb",
"false",
"Cache results in sdb (experimental)");
3603 SETBPREF(
"rop.db",
"true",
"Categorize rop gadgets in sdb");
3604 SETBPREF(
"rop.subchains",
"false",
"Display every length gadget from rop.len=X to 2 in /Rl");
3605 SETBPREF(
"rop.conditional",
"false",
"Include conditional jump, calls and returns in ropsearch");
3606 SETBPREF(
"rop.comments",
"false",
"Display comments in rop search output");
3609 SETCB(
"io.cache",
"false", &
cb_io_cache,
"Change both of io.cache.{read,write}");
3611 SETCB(
"io.cache.read",
"false", &
cb_io_cache_read,
"Enable read cache for vaddr (or paddr when io.va=0)");
3612 SETCB(
"io.cache.write",
"false", &
cb_io_cache_write,
"Enable write cache for vaddr (or paddr when io.va=0)");
3616 SETCB(
"io.ff",
"true", &
cb_ioff,
"Fill invalid buffers with 0xff instead of returning error");
3617 SETBPREF(
"io.exec",
"true",
"See !!rizin -h~-x");
3618 SETICB(
"io.0xff", 0xff, &
cb_io_oxff,
"Use this value instead of 0xff to fill unallocated areas");
3619 SETCB(
"io.aslr",
"false", &
cb_ioaslr,
"Disable ASLR for spawn and such");
3620 SETCB(
"io.va",
"true", &
cb_iova,
"Use virtual address layout");
3621 SETCB(
"io.pava",
"false", &
cb_io_pava,
"Use EXPERIMENTAL paddr -> vaddr address mode");
3622 SETCB(
"io.autofd",
"true", &
cb_ioautofd,
"Change fd when opening a new file");
3627 SETBPREF(
"file.info",
"true",
"RzBin info loaded");
3628 SETPREF(
"file.offset",
"",
"Offset where the file will be mapped at");
3630 SETPREF(
"file.lastpath",
"",
"Path of current file");
3631 SETPREF(
"file.type",
"",
"Type of current file");
3632 SETI(
"file.loadalign", 1024,
"Alignment of load addresses");
3633 SETI(
"file.openmany", 1,
"Maximum number of files opened at once");
3635 SETI(
"magic.depth", 100,
"Recursivity depth in magic description strings");
3638 SETBPREF(
"rap.loop",
"true",
"Run rap as a forever-listening daemon (=:9090)");
3641 SETB(
"basefind.progress",
false,
"Basefind threads progress (true: enable, false: disable)");
3650 SETPREF(
"key.s",
"",
"override step into action");
3651 SETPREF(
"key.S",
"",
"override step over action");
3652 for (
i = 1;
i < 13;
i++) {
3655 "Run this when F%d key is pressed in visual mode",
i);
3657 default:
p =
"";
break;
3664 SETCB(
"zoom.byte",
"h", &
cb_zoombyte,
"Zoom callback to calculate each byte (See pz? for help)");
3665 SETI(
"zoom.from", 0,
"Zoom start address");
3666 SETI(
"zoom.maxsz", 512,
"Zoom max size of block");
3667 SETI(
"zoom.to", 0,
"Zoom end address");
3669 SETDESC(
n,
"Specify boundaries for zoom");
3671 "bin.section",
"bin.sections",
"bin.sections.rwx",
"bin.sections.r",
"bin.sections.rw",
"bin.sections.rx",
"bin.sections.wx",
"bin.sections.x",
3672 "io.map",
"io.maps",
"io.maps.rwx",
"io.maps.r",
"io.maps.rw",
"io.maps.rx",
"io.maps.wx",
"io.maps.x",
3673 "dbg.stack",
"dbg.heap",
3674 "dbg.map",
"dbg.maps",
"dbg.maps.rwx",
"dbg.maps.r",
"dbg.maps.rw",
"dbg.maps.rx",
"dbg.maps.wx",
"dbg.maps.x",
3675 "analysis.fcn",
"analysis.bb",
3679 SETB(
"rzil.step.events.read",
false,
"enables/disables printing aezse read event");
3680 SETB(
"rzil.step.events.write",
true,
"enables/disables printing aezse write event");
3684 SETI(
"flirt.sig.version", 10,
"FLIRT version for sig format");
3686 SETDESC(
n,
"FLIRT file list (comma separated) for sig format");
3687 SETOPTIONS(
n,
"msdos",
"win",
"os2",
"netware",
"unix",
"other",
"all",
"none",
NULL);
3689 SETDESC(
n,
"FLIRT operating system list (comma separated) for sig format");
3691 "aixar",
"aout",
"ar",
"bin",
"coff",
"dos:com",
"dos:com:old",
"dos:exe",
"dos:exe:old",
3692 "dosdrv",
"elf",
"intelhex",
"le",
"loader",
"lx",
"moshex",
"ne",
"nlm",
"omf",
"omflib",
3693 "pe",
"pilot",
"srec",
"w32run",
"zip",
"all",
"none",
NULL);
3694 SETB(
"flirt.sig.deflate",
false,
"enables/disables FLIRT zlib compression when creating a signature file (available only for .sig files)");
3695 SETI(
"flirt.node.optimize",
RZ_FLIRT_NODE_OPTIMIZE_MAX,
"FLIRT optimization option when creating a signature file (none: 0, normal: 1, smallest: 2)");
3696 SETPREF(
"flirt.sigdb.path",
"",
"Additional user defined rizin sigdb location to load on the filesystem.");
3697 SETB(
"flirt.sigdb.load.system",
true,
"Load signatures from the system path");
3698 SETB(
"flirt.sigdb.load.home",
true,
"Load signatures from the home path");
3707 char *homerc =
NULL;
3716 eprintf(
"USER CONFIG loaded from %s\n", homerc);
3724 eprintf(
"USER CONFIG loaded from %s\n", homerc);
3740 eprintf(
"USER CONFIG loaded from %s\n", homerc);
3767 rz_list_foreach (core->config->nodes,
iter, node) {
3772 char *dot = strchr(
name,
'.');
RZ_API ut64 rz_analysis_function_realsize(const RzAnalysisFunction *fcn)
RZ_API void rz_analysis_unset_limits(RzAnalysis *analysis)
RZ_API void rz_analysis_set_cpu(RzAnalysis *analysis, const char *cpu)
RZ_API bool rz_analysis_set_bits(RzAnalysis *analysis, int bits)
RZ_API int rz_analysis_archinfo(RzAnalysis *analysis, int query)
RZ_API void rz_analysis_set_limits(RzAnalysis *analysis, ut64 from, ut64 to)
RZ_API bool rz_analysis_set_reg_profile(RzAnalysis *analysis)
RZ_API int rz_analysis_set_big_endian(RzAnalysis *analysis, int bigend)
RZ_API bool rz_analysis_use(RzAnalysis *analysis, const char *name)
RZ_API bool rz_analysis_set_os(RzAnalysis *analysis, const char *os)
RZ_API int rz_asm_syntax_from_string(const char *name)
RZ_API bool rz_asm_set_big_endian(RzAsm *a, bool b)
RZ_DEPRECATE RZ_API int rz_asm_set_bits(RzAsm *a, int bits)
RZ_API bool rz_asm_set_syntax(RzAsm *a, int syntax)
RZ_DEPRECATE RZ_API void rz_asm_set_cpu(RzAsm *a, const char *cpu)
RZ_API bool rz_asm_use(RzAsm *a, const char *name)
Puts an Asm plugin in use and disables the previous one.
RZ_API bool rz_asm_use_assembler(RzAsm *a, const char *name)
RZ_API void rz_bin_force_plugin(RzBin *bin, const char *name)
RZ_API RzBinFile * rz_bin_cur(RzBin *bin)
RZ_DEPRECATE RZ_API RZ_BORROW RzList * rz_bin_get_sections(RZ_NONNULL RzBin *bin)
int bits(struct state *s, int need)
RZ_API bool rz_bin_object_reset_strings(RZ_NONNULL RzBin *bin, RZ_NONNULL RzBinFile *bf, RZ_NONNULL RzBinObject *obj)
Remove all previously identified strings in the binary object and scan it again for strings.
RZ_API int rz_bp_use(RZ_NONNULL RzBreakpoint *bp, RZ_NONNULL const char *name)
RZ_API void rz_core_analysis_type_init(RzCore *core)
RZ_API void rz_core_analysis_cc_init(RzCore *core)
RZ_API RzCmdStatus rz_core_asm_plugins_print(RzCore *core, const char *arch, RzCmdStateOutput *state)
RZ_API const char * rz_analysis_syscc_default(RzAnalysis *analysis)
RZ_API void rz_analysis_set_syscc_default(RzAnalysis *analysis, const char *cc)
RZ_API const char * rz_analysis_cc_default(RzAnalysis *analysis)
RZ_API void rz_analysis_set_cc_default(RzAnalysis *analysis, const char *cc)
static bool cb_ioaslr(void *user, void *data)
static bool cb_cmd_esil_step_out(void *user, void *data)
static bool cb_analysis_afterjmp(void *user, void *data)
static bool cb_analysissyscc(RzCore *core, RzConfigNode *node)
static bool cb_visual_mode(void *user, void *data)
static bool cb_asmsyntax(void *user, void *data)
static bool cb_hex_section(void *user, void *data)
static bool cb_io_unalloc_ch(void *user, void *data)
static bool cb_analysis_nopskip(void *user, void *data)
static bool cb_analysis_jmptbl(void *user, void *data)
static bool cb_analysis_cpp_abi(void *user, void *data)
static bool cb_scrfgets(void *user, void *data)
static void update_asmparser_options(RzCore *core, RzConfigNode *node)
static bool cb_dotted(void *user, void *data)
static bool cb_analysis_ijmp(void *user, void *data)
static bool cb_strsearch_check_ascii_freq(void *user, void *data)
static bool cb_cmd_esil_intr(void *user, void *data)
static bool cb_dbg_bpinmaps(void *user, void *data)
static bool cb_analysis_armthumb(void *user, void *data)
static bool cb_cfg_fortunes(void *user, void *data)
static bool cb_trace(void *user, void *data)
static bool isGdbPlugin(RzCore *core)
static bool cb_asmfeatures(void *user, void *data)
static bool cb_mdevrange(void *user, void *data)
static bool cb_utf8(void *user, void *data)
static bool cb_binverbose(void *user, void *data)
static bool cb_asmparser(void *user, void *data)
static bool cb_scrlinesleep(void *user, void *data)
RZ_API void rz_core_parse_rizinrc(RzCore *r)
static bool cb_scrbreakword(void *user, void *data)
static bool cb_hex_pairs(void *user, void *data)
static bool cb_dbg_gdb_retries(void *user, void *data)
static bool cb_log_config_traplevel(void *coreptr, void *nodeptr)
static bool cb_analysis_jmptblmaxoffset(void *user, void *data)
static void set_options(RzConfigNode *node,...)
static bool cb_dbgbackend(void *user, void *data)
static bool cb_analysis_roregs(RzCore *core, RzConfigNode *node)
static bool cb_cmd_esil_trap(void *user, void *data)
static bool cb_utf8_curvy(void *user, void *data)
static bool cb_hex_hdroff(void *user, void *data)
static bool cb_scrpagesize(void *user, void *data)
static bool cb_scrhtml(void *user, void *data)
static bool cb_screcho(void *user, void *data)
static bool cb_cfgdatefmt(void *user, void *data)
static bool cb_analysis_ignbithints(void *user, void *data)
static bool cb_analysis_graphdepth(void *user, void *data)
static bool cb_iopcache(void *user, void *data)
static bool cb_asmpseudo(void *user, void *data)
static bool cb_cmd_esil_mdev(void *user, void *data)
static bool cb_contiguous(void *user, void *data)
static bool cb_scr_bgfill(void *user, void *data)
static bool cb_analysis_strings(void *user, void *data)
static bool cb_analysis_jmpretpoline(void *user, void *data)
static bool cb_maxname(void *user, void *data)
static bool cb_strfilter(void *user, void *data)
static bool cb_debase64(void *user, void *data)
static bool cb_binminstr(void *user, void *data)
static bool cb_iopcacheread(void *user, void *data)
static bool cb_scr_gadgets(void *user, void *data)
static bool cb_scrint(void *user, void *data)
static bool cb_scrstrconv(void *user, void *data)
static bool cb_rows(void *user, void *data)
static bool cb_consbreak(void *user, void *data)
static bool cb_hex_style(void *user, void *data)
static bool cb_scrrainbow(void *user, void *data)
static bool cb_analysis_nonull(void *user, void *data)
static bool cb_segoff(void *user, void *data)
static bool boolify_var_cb(void *user, void *data)
static int compareAddress(const RzAnalysisFunction *a, const RzAnalysisFunction *b)
static bool cb_binmaxstr(void *user, void *data)
RZ_API void rz_core_config_print_all(RzConfig *cfg, const char *str, RzCmdStateOutput *state)
Prints the configuation variables with their description and its values.
static bool cb_asmlineswidth(void *user, void *data)
static bool cb_breaklines(void *user, void *data)
static bool cb_runprofile(void *user, void *data)
static bool cb_flag_realnames(void *user, void *data)
static bool cb_analysis_jmpref(void *user, void *data)
static bool cb_hex_header(void *user, void *data)
static bool cb_asmsubvarmin(void *user, void *data)
static bool cb_emustr(void *user, void *data)
static int compareSize(const RzAnalysisFunction *a, const RzAnalysisFunction *b)
static bool cb_cmddepth(void *user, void *data)
static bool cb_asm_pcalign(void *user, void *data)
static bool cb_search_kwidx(void *user, void *data)
static bool cb_dbgbep(void *user, void *data)
static bool cb_teefile(void *user, void *data)
static bool cb_dirtmp(void *user, void *data)
static bool cb_flirt(void *user, void *data)
static bool cb_decoff(void *user, void *data)
RZ_API bool rz_core_esil_cmd(RzAnalysisEsil *esil, const char *cmd, ut64 a1, ut64 a2)
static bool cb_dbg_unlibs(void *user, void *data)
static bool cb_log_config_level(void *coreptr, void *nodeptr)
static bool cb_analysis_limits(void *user, RzConfigNode *node)
static bool cb_asm_invhex(void *user, void *data)
static bool cb_malloc(void *user, void *data)
static bool cb_scr_prompt_mode(void *user, void *data)
static int compareDist(const RzAnalysisFunction *a, const RzAnalysisFunction *b)
static bool cb_dirhome(void *user, void *data)
static bool cb_asm_immhash(void *user, void *data)
static bool cb_tracetag(void *user, void *data)
static bool cb_log_config_colors(void *coreptr, void *nodeptr)
static bool cb_analysis_loads(void *user, void *data)
static bool cb_dbg_btalgo(void *user, void *data)
static bool cb_asmassembler(void *user, void *data)
static bool cb_asmcpu(void *user, void *data)
static bool cb_usextr(void *user, void *data)
static bool cb_hexcompact(void *user, void *data)
static bool cb_fixrows(void *user, void *data)
static bool cb_analysis_vars_stackname(void *user, void *data)
RZ_API int rz_core_config_init(RzCore *core)
static bool cb_scrlast(void *user, void *data)
static bool cb_gotolimit(void *user, void *data)
static bool cb_hexstride(void *user, void *data)
static bool cb_cmd_esil_step(void *user, void *data)
static int __dbg_swstep_getter(void *user, RzConfigNode *node)
static bool cb_cmd_esil_todo(void *user, void *data)
static void update_syscall_ns(RzCore *core)
static bool cb_binstrenc(void *user, void *data)
static bool cb_dbg_trace_continue(void *user, void *data)
static bool cb_searchalign(void *user, void *data)
static void __setsegoff(RzConfig *cfg, const char *asmarch, int asmbits)
static bool cb_analysis_bb_max_size(void *user, void *data)
static bool cb_binforce(void *user, void *data)
static bool cb_analysis_trycatch(void *user, void *data)
static bool cb_dbg_clone(void *user, void *data)
static void update_analysis_arch_options(RzCore *core, RzConfigNode *node)
static void update_asmplatforms_options(RzCore *core, RzConfigNode *node)
static int compareName(const RzAnalysisFunction *a, const RzAnalysisFunction *b)
static bool cb_dbg_follow_child(void *user, void *data)
static bool cb_asmsubsec(void *user, void *data)
static bool cb_scrflush(void *user, void *data)
static bool cb_dbg_forks(void *user, void *data)
static bool cb_dbg_gdb_page_size(void *user, void *data)
static bool cb_iotrap(void *user, void *data)
static bool cb_analysis_norevisit(void *user, void *data)
static bool cb_cfg_fortunes_file(void *user, void *data)
static bool cb_analysis_cpu(void *user, void *data)
static bool cb_dbg_aftersc(void *user, void *data)
static bool cb_esilstackdepth(void *user, void *data)
static bool cb_binmaxstrbuf(void *user, void *data)
static bool cb_io_cache(void *user, void *data)
static bool cb_asmplatform(void *user, void *data)
static bool cb_cfgdebug(void *user, void *data)
static bool cb_analysis_depth(void *user, void *data)
static bool cb_hex_align(void *user, void *data)
static bool cb_strpurge(void *user, void *data)
static bool cb_str_escbslash(void *user, void *data)
static bool cb_analysis_aftertrap(void *user, void *data)
static bool cb_dbg_verbose(void *user, void *data)
static bool cb_hexcols(void *user, void *data)
static int compareType(const RzAnalysisFunction *a, const RzAnalysisFunction *b)
static bool cb_analysis_brokenrefs(void *user, void *data)
static bool cb_analysis_gp(RzCore *core, RzConfigNode *node)
static int compareNameLen(const RzAnalysisFunction *a, const RzAnalysisFunction *b)
static bool cb_graphformat(void *user, void *data)
static bool cb_scrnkey(void *user, void *data)
static bool cb_io_oxff(void *user, void *data)
static bool cb_io_cache_read(void *user, void *data)
static bool cb_swstep(void *user, void *data)
static bool cb_analysis_sleep(void *user, void *data)
static bool cb_scr_color_grep_highlight(void *user, void *data)
static bool cb_analysis_searchstringrefs(void *user, void *data)
static bool cb_cmdrepeat(void *user, void *data)
static bool cb_zoombyte(void *user, void *data)
static bool cb_log_config_srcinfo(void *coreptr, void *nodeptr)
static bool cb_scr_prompt_popup(void *user, void *data)
static bool cb_analysis_pushret(void *user, void *data)
static bool cb_analysis_followdatarefs(void *user, void *data)
static bool cb_analysis_from(RzCore *core, RzConfigNode *node)
static bool cb_io_unalloc(void *user, void *data)
static bool cb_timezone(void *user, void *data)
static void config_print_node(RzConfig *cfg, RzConfigNode *node, RzCmdStateOutput *state)
static bool cb_scrrows(void *user, void *data)
static void update_asmfeatures_options(RzCore *core, RzConfigNode *node)
static bool cb_fixcolumns(void *user, void *data)
static bool cb_scrnull(void *user, void *data)
static bool cb_asmbits(void *user, void *data)
static bool cb_filepath(void *user, void *data)
static bool cb_bigendian(void *user, void *data)
static bool cb_emuskip(void *user, void *data)
static bool cb_seggrn(void *user, void *data)
static bool cb_cmd_hexcursor(void *user, void *data)
static bool cb_analysis_hpskip(void *user, void *data)
static bool cb_iopcachewrite(void *user, void *data)
static bool cb_binfilter(void *user, void *data)
static bool cb_analysis_arch(void *user, void *data)
static bool cb_analysis_recont(void *user, void *data)
static bool cb_searchin(void *user, void *data)
static bool cb_scr_wideoff(void *user, void *data)
static bool cb_bindbginfo(void *user, void *data)
static void update_asmarch_options(RzCore *core, RzConfigNode *node)
static bool cb_io_cache_write(void *user, void *data)
RZ_API RZ_OWN RzList * rz_core_config_in_space(RZ_NONNULL RzCore *core, RZ_NULLABLE const char *space)
Get config variable spaces.
static bool cb_io_pava(void *user, void *data)
static bool cb_completion_maxtab(void *user, void *data)
static bool cb_iova(void *user, void *data)
static bool cb_dbg_create_new_console(void *user, void *data)
static bool cb_ioff(void *user, void *data)
static bool cb_analysis_cjmpref(void *user, void *data)
static bool cb_dbg_execs(void *user, void *data)
static bool cb_asmsubtail(void *user, void *data)
static bool cb_io_cache_mode(void *user, void *data)
static bool cb_analysis_rnr(void *user, RzConfigNode *node)
static bool cb_scrprompt(void *user, void *data)
static void update_asmbits_options(RzCore *core, RzConfigNode *node)
static bool cb_dirsrc(void *user, void *data)
static bool cb_analysis_jmptblmax(void *user, void *data)
static bool cb_asmarch(void *user, void *data)
static bool cb_log_config_file(void *coreptr, void *nodeptr)
static bool cb_binat(void *user, void *data)
static void print_node_options(RzConfigNode *node)
static bool cb_dbg_args(void *user, void *data)
static bool cb_analysis_jmptailcall(void *user, void *data)
static bool cb_scr_color_grep(void *user, void *data)
static bool cb_analysis_delay(void *user, void *data)
static bool cb_hexcomments(void *user, void *data)
static bool cb_binstrings(void *user, void *data)
static bool cb_analysis_maxrefs(void *user, void *data)
static bool cb_color(void *user, void *data)
static bool cb_scr_histblock(void *user, void *data)
static bool cb_midflags(void *user, void *data)
static bool cb_cmd_esil_ioer(void *user, void *data)
static bool cb_analysiscc(RzCore *core, RzConfigNode *node)
static void update_asmcpu_options(RzCore *core, RzConfigNode *node)
static bool cb_hex_ascii(void *user, void *data)
static bool cb_hex_bytes(void *user, void *data)
static bool cb_stopthreads(void *user, void *data)
static bool cb_exectrap(void *user, void *data)
static bool cb_asmos(void *user, void *data)
static bool cb_scr_vi(void *user, void *data)
static bool cb_dbgbtdepth(void *user, void *data)
static bool cb_analysis_jmpmid(void *user, void *data)
static bool cb_log_events(void *user, void *data)
static bool cb_analysis_jmpabove(void *user, void *data)
static bool cb_scrcolumns(void *user, void *data)
static bool cb_dbg_libs(void *user, void *data)
static bool cb_analysis_vars(void *user, void *data)
static bool cb_cmdtimes(void *user, void *data)
static bool cb_ioautofd(void *user, void *data)
static bool cb_esilverbose(void *user, void *data)
static bool cb_color_getter(void *user, RzConfigNode *node)
static bool cb_binprefix(void *user, void *data)
static bool cb_scrhighlight(void *user, void *data)
static bool cb_debug_hitinfo(void *user, void *data)
static bool cb_pager(void *user, void *data)
static bool cb_diff_sort(void *_core, void *_node)
RZ_API RzCmdStatus rz_core_debug_plugins_print(RzCore *core, RzCmdStateOutput *state)
RZ_API int rz_core_block_read(RzCore *core)
RZ_API int rz_core_cmd0(RzCore *core, const char *cmd)
RZ_API int rz_core_cmd_file(RzCore *core, const char *file)
RZ_API int rz_core_cmdf(RzCore *core, const char *fmt,...)
RZ_API bool rz_cmd_state_output_init(RZ_NONNULL RzCmdStateOutput *state, RzOutputMode mode)
Initialize a RzCmdStateOutput structure and its inner fields based on the provided mode.
RZ_API void rz_cmd_state_output_fini(RZ_NONNULL RzCmdStateOutput *state)
Clear the inner fields of RzCmdStateOutput structure, but do not free it.
RZ_API void rz_cmd_state_output_print(RZ_NONNULL RzCmdStateOutput *state)
Print the output accumulated in state to RzCons, if necessary.
RZ_API char * rz_cmd_escape_arg(const char *arg, RzCmdEscape esc)
RZ_API char * rz_core_theme_get(RzCore *core)
RZ_API bool rz_core_theme_load(RzCore *core, const char *name)
RZ_API ut64 rz_config_get_i(RzConfig *cfg, RZ_NONNULL const char *name)
RZ_API bool rz_config_get_b(RzConfig *cfg, RZ_NONNULL const char *name)
RZ_API RzConfigNode * rz_config_set(RzConfig *cfg, RZ_NONNULL const char *name, const char *value)
RZ_API bool rz_config_set_getter(RzConfig *cfg, const char *key, RzConfigCallback cb)
RZ_API RZ_BORROW RzConfigNode * rz_config_node_get(RzConfig *cfg, RZ_NONNULL const char *name)
RZ_API RzConfigNode * rz_config_set_i(RzConfig *cfg, RZ_NONNULL const char *name, const ut64 i)
RZ_API RzConfigNode * rz_config_set_cb(RzConfig *cfg, const char *name, const char *value, RzConfigCallback cb)
RZ_API RZ_BORROW const char * rz_config_get(RzConfig *cfg, RZ_NONNULL const char *name)
RZ_API const char * rz_config_node_type(RzConfigNode *node)
RZ_API const char * rz_config_desc(RzConfig *cfg, RZ_NONNULL const char *name, RZ_NULLABLE const char *desc)
RZ_API RzConfig * rz_config_new(void *user)
RZ_API void rz_config_lock(RzConfig *cfg, int l)
RZ_API RzConfigNode * rz_config_set_b(RzConfig *cfg, RZ_NONNULL const char *name, bool value)
RZ_API void rz_config_node_value_format_i(char *buf, size_t buf_size, const ut64 i, RZ_NULLABLE RzConfigNode *node)
RZ_API void rz_cons_set_utf8(bool b)
RZ_API void rz_cons_breakword(RZ_NULLABLE const char *s)
RZ_API int rz_cons_get_size(int *rows)
RZ_API RzCons * rz_cons_singleton(void)
RZ_API void rz_cons_highlight(const char *word)
RZ_API int rz_cons_printf(const char *format,...)
RZ_API void rz_cons_println(const char *str)
RZ_IPI void rz_core_types_calling_conventions_print(RzCore *core, RzOutputMode mode)
RZ_API bool rz_cons_is_utf8(void)
static static fork const void static count static fd const char const char static newpath const char static path const char path
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags static arg static fd static protocol static who struct sockaddr static addrlen static backlog struct timeval struct timezone static tz const struct iovec static count static mode const void const struct sockaddr static tolen const char static pathname void static offset struct stat static buf void long static basep static whence static length const void static len static semflg const void static shmflg const struct timespec req
static static sync static getppid static getegid const char static filename char argp
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags cmd
RZ_API bool rz_egg_setup(RzEgg *egg, const char *arch, int bits, int endian, const char *os)
checking print the parsed form of the magic use in n conjunction with m to debug a new magic file n before installing it n output MIME type special files
static const struct @646 features[]
RZ_API void rz_core_fortune_list(RzCore *core)
RZ_API void rz_core_fortune_list_types(void)
struct platform platforms[]
RZ_API void Ht_() free(HtName_(Ht) *ht)
RZ_API int rz_core_fgets(char *buf, int len, void *user)
RZ_API int rz_debug_attach(RzDebug *dbg, int pid)
RZ_API bool rz_debug_set_arch(RzDebug *dbg, const char *arch, int bits)
RZ_API bool rz_debug_select(RzDebug *dbg, int pid, int tid)
static void list(RzEgg *egg)
RZ_API RZ_BORROW RzListIter * rz_list_find(RZ_NONNULL const RzList *list, const void *p, RZ_NONNULL RzListComparator cmp)
Returns RzListIter element which matches via the RzListComparator.
RZ_API RZ_OWN RzList * rz_list_new(void)
Returns a new initialized RzList pointer (free method is not initialized)
RZ_API ut32 rz_list_length(RZ_NONNULL const RzList *list)
Returns the length of the list.
RZ_API RZ_BORROW RzListIter * rz_list_append(RZ_NONNULL RzList *list, void *data)
Appends at the end of the list a new element.
RZ_API void rz_list_free(RZ_NONNULL RzList *list)
Empties the list and frees the list pointer.
RZ_API void rz_list_purge(RZ_NONNULL RzList *list)
Empties the list without freeing the list pointer.
RZ_API RzLine * rz_line_singleton(void)
return strdup("=SP r13\n" "=LR r14\n" "=PC r15\n" "=A0 r0\n" "=A1 r1\n" "=A2 r2\n" "=A3 r3\n" "=ZF zf\n" "=SF nf\n" "=OF vf\n" "=CF cf\n" "=SN or0\n" "gpr lr .32 56 0\n" "gpr pc .32 60 0\n" "gpr cpsr .32 64 0 ____tfiae_________________qvczn\n" "gpr or0 .32 68 0\n" "gpr tf .1 64.5 0 thumb\n" "gpr ef .1 64.9 0 endian\n" "gpr jf .1 64.24 0 java\n" "gpr qf .1 64.27 0 sticky_overflow\n" "gpr vf .1 64.28 0 overflow\n" "gpr cf .1 64.29 0 carry\n" "gpr zf .1 64.30 0 zero\n" "gpr nf .1 64.31 0 negative\n" "gpr itc .4 64.10 0 if_then_count\n" "gpr gef .4 64.16 0 great_or_equal\n" "gpr r0 .32 0 0\n" "gpr r1 .32 4 0\n" "gpr r2 .32 8 0\n" "gpr r3 .32 12 0\n" "gpr r4 .32 16 0\n" "gpr r5 .32 20 0\n" "gpr r6 .32 24 0\n" "gpr r7 .32 28 0\n" "gpr r8 .32 32 0\n" "gpr r9 .32 36 0\n" "gpr r10 .32 40 0\n" "gpr r11 .32 44 0\n" "gpr r12 .32 48 0\n" "gpr r13 .32 52 0\n" "gpr r14 .32 56 0\n" "gpr r15 .32 60 0\n" "gpr r16 .32 64 0\n" "gpr r17 .32 68 0\n")
RZ_API int sdb_ns_set(Sdb *s, const char *name, Sdb *r)
RZ_API bool sdb_ns_unset(Sdb *s, const char *name, Sdb *r)
RZ_API void rz_cons_pal_update_event(void)
RZ_API void rz_cons_pal_random(void)
RZ_API bool rz_parse_use(RzParse *p, const char *name)
RZ_API bool rz_debug_use(RzDebug *dbg, const char *str)
RZ_API void rz_print_set_flags(RzPrint *p, int _flags)
#define RZ_ANALYSIS_ARCHINFO_ALIGN
@ RZ_ANALYSIS_CPP_ABI_ITANIUM
@ RZ_ANALYSIS_CPP_ABI_MSVC
#define rz_warn_if_reached()
#define rz_return_if_fail(expr)
#define rz_return_val_if_fail(expr, val)
#define RZ_BASEFIND_BASE_MAX_ADDRESS
#define RZ_BASEFIND_STRING_MIN_LENGTH
#define RZ_BASEFIND_SCORE_MIN_VALUE
#define RZ_BASEFIND_BASE_MIN_ADDRESS
#define RZ_BASEFIND_BASE_ALIGNMENT
#define RZ_BIN_REQ_STRINGS
@ RZ_CMD_ESCAPE_ONE_ARG
The string should be escaped so that it appears as one single argument.
#define SETBPREF(x, y, z)
#define SETOPTIONS(x,...)
#define SETCB(w, x, y, z)
static bool rz_config_node_is_ro(RzConfigNode *node)
#define SETICB(w, x, y, z)
bool(* RzConfigCallback)(void *user, void *data)
@ RZ_VIRT_TERM_MODE_COMPLETE
All the sequences goes through VT (Windows Terminal, mintty, all OSs)
@ RZ_VIRT_TERM_MODE_OUTPUT_ONLY
Windows only: Use console c api for input, but output on VT (Windows >= 10)
@ RZ_VIRT_TERM_MODE_DISABLE
Windows only: Use console c api for everything (Windows <= 8)
@ RZ_CORE_VISUAL_MODE_CD
Print in string format.
@ RZ_CORE_VISUAL_MODE_PX
Hexadecimal view.
RZ_API const char * rz_file_basename(const char *path)
RZ_API char * rz_file_tmpdir(void)
RZ_API bool rz_file_is_directory(const char *str)
RZ_API bool rz_file_exists(const char *str)
RZ_API bool rz_file_is_regular(const char *str)
@ RZ_FLIRT_NODE_OPTIMIZE_MAX
optimize the tree structure and drops the tail bytes
#define RZ_FLIRT_LIBRARY_NAME_DFL
RZ_API char * rz_io_system(RzIO *io, const char *cmd)
RZ_API int rz_io_fd_get_tid(RzIO *io, int fd)
RZ_API int rz_io_fd_get_pid(RzIO *io, int fd)
RZ_API void rz_io_desc_cache_fini_all(RzIO *io)
int(* RzListComparator)(const void *value, const void *list_data)
RZ_API void rz_log_set_file(const char *filename)
RZ_API void rz_log_set_level(RzLogLevel level)
RZ_API void rz_log_set_traplevel(RzLogLevel level)
#define RZ_DEFAULT_LOGLVL
RZ_API void rz_log_set_srcinfo(bool show_info)
RZ_API void rz_log_set_colors(bool show_colors)
RZ_API bool rz_name_filter(char *name, int len, bool strict)
RZ_API ut64 rz_num_math(RzNum *num, const char *str)
RZ_API RZ_OWN char * rz_path_home_config_rc(void)
Return the path of the rizinrc file in the home config directory.
RZ_API RZ_OWN char * rz_path_home_prefix(RZ_NULLABLE const char *path)
Return path prefixed by the home prefix.
RZ_API RZ_OWN char * rz_path_system(RZ_NULLABLE const char *path)
Return the full system path of the given subpath path.
RZ_API RZ_OWN char * rz_path_prefix(RZ_NULLABLE const char *path)
Return path prefixed by the Rizin install prefix.
RZ_API RZ_OWN char * rz_path_home_config_rcdir(void)
Return the home directory of config rizinrc.d.
RZ_API RZ_OWN char * rz_path_home_rc(void)
Return the path of the rizinrc file in the home directory.
RZ_API PJ * pj_ka(PJ *j, const char *k)
RZ_API PJ * pj_kb(PJ *j, const char *k, bool v)
RZ_API PJ * pj_end(PJ *j)
RZ_API PJ * pj_s(PJ *j, const char *k)
RZ_API PJ * pj_ks(PJ *j, const char *k, const char *v)
RZ_API PJ * pj_kn(PJ *j, const char *k, ut64 n)
#define RZ_PRINT_FLAGS_BGFILL
#define RZ_PRINT_FLAGS_SECSUB
#define RZ_PRINT_FLAGS_ADDRDEC
#define RZ_PRINT_FLAGS_ALIGN
#define RZ_PRINT_FLAGS_NONHEX
#define RZ_PRINT_FLAGS_RAINBOW
#define RZ_PRINT_FLAGS_HDROFF
#define RZ_PRINT_FLAGS_COLOR
#define RZ_PRINT_FLAGS_NONASCII
#define RZ_PRINT_FLAGS_COMMENT
#define RZ_PRINT_FLAGS_HEADER
#define RZ_PRINT_FLAGS_SEGOFF
#define RZ_PRINT_FLAGS_STYLE
#define RZ_PRINT_FLAGS_SECTION
#define RZ_PRINT_FLAGS_COMPACT
#define RZ_PRINT_FLAGS_UNALLOC
#define RZ_STR_ISNOTEMPTY(x)
RZ_API bool rz_str_is_false(const char *s)
RZ_API bool rz_str_cmp_list(const char *list, const char *item, char sep)
RZ_API char * rz_str_newf(const char *fmt,...) RZ_PRINTF_CHECK(1
RZ_API bool rz_str_is_true(const char *s)
RZ_API RZ_OWN char * rz_str_escape(RZ_NONNULL const char *buf)
RZ_API const char * rz_str_bool(int b)
RZ_API void rz_str_case(char *str, bool up)
RZ_API RzList * rz_str_split_duplist(const char *str, const char *c, bool trim)
Split the string str according to the substring c and returns a RzList with the result.
#define RZ_STR_ISEMPTY(x)
RZ_API void rz_str_filter(char *str)
Convert all non-printable characters in str with '.'.
RZ_API bool rz_str_isnumber(const char *str)
RZ_API bool rz_str_is_bool(const char *val)
RZ_API bool rz_str_startswith(RZ_NONNULL const char *str, RZ_NONNULL const char *needle)
Checks if a string starts with a specifc sequence of characters (case sensitive)
RZ_API const char * rz_str_word_get0(const char *str, int idx)
RZ_API size_t rz_str_split(char *str, char ch)
Split string str in place by using ch as a delimiter.
RZ_API char * rz_sys_getenv(const char *key)
Get the value of an environment variable named key or NULL if none exists.
RZ_API int rz_sys_setenv(const char *key, const char *value)
Set an environment variable in the calling process.
RZ_API char * rz_sys_whoami(char *buf)
RZ_API bool rz_sys_getenv_asbool(const char *key)
Return true if the environment variable has the value 1, false otherwise.
RZ_API RzList * rz_sys_dir(const char *path)
#define RZ_THREAD_POOL_ALL_CORES
RzOutputMode
Enum to describe the way data are printed.
@ RZ_OUTPUT_MODE_LONG_JSON
@ RZ_OUTPUT_MODE_STANDARD
#define RZ_SDB_ARCH_PLATFORMS
bool(* cmd)(ANALYSIS_ESIL *esil, const char *name, ut64 a0, ut64 a1)
RzListComparator columnSort
RzPlatformTarget * arch_target
struct rz_analysis_plugin_t * cur
struct rz_analysis_esil_t * esil
RzPlatformTargetIndex * platform_target
XX curplugin == o->plugin.
bool strseach_check_ascii_freq
Represent the output state of a command handler.
bool show_autocomplete_widget
int(* user_fgets)(char *buf, int len, void *user)
RzCoreVisualMode printidx
int hitinfo
XXX: MUST SET ///.
struct rz_io_plugin_t * plugin
struct rz_io_desc_t * desc
RzLineCompletion completion
const char * strconv_mode
RZ_API bool rz_syscall_setup(RzSyscall *s, const char *arch, int bits, const char *cpu, const char *os)
RZ_API void rz_type_db_set_endian(RzTypeDB *typedb, bool big_endian)
Set the RzType target architecture CPU.
#define ENABLE_VIRTUAL_TERMINAL_PROCESSING
ut64(WINAPI *w32_GetEnabledXStateFeatures)()
static bool input(void *ud, zip_uint8_t *data, zip_uint64_t length)