Improve and formalize r_name_check() along all the base ##core (#18020)

This commit is contained in:
pancake 2020-12-16 14:49:50 +01:00 committed by GitHub
parent b462a7691c
commit aaa930ab26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
46 changed files with 567 additions and 422 deletions

View File

@ -82,23 +82,19 @@ static void print_string(RBinFile *bf, RBinString *string, int raw, PJ *pj) {
}
break;
case R_MODE_RADARE: {
char *f_name, *nstr;
f_name = strdup (string->string);
r_name_filter (f_name, 512);
char *f_name = strdup (string->string);
r_name_filter (f_name, 32);
if (bin->prefix) {
nstr = r_str_newf ("%s.str.%s", bin->prefix, f_name);
io->cb_printf ("f %s.str.%s %u @ 0x%08"PFMT64x"\n"
"Cs %u @ 0x%08"PFMT64x"\n",
bin->prefix, f_name, string->size, addr,
string->size, addr);
} else {
nstr = r_str_newf ("str.%s", f_name);
io->cb_printf ("f str.%s %u @ 0x%08"PFMT64x"\n"
"Cs %u @ 0x%08"PFMT64x"\n",
f_name, string->size, addr,
string->size, addr);
}
free (nstr);
free (f_name);
break;
}

View File

@ -1,4 +1,4 @@
/* radare - LGPL - Copyright 2014 - inisider */
/* radare - LGPL - Copyright 2014-2020 - inisider */
#include <r_pdb.h>
#include <r_bin.h>
@ -1390,7 +1390,7 @@ static void print_gvars(RPdb *pdb, ut64 img_base, PJ *pj, int format) {
case 1:
case '*':
case 'r':
filtered_name = r_name_filter2 (name);
filtered_name = r_name_filter2 (r_str_trim_head_ro (name));
pdb->cb_printf ("f pdb.%s = 0x%" PFMT64x " # %d %.*s\n",
filtered_name,
(ut64) (img_base + omap_remap ((omap) ? (omap->stream) : 0, gdata->offset + sctn_header->virtual_address)),

View File

@ -424,21 +424,16 @@ static void _print_strings(RCore *r, RList *list, int mode, int va) {
}
}
if (IS_MODE_SET (mode)) {
char *f_name, *str;
if (r_cons_is_breaked ()) {
break;
}
r_meta_set (r->anal, R_META_TYPE_STRING, vaddr, string->size, string->string);
f_name = strdup (string->string);
r_name_filter (f_name, -1);
if (r->bin->prefix) {
str = r_str_newf ("%s.str.%s", r->bin->prefix, f_name);
} else {
str = r_str_newf ("str.%s", f_name);
}
char *str = (r->bin->prefix)
? r_str_newf ("%s.str.%s", r->bin->prefix, string->string)
: r_str_newf ("str.%s", string->string);
r_name_filter (str, -1);
(void)r_flag_set (r->flags, str, vaddr, string->size);
free (str);
free (f_name);
} else if (IS_MODE_SIMPLE (mode)) {
r_cons_printf ("0x%"PFMT64x" %d %d %s\n", vaddr,
string->size, string->length, string->string);
@ -482,17 +477,15 @@ static void _print_strings(RCore *r, RList *list, int mode, int va) {
}
pj_end (pj);
} else if (IS_MODE_RAD (mode)) {
char *f_name = strdup (string->string);
r_name_filter (f_name, R_FLAG_NAME_SIZE);
char *str = (r->bin->prefix)
? r_str_newf ("%s.str.%s", r->bin->prefix, f_name)
: r_str_newf ("str.%s", f_name);
? r_str_newf ("%s.str.%s", r->bin->prefix, string->string)
: r_str_newf ("str.%s", string->string);
r_name_filter (str, R_FLAG_NAME_SIZE);
r_cons_printf ("f %s %u 0x%08"PFMT64x"\n"
"Cs %u @ 0x%08"PFMT64x"\n",
str, string->size, vaddr,
string->size, vaddr);
free (str);
free (f_name);
} else {
int *block_list;
char *str = string->string;
@ -1640,13 +1633,11 @@ static void set_bin_relocs(RCore *r, RBinReloc *reloc, ut64 addr, Sdb **db, char
r_name_filter (flagname, 0);
RFlagItem *fi = r_flag_set (r->flags, flagname, addr, bin_reloc_size (reloc));
if (demname) {
char *realname;
if (r->bin->prefix) {
realname = sdb_fmt ("%s.reloc.%s", r->bin->prefix, demname);
} else {
realname = sdb_fmt ("reloc.%s", demname);
}
char *realname = (r->bin->prefix)
? r_str_newf ("%s.reloc.%s", r->bin->prefix, demname)
: r_str_newf ("%s", demname);
r_flag_item_set_realname (fi, realname);
free (realname);
}
free (demname);
}
@ -2358,9 +2349,9 @@ static int bin_symbols(RCore *r, int mode, ut64 laddr, int va, ut64 at, const ch
RFlagItem *fi = r_flag_get (r->flags, sn.methflag);
if (r->bin->prefix) {
char *prname = r_str_newf ("%s.%s", r->bin->prefix, sn.methflag);
r_name_filter (sn.methflag, -1);
free (sn.methflag);
sn.methflag = prname;
r_name_filter (sn.methflag, -1);
}
if (fi) {
r_flag_item_set_realname (fi, sn.methname);
@ -2653,7 +2644,7 @@ static bool io_create_mem_map(RIO *io, RBinSection *sec, ut64 at) {
static void add_section(RCore *core, RBinSection *sec, ut64 addr, int fd) {
if (!r_io_desc_get (core->io, fd) || UT64_ADD_OVFCHK (sec->size, sec->paddr) ||
UT64_ADD_OVFCHK (sec->size, addr) || !sec->vsize) {
UT64_ADD_OVFCHK (sec->size, addr) || !sec->vsize) {
return;
}
@ -2664,7 +2655,6 @@ static void add_section(RCore *core, RBinSection *sec, ut64 addr, int fd) {
if (!io_create_mem_map (core->io, sec, addr + sec->size)) {
return;
}
size = sec->size;
}
@ -2673,7 +2663,7 @@ static void add_section(RCore *core, RBinSection *sec, ut64 addr, int fd) {
if (!map_name) {
return;
}
r_name_filter (map_name, R_FLAG_NAME_SIZE);
int perm = sec->perm;
// workaround to force exec bit in text section
if (sec->name && strstr (sec->name, "text")) {
@ -2696,7 +2686,7 @@ struct io_bin_section_info_t {
};
/* Map Sections to Segments https://github.com/radareorg/radare2/issues/14647 */
static int bin_map_sections_to_segments (RBin *bin, int mode) {
static int bin_map_sections_to_segments(RBin *bin, int mode) {
RListIter *iter, *iter2;
RBinSection *section = NULL, *segment = NULL;
RList *sections = r_list_new ();
@ -2865,7 +2855,6 @@ static int bin_sections(RCore *r, int mode, ut64 laddr, int va, ut64 at, const c
continue;
}
r_name_filter (section->name, strlen (section->name) + 1);
if (at != UT64_MAX && (!section->size || !is_in_range (at, addr, section->size))) {
continue;
}
@ -2907,9 +2896,12 @@ static int bin_sections(RCore *r, int mode, ut64 laddr, int va, ut64 at, const c
bits = R_SYS_BITS;
}
if (IS_MODE_RAD (mode)) {
char *n = __filterQuotedShell (section->name);
r_cons_printf ("\"f %s.%s 1 0x%08"PFMT64x"\"\n", type, n, section->vaddr);
char *name = r_str_newf ("%s.%s", type, section->name);
r_name_filter (name, -1);
char *n = __filterQuotedShell (name); // unnecessary because the flag is filterd already
r_cons_printf ("\"f %s 1 0x%08"PFMT64x"\"\n", name, section->vaddr);
free (n);
free (name);
} else if (IS_MODE_SET (mode)) {
#if LOAD_BSS_MALLOC
if (!strcmp (section->name, ".bss")) {
@ -2935,11 +2927,11 @@ static int bin_sections(RCore *r, int mode, ut64 laddr, int va, ut64 at, const c
}
}
if (r->bin->prefix) {
str = r_str_newf ("%s.%s.%s", r->bin->prefix, type, section->name);
str = r_str_newf ("%s.%s.%s", r->bin->prefix, type, name);
} else {
str = r_str_newf ("%s.%s", type, section->name);
}
r_name_filter (str, R_FLAG_NAME_SIZE);
ut64 size = r->io->va? section->vsize: section->size;
r_flag_set (r->flags, str, addr, size);
R_FREE (str);

View File

@ -811,20 +811,24 @@ rep:
}
break;
case 'a':
if (input[1] == ' '){
if (input[1] == ' ') {
RFlagItem *fi;
R_FREE (str);
str = strdup (input+2);
ptr = strchr (str, '=');
if (!ptr)
if (!ptr) {
ptr = strchr (str, ' ');
if (ptr) *ptr++ = 0;
}
if (ptr) {
*ptr++ = 0;
}
name = (char *)r_str_trim_head_ro (str);
ptr = (char *)r_str_trim_head_ro (ptr);
fi = r_flag_get (core->flags, name);
if (!fi)
if (!fi) {
fi = r_flag_set (core->flags, name,
core->offset, 1);
}
if (fi) {
r_flag_item_set_alias (fi, ptr);
} else {
@ -992,6 +996,10 @@ rep:
}
}
if (addFlag) {
if (!r_name_check (cstr)) {
eprintf ("Invalid flag name '%s'.\n", cstr);
return false;
}
item = r_flag_set (core->flags, cstr, off, bsze);
}
if (item && comment) {
@ -1618,7 +1626,9 @@ rep:
case '?':
default:
if (input[1]) {
core->num->value = r_flag_get (core->flags, input + 1)? 1: 0;
const char *arg = r_str_trim_head_ro (input + 1);
RFlagItem *fi = r_flag_get (core->flags, arg);
core->num->value = fi? 1: 0;
} else {
r_core_cmd_help (core, help_msg_f);
break;

View File

@ -689,17 +689,23 @@ static void cmd_open_map(RCore *core, const char *input) {
switch (words) {
case 6:
name = r_str_word_get0 (s, 5);
case 5: //this sucks
// fallthrough
case 5:
rwx = r_str_rwx (r_str_word_get0 (s, 4));
rwx_arg = true;
// fallthrough
case 4:
paddr = r_num_math (core->num, r_str_word_get0 (s, 3));
// fallthrough
case 3:
size = r_num_math (core->num, r_str_word_get0 (s, 2));
// fallthrough
case 2:
vaddr = r_num_math (core->num, r_str_word_get0 (s, 1));
// fallthrough
case 1:
fd = r_num_math (core->num, r_str_word_get0 (s, 0));
break;
}
if (fd < 3) {
eprintf ("wrong fd, it must be greater than 3\n");

View File

@ -641,6 +641,19 @@ static void __cmd_pad(RCore *core, const char *arg) {
}
}
static void first_flag_chars(const char *name, char *ch, char *ch2) {
name = r_name_filter_ro (name);
// name = "ab"; // r_name_filter_ro (name);
/*
while (*name == '_') {
name++;
}
*/
const bool two = name[0] && name[1];
*ch = two? name[0]: ' ';
*ch2 = two? name[1]: name[0]; // two? 1: 0];
}
// colordump
static void cmd_prc(RCore *core, const ut8* block, int len) {
const char *chars = " .,:;!O@#";
@ -708,13 +721,7 @@ static void cmd_prc(RCore *core, const ut8* block, int len) {
if (show_flags) {
RFlagItem *fi = r_flag_get_i (core->flags, core->offset + j);
if (fi) {
if (fi->name[1]) {
ch = fi->name[0];
ch2 = fi->name[1];
} else {
ch = ' ';
ch2 = fi->name[0];
}
first_flag_chars (fi->name, &ch, &ch2);
} else {
ch2 = ch;
}
@ -1800,7 +1807,8 @@ static void annotated_hexdump(RCore *core, const char *str, int len) {
fend = addr + j + flag->size;
}
free (note[j]);
note[j] = r_str_prepend (strdup (flag->name), "/");
const char *name = r_name_filter_ro (flag->name);
note[j] = r_str_prepend (strdup (name), "/");
marks = true;
color_idx++;
color_idx %= 10;
@ -1953,7 +1961,7 @@ static void annotated_hexdump(RCore *core, const char *str, int len) {
out[out_sz - 1] = 0;
if (hasline) {
r_cons_strcat (addrpad);
r_cons_strcat (out);
r_cons_strcat (out + 1);
r_cons_newline ();
}
marks = false;

View File

@ -763,10 +763,13 @@ static ut64 num_callback(RNum *userptr, const char *str, int *ok) {
return fcn->addr;
}
return 0;
default:
eprintf ("Invalid variable '%s'\n", str);
return 0;
}
break;
default:
if (*str >= 'A') {
if (*str >= 'A' || *str == ':' || *str == '_') {
// NOTE: functions override flags
RAnalFunction *fcn = r_anal_get_function_byname (core->anal, str);
if (fcn) {

View File

@ -722,6 +722,11 @@ R_API RFlagItem *r_flag_set(RFlag *f, const char *name, ut64 off, ut32 size) {
if (!itemname) {
return NULL;
}
// this should never happen because the name is filtered before..
if (!r_name_check (itemname)) {
eprintf ("Invalid flag name '%s'\n", name);
return NULL;
}
RFlagItem *item = r_flag_get (f, itemname);
free (itemname);

View File

@ -5,10 +5,14 @@
extern "C" {
#endif
R_API bool r_name_check(const char *name);
R_API bool r_name_filter(char *name, int len);
R_API char *r_name_filter2(const char *name);
R_API bool r_name_validate_print(const char ch);
R_API bool r_name_validate_char(const char ch);
R_API bool r_name_validate_first(const char ch);
R_API bool r_name_check(const char *s);
R_API const char *r_name_filter_ro(const char *a);
R_API bool r_name_filter_flag(char *s);
R_API bool r_name_filter(char *name, int maxlen);
R_API char *r_name_filter2(const char *name);
#ifdef __cplusplus
}

View File

@ -1,4 +1,4 @@
/* radare2 - LGPL - Copyright 2017-2019 - condret, MaskRay */
/* radare2 - LGPL - Copyright 2017-2020 - condret, MaskRay */
#include <r_io.h>
#include <stdlib.h>
@ -318,9 +318,7 @@ R_API void r_io_map_fini(RIO* io) {
}
R_API void r_io_map_set_name(RIOMap* map, const char* name) {
if (!map || !name) {
return;
}
r_return_if_fail (map && name);
free (map->name);
map->name = strdup (name);
}

View File

@ -233,7 +233,7 @@ static int cin_get_num(RNum *num, RNumCalc *nc, RNumCalcValue *n) {
char c;
str[0] = 0;
while (cin_get (num, nc, &c)) {
if (c != '_' && c!=':' && c!='.' && !isalnum ((ut8)c)) {
if (c != '_' && c != ':' && c != '.' && !isalnum ((ut8)c)) {
cin_putback (num, nc, c);
break;
}

View File

@ -1,103 +1,159 @@
/* radare - LGPL - Copyright 2009-2019 - pancake */
/* radare - LGPL - Copyright 2009-2020 - pancake */
#include <r_util.h>
R_API bool r_name_validate_char(const char ch) {
if ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || (IS_DIGIT(ch))) {
/* Validate if char is printable , why not use ISPRINTABLE() ?? */
R_API bool r_name_validate_print(const char ch) {
if ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || IS_DIGIT (ch)) {
return true;
}
switch (ch) {
case ':':
case '(':
case ')':
case '[':
case ']':
case '<':
case '+':
case '-':
case '>':
case '$':
case '%':
case '@':
case ' ':
case '.':
case ',':
case ':':
case '_':
return true;
case '\b':
case '\t':
case '\n':
case '\r':
// must be replaced with ' ' and trimmed later
return false;
}
return false;
}
// used to determine if we want to replace those chars with '_' in r_name_filter()
R_API bool r_name_validate_dash(const char ch) {
switch (ch) {
case ' ':
case '-':
case '_':
case '/':
case '\\':
case '(':
case ')':
case '[':
case ']':
case '<':
case '>':
case '!':
case '?':
case '$':
case ';':
case '%':
case '@':
case '`':
case ',':
case '"':
return true;
}
return false;
}
R_API bool r_name_validate_char(const char ch) {
if ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || IS_DIGIT (ch)) {
return true;
}
switch (ch) {
case '.':
case ':':
case '_':
return true;
}
return false;
}
R_API bool r_name_check(const char *name) {
/* Cannot start by number */
if (!name || !*name || IS_DIGIT (*name)) {
R_API bool r_name_validate_first(const char ch) {
if ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z')) {
return true;
}
switch (ch) {
case '_':
case ':':
return true;
}
return false;
}
R_API bool r_name_check(const char *s) {
if (!r_name_validate_first (*s)) {
return false;
}
/* Cannot contain non-alphanumeric chars + [:._] */
for (; *name != '\0'; name++) {
if (!r_name_validate_char (*name)) {
for (s++; *s; s++) {
if (!r_name_validate_char (*s)) {
return false;
}
}
return true;
}
static inline bool is_special_char (char *name) {
const char n = *name;
static inline bool is_special_char(char n) {
return (n == 'b' || n == 'f' || n == 'n' || n == 'r' || n == 't' || n == 'v' || n == 'a');
}
R_API bool r_name_filter(char *name, int maxlen) {
size_t i, len;
if (!name) {
return false;
R_API const char *r_name_filter_ro(const char *a) {
while (*a++ == '_');
return a - 1;
}
R_API bool r_name_filter(char *s, int maxlen) {
// if maxlen == -1 : R_FLAG_NAME_SIZE
// maxlen is ignored, the function signature must change
if (maxlen > 0) {
int slen = strlen (s);
if (slen > maxlen) {
s[maxlen] = 0;
}
}
if (maxlen < 0) {
maxlen = strlen (name);
}
r_str_trim (name);
char *oname = name;
for (i = 0; *name; name++, i++) {
if (maxlen && i > maxlen) {
*name = '\0';
char *os = s;
while (*s) {
if (r_name_validate_first (*s)) {
break;
}
if (!r_name_validate_char (*name) && *name != '\\') {
*name = '_';
// r_str_ccpy (name, name+1, 0);
//name--;
if (r_name_validate_dash (*s)) {
*s = '_';
break;
}
r_str_cpy (s, s + 1);
}
for (s++; *s; s++) {
if (*s == '\\') {
if (is_special_char (s[1])) {
*s = '_';
} else {
r_str_cpy (s, s + 1);
s--;
}
}
if (!r_name_validate_char (*s)) {
if (r_name_validate_dash (*s)) {
*s = '_';
} else {
r_str_cpy (s, s + 1);
s--;
}
}
}
while (i > 0) {
if (*(name - 1) == '\\' && is_special_char (name)) {
*name = '_';
*(name - 1) = '_';
}
if (*name == '\\') {
*name = '_';
}
name--;
i--;
}
if (*name == '\\') {
*name = '_';
}
// trimming trailing and leading underscores
len = strlen (name);
for (; len > 0 && *(name + len - 1) == '_'; len--) {
;
}
if (!len) { // name consists only of underscores
return r_name_check (oname);
}
for (i = 0; *(name + i) == '_'; i++, len--) {
;
}
memmove (name, name + i, len);
*(name + len) = '\0';
return r_name_check (oname);
r_str_trim (os);
return r_name_check (os);
}
R_API char *r_name_filter2(const char *name) {
size_t i;
while (!r_name_validate_char (*name)) {
name++;
}
char *res = strdup (name);
for (i = 0; res[i]; i++) {
if (!r_name_validate_char (res[i])) {
res[i] = '_';
}
}
for (i--; i != 0 && res[i] == '_'; i--) {
res[i] = '\0';
}
return res;
char *s = strdup (name);
r_name_filter (s, -1);
return s;
}

View File

@ -1950,6 +1950,8 @@ static char o[COLORIZE_BUFSIZE];
static bool issymbol(char c) {
switch (c) {
case '$':
case ':':
case '+':
case '-':
/* case '/': not good for dalvik */
@ -1971,7 +1973,7 @@ static bool issymbol(char c) {
}
}
static bool check_arg_name (RPrint *print, char *p, ut64 func_addr) {
static bool check_arg_name(RPrint *print, char *p, ut64 func_addr) {
if (func_addr && print->exists_var) {
int z;
for (z = 0; p[z] && (isalpha (p[z]) || isdigit (p[z]) || p[z] == '_'); z++) {
@ -2260,7 +2262,7 @@ R_API int r_print_jsondump(RPrint *p, const ut8 *buf, int len, int wordsize) {
return words;
}
R_API void r_print_hex_from_bin (RPrint *p, char *bin_str) {
R_API void r_print_hex_from_bin(RPrint *p, char *bin_str) {
int i, j, index;
RPrint myp = {.cb_printf = libc_printf};
const int len = strlen (bin_str);

View File

@ -1,4 +1,4 @@
/* radare - LGPL - Copyright 2007-2019 - pancake */
/* radare - LGPL - Copyright 2007-2020 - pancake */
#if __WINDOWS__
#include <stdlib.h>

View File

@ -1067,7 +1067,7 @@ CMDS=<<EOF
aav
aae
af
axt str.helloradareworld
axt str.helloradareworld_n
EOF
EXPECT=<<EOF
main 0xbf9c [DATA] add r0, pc

View File

@ -403,7 +403,7 @@ fcn.1000b540:
sym.imp.calloc
sym._init:
loc.imp.__gmon_start
loc.imp.__gmon_start__
fcn.100015e0
fcn.100264c0

View File

@ -1209,7 +1209,7 @@ afx
EOF
EXPECT=<<EOF
d 0x00401006 -> 0x0040d004 mov eax, dword [0x40d004]
s 0x00401010 -> 0x0040b9a0 0x6c6c6568 hell @ str.hello ascii ('h')
s 0x00401010 -> 0x0040b9a0 0x6c6c6568 hell @ str.hello_n ascii ('h')
C 0x00401015 -> 0x004010e4 call fcn.004010e4
d 0x0040101e -> 0x0040b9a8 push 0x40b9a8
C 0x00401023 -> 0x004010c7 call fcn.004010c7

View File

@ -538,7 +538,7 @@ EXPECT=<<EOF
| 0x004873ab 74db je 0x487388
| ----------- true: 0x00487388 false: 0x004873ad
| 0x004873ad 488b7708 mov rsi, qword [rdi + 8]
| 0x004873b1 488d3dd03502. lea rdi, str.closing_file__s__direct_opencount__u
| 0x004873b1 488d3dd03502. lea rdi, str._nclosing_file_s__direct_opencount_u_n
| 0x004873b8 31c0 xor eax, eax
| 0x004873ba e9b16cffff jmp fcn.0047e070
| ----------- true: 0x0047e070
@ -894,7 +894,7 @@ Current section
nth paddr size vaddr vsize perm name
------------------------------------------------
0 0x00000188 0x24 0x08048188 0x24 -r-- .note.gnu.build_id
0 0x00000188 0x24 0x08048188 0x24 -r-- .note.gnu.build-id
Current section
@ -1114,7 +1114,7 @@ EXPECT=<<EOF
| ,===< 0x000113e0 jle 0x11424
| ||| 0x000113e2 lea rsi, [rax - 6]
| ||| 0x000113e6 mov ecx, 7
| ||| 0x000113eb lea rdi, [rip + 0x7ebb] ; str..libs
| ||| 0x000113eb lea rdi, [rip + 0x7ebb] ; str._.libs_
| ||| ; 0x192ad ; "/.libs/"
| ||| 0x000113f2 repe cmpsb byte [rsi], byte ptr [rdi]
| ,====< 0x000113f4 jne 0x11424
@ -1459,7 +1459,7 @@ EXPECT=<<EOF
| ; var HANDLE hTemplateFile @ rsp+0x30
| 0x14000b54c 4883ec48 sub rsp, 0x48
| 0x14000b550 488364243000 and qword [hTemplateFile], 0 ; HANDLE hTemplateFile
| 0x14000b556 488d0da37300. lea rcx, str.CONOUT ; 0x140012900 ; u"CONOUT$" ; LPCWSTR lpFileName
| 0x14000b556 488d0da37300. lea rcx, str.CONOUT_ ; 0x140012900 ; u"CONOUT$" ; LPCWSTR lpFileName
| 0x14000b55d 8364242800 and dword [dwFlagsAndAttributes], 0 ; DWORD dwFlagsAndAttributes
| 0x14000b562 41b803000000 mov r8d, 3 ; DWORD dwShareMode
| 0x14000b568 4533c9 xor r9d, r9d ; LPSECURITY_ATTRIBUTES lpSecurityAttributes
@ -1736,7 +1736,7 @@ fastcall
| 0x0804843b ff7508 push dword [arg_8h]
| 0x0804843e ff75f0 push dword [var_10h]
| 0x08048441 ff75f4 push dword [var_ch]
| 0x08048444 6874850408 push str.i__i__i ; 0x8048574 ; "%i %i %i\n"
| 0x08048444 6874850408 push str._i__i__i_n ; 0x8048574 ; "%i %i %i\n"
| 0x08048449 e8a2feffff call sym.imp.printf ; int printf(const char *format)
| 0x0804844e 83c410 add esp, 0x10
| 0x08048451 90 nop
@ -1778,7 +1778,7 @@ cdecl
| 0x08048470 ff7510 push dword [arg_10h]
| 0x08048473 ff75f0 push dword [var_10h]
| 0x08048476 ff75f4 push dword [var_ch]
| 0x08048479 6874850408 push str.i__i__i ; 0x8048574 ; "%i %i %i\n"
| 0x08048479 6874850408 push str._i__i__i_n ; 0x8048574 ; "%i %i %i\n"
| 0x0804847e e86dfeffff call sym.imp.printf
| 0x08048483 83c410 add esp, 0x10
| 0x08048486 90 nop
@ -2049,10 +2049,10 @@ e anal.arch = x86
e scr.color=false
e scr.wheel = false
aa
axt @ str.Password:
axt @ str.Password:_
EOF
EXPECT=<<EOF
main 0x804843c [DATA] mov dword [esp], str.Password:
main 0x804843c [DATA] mov dword [esp], str.Password:_
EOF
RUN
@ -2164,10 +2164,8 @@ s 0x804848a
axf
EOF
EXPECT=<<EOF
sym.test 0x804848a [DATA] mov dword [esp], str.Sdvvzrug_RN
sym.test 0x804848a [DATA] mov dword [esp], str.Sdvvzrug_RN
d 0x80485fe str.Sdvvzrug_RN
d 0x80485fe str.Sdvvzrug_RN
d 0x80485fe str.SdvvzrugRN____
d 0x80485fe str.SdvvzrugRN____
EOF
RUN
@ -2248,13 +2246,13 @@ axt 0x00001df4
axt 0x00001e09
EOF
EXPECT=<<EOF
main 0x1457 [STRING] lea eax, str.Take_the_Red_Pill
main 0x148e [STRING] lea eax, str.use:_._exploit1_PILL
main 0x14eb [STRING] lea eax, str.Red_Pill__0x50444552
main 0x1502 [STRING] lea eax, str.Your_Pill_0x_08x
main 0x1523 [STRING] lea eax, str.Red_Pill
main 0x1557 [STRING] lea eax, str.fwhibbit
main 0x161d [STRING] lea eax, str.Blue_Pill
main 0x1457 [STRING] lea eax, str._Take_the_Red_Pill____n
main 0x148e [STRING] lea eax, str._use:_._exploit1_PILL_
main 0x14eb [STRING] lea eax, str._____Red_Pill__0x50444552
main 0x1502 [STRING] lea eax, str._____Your_Pill_0x_08x_n
main 0x1523 [STRING] lea eax, str._n__Red_Pill
main 0x1557 [STRING] lea eax, str.__fwhibbit
main 0x161d [STRING] lea eax, str._n__Blue_Pill
EOF
RUN
@ -2298,7 +2296,7 @@ aae
axt@0x80484e0
EOF
EXPECT=<<EOF
main 0x8048432 [STRING] lea eax, str.Hello_PIC
main 0x8048432 [STRING] lea eax, str.Hello_PIC_
EOF
RUN
@ -2351,7 +2349,7 @@ aae
pd 1 @ 0x08048432
EOF
EXPECT=<<EOF
| 0x08048432 8d83e0e4ffff lea eax, str.Hello_PIC ; 0x80484e0 ; "Hello PIC!"
| 0x08048432 8d83e0e4ffff lea eax, str.Hello_PIC_ ; 0x80484e0 ; "Hello PIC!"
EOF
RUN
@ -2367,7 +2365,7 @@ aae
pd 1 @ 0x08048432
EOF
EXPECT=<<EOF
| 0x08048432 lea eax, str.Hello_PIC
| 0x08048432 lea eax, str.Hello_PIC_
EOF
RUN

View File

@ -34,7 +34,7 @@ NAME=dmh/dmha with memory dump
FILE=bins/heap/linux_glibc-2.30_x64.bin
ARGS=-n
CMDS=<<EOF
#re-map arena and [heap]
# re-map arena and [heap]
om 3 0x7ffff7f8a000 0x898 0x0 rw- arena
om 3 0x555555559000 0x3200 0x898 rw- [heap]
@ -55,7 +55,7 @@ NAME=dmht with memory dump
FILE=bins/heap/linux_glibc-2.30_x64.bin
ARGS=-n
CMDS=<<EOF
#re-map arena and [heap]
# re-map arena and heap
om 3 0x7ffff7f8a000 0x898 0x0 rw- arena
om 3 0x555555559000 0x3200 0x898 rw- [heap]

View File

@ -7,18 +7,18 @@ EOF
EXPECT=<<EOF
Vtable Found at 0x00400ce8
0x00400ce8 : method.A.greet
0x00400cf0 : method.C.printValue
0x00400ce8 : method.A.greet__
0x00400cf0 : method.C.printValue__
Vtable Found at 0x00400d08
0x00400d08 : method.A.greet
0x00400d10 : method.B.printValue
0x00400d08 : method.A.greet__
0x00400d10 : method.B.printValue__
Vtable Found at 0x00400d28
0x00400d28 : method.A.greet
0x00400d30 : method.A.printValue
0x00400d28 : method.A.greet__
0x00400d30 : method.A.printValue__
EOF
RUN

View File

@ -1,3 +1,34 @@
NAME=f_123
FILE=-
CMDS=<<EOF
f _foo=123
f _123=_foo
f :123=321
f 123=456
f $123=456
f $foo=456
?v _foo
?v _123
?v :123
?v 123
?v $foo
?v $foo
EOF
EXPECT=<<EOF
0x7b
0x7b
0x141
0x7b
0xffffffffffffffff
0xffffffffffffffff
EOF
EXPECT_ERR=<<EOF
Invalid flag name '123'.
Invalid flag name '$123'.
Invalid flag name '$foo'.
EOF
RUN
NAME=f?flag
FILE=-
CMDS=<<EOF

View File

@ -2,12 +2,12 @@ NAME=fnj shows demangled symbols
FILE=bins/elf/demangle-test-cpp
CMDS=<<EOF
aaa
fj~{269}
fnj~{269}
fj~{258}
fnj~{258}
EOF
EXPECT=<<EOF
{"name":"reloc.operator_delete_void","realname":"reloc.operator delete(void*)","size":8,"offset":16432}
{"name":"reloc.operator_delete_void","realname":"reloc.operator delete(void*)","size":8,"offset":16432}
{"name":"reloc.std::__throw_length_error_char_const_","realname":"std::__throw_length_error(char const*)","size":8,"offset":16424}
{"name":"reloc.std::__throw_length_error_char_const_","realname":"std::__throw_length_error(char const*)","size":8,"offset":16424}
EOF
RUN

View File

@ -20,10 +20,10 @@ vaddr name
0x004003a8 .init
0x00400260 .gnu.hash
0x00400200 .interp
0x0040021c .note.ABI_tag
0x0040021c .note.ABI-tag
0x00400328 .gnu.version_r
0x00000000 .comment
0x0040023c .note.gnu.build_id
0x0040023c .note.gnu.build-id
0x006008d0 .got.plt
0x004005d0 .eh_frame_hdr
0x004002e0 .dynstr
@ -998,7 +998,7 @@ FILE=bins/elf/libmagic.so
CMDS=ic*
EXPECT=<<EOF
fs classes
"f class.JNIEnv = 0x6060"
"f class._JNIEnv = 0x6060"
"f method._JNIEnv.FindClass(char_const*) = 0x6060"
"f method._JNIEnv.DeleteLocalRef(_jobject*) = 0x606a"
"f method._JNIEnv.NewObject(_jclass*,__jmethodID*,_...) = 0x6074"
@ -1039,20 +1039,20 @@ fs classes
"f method.std::bad_exception.~bad_exception() = 0x889c"
"f method.std::bad_exception.what()_const = 0x8904"
"td struct std::bad_exception { char empty[0];};"
"f class.cxxabiv1::__forced_unwind = 0x88c4"
"f class.__cxxabiv1::__forced_unwind = 0x88c4"
"f method.__cxxabiv1::__forced_unwind.~__forced_unwind() = 0x88c4"
"td struct __cxxabiv1::__forced_unwind { char empty[0];};"
"f class.cxxabiv1::__foreign_exception = 0x88dc"
"f class.__cxxabiv1::__foreign_exception = 0x88dc"
"f method.__cxxabiv1::__foreign_exception.~__foreign_exception() = 0x88dc"
"td struct __cxxabiv1::__foreign_exception { char empty[0];};"
"f class.eh_globals_init = 0x8984"
"f class.__eh_globals_init = 0x8984"
"f method.__eh_globals_init.~__eh_globals_init() = 0x8984"
"td struct __eh_globals_init { char empty[0];};"
"f class.cxxabiv1 = 0x943c"
"f class.__cxxabiv1 = 0x943c"
"f method.__cxxabiv1.__terminate(void_(*)()) = 0x943c"
"f method.__cxxabiv1.__unexpected(void_(*)()) = 0x9488"
"td struct __cxxabiv1 { char empty[0];};"
"f class.cxxabiv1::__fundamental_type_info = 0x94e4"
"f class.__cxxabiv1::__fundamental_type_info = 0x94e4"
"f method.__cxxabiv1::__fundamental_type_info.~__fundamental_type_info() = 0x94e4"
"td struct __cxxabiv1::__fundamental_type_info { char empty[0];};"
"f class.std::type_info = 0x97bc"
@ -1063,23 +1063,23 @@ fs classes
"f method.std::type_info.__do_upcast(__cxxabiv1::__class_type_info_const*,_void**)_const = 0x97e4"
"f method.std::type_info.operator==(std::type_info_const&)_const = 0x9808"
"td struct std::type_info { char empty[0];};"
"f class.cxxabiv1::__pointer_type_info = 0x9528"
"f class.__cxxabiv1::__pointer_type_info = 0x9528"
"f method.__cxxabiv1::__pointer_type_info.__is_pointer_p()_const = 0x9528"
"f method.__cxxabiv1::__pointer_type_info.~__pointer_type_info() = 0x9530"
"f method.__cxxabiv1::__pointer_type_info.__pointer_catch(__cxxabiv1::__pbase_type_info_const*,_void**,_unsigned_int)_const = 0x9574"
"td struct __cxxabiv1::__pointer_type_info { char empty[0];};"
"f class.cxxabiv1::__pbase_type_info = 0x9dd0"
"f class.__cxxabiv1::__pbase_type_info = 0x9dd0"
"f method.__cxxabiv1::__pbase_type_info.~__pbase_type_info() = 0x9df0"
"f method.__cxxabiv1::__pbase_type_info.__do_catch(std::type_info_const*,_void**,_unsigned_int)_const = 0x9e34"
"f method.__cxxabiv1::__pbase_type_info.__pointer_catch(__cxxabiv1::__pbase_type_info_const*,_void**,_unsigned_int)_const = 0x9dd0"
"td struct __cxxabiv1::__pbase_type_info { char empty[0];};"
"f class.cxxabiv1::__si_class_type_info = 0x95f4"
"f class.__cxxabiv1::__si_class_type_info = 0x95f4"
"f method.__cxxabiv1::__si_class_type_info.~__si_class_type_info() = 0x95f4"
"f method.__cxxabiv1::__si_class_type_info.__do_find_public_src(int,_void_const*,___cxxabiv1::__class_type_info_const*,_void_const*)_const = 0x9638"
"f method.__cxxabiv1::__si_class_type_info.__do_dyncast(int,___cxxabiv1::__class_type_info::__sub_kind,___cxxabiv1::__class_type_info_const*,_void_const*,___cxxabiv1::__class_type_info_const*,_void_const*,___cxxabiv1::__class_type_info::__dyncast_result&)_const = 0x969c"
"f method.__cxxabiv1::__si_class_type_info.__do_upcast(__cxxabiv1::__class_type_info_const*,_void_const*,___cxxabiv1::__class_type_info::__upcast_result&)_const = 0x977c"
"td struct __cxxabiv1::__si_class_type_info { char empty[0];};"
"f class.cxxabiv1::__class_type_info = 0x9868"
"f class.__cxxabiv1::__class_type_info = 0x9868"
"f method.__cxxabiv1::__class_type_info.~__class_type_info() = 0x98d8"
"f method.__cxxabiv1::__class_type_info.__do_upcast(__cxxabiv1::__class_type_info_const*,_void_const*,___cxxabiv1::__class_type_info::__upcast_result&)_const = 0x991c"
"f method.__cxxabiv1::__class_type_info.__do_catch(std::type_info_const*,_void**,_unsigned_int)_const = 0x9948"
@ -1087,16 +1087,16 @@ fs classes
"f method.__cxxabiv1::__class_type_info.__do_find_public_src(int,_void_const*,___cxxabiv1::__class_type_info_const*,_void_const*)_const = 0x98c4"
"f method.__cxxabiv1::__class_type_info.__do_dyncast(int,___cxxabiv1::__class_type_info::__sub_kind,___cxxabiv1::__class_type_info_const*,_void_const*,___cxxabiv1::__class_type_info_const*,_void_const*,___cxxabiv1::__class_type_info::__dyncast_result&)_const = 0x998c"
"td struct __cxxabiv1::__class_type_info { char empty[0];};"
"f class.gnu_cxx = 0x9ec4"
"f class.__gnu_cxx = 0x9ec4"
"f method.__gnu_cxx.__verbose_terminate_handler() = 0x9ec4"
"f method.__gnu_cxx.__throw_concurrence_lock_error() = 0x12780"
"f method.__gnu_cxx.__throw_concurrence_unlock_error() = 0x127c8"
"td struct __gnu_cxx { char empty[0];};"
"f class.gnu_cxx::__concurrence_lock_error = 0x126b0"
"f class.__gnu_cxx::__concurrence_lock_error = 0x126b0"
"f method.__gnu_cxx::__concurrence_lock_error.what()_const = 0x126b0"
"f method.__gnu_cxx::__concurrence_lock_error.~__concurrence_lock_error() = 0x126f8"
"td struct __gnu_cxx::__concurrence_lock_error { char empty[0];};"
"f class.gnu_cxx::__concurrence_unlock_error = 0x126c0"
"f class.__gnu_cxx::__concurrence_unlock_error = 0x126c0"
"f method.__gnu_cxx::__concurrence_unlock_error.what()_const = 0x126c0"
"f method.__gnu_cxx::__concurrence_unlock_error.~__concurrence_unlock_error() = 0x126d0"
"td struct __gnu_cxx::__concurrence_unlock_error { char empty[0];};"
@ -2672,8 +2672,8 @@ nth paddr size vaddr vsize perm name
-------------------------------------------------
0 0x00000000 0x0 0x00000000 0x0 ----
1 0x00000134 0x13 0x08048134 0x13 -r-- .interp
2 0x00000148 0x20 0x08048148 0x20 -r-- .note.ABI_tag
3 0x00000168 0x24 0x08048168 0x24 -r-- .note.gnu.build_id
2 0x00000148 0x20 0x08048148 0x20 -r-- .note.ABI-tag
3 0x00000168 0x24 0x08048168 0x24 -r-- .note.gnu.build-id
4 0x0000018c 0x20 0x0804818c 0x20 -r-- .gnu.hash
5 0x000001ac 0x50 0x080481ac 0x50 -r-- .dynsym
6 0x000001fc 0x4a 0x080481fc 0x4a -r-- .dynstr
@ -2729,7 +2729,7 @@ NAME=iSj
FILE=bins/elf/analysis/x86-helloworld-gcc
CMDS=iSj
EXPECT=<<EOF
[{"name":"","size":0,"vsize":0,"perm":"----","paddr":0,"vaddr":0},{"name":".interp","size":19,"vsize":19,"perm":"-r--","paddr":308,"vaddr":134512948},{"name":".note.ABI_tag","size":32,"vsize":32,"perm":"-r--","paddr":328,"vaddr":134512968},{"name":".note.gnu.build_id","size":36,"vsize":36,"perm":"-r--","paddr":360,"vaddr":134513000},{"name":".gnu.hash","size":32,"vsize":32,"perm":"-r--","paddr":396,"vaddr":134513036},{"name":".dynsym","size":80,"vsize":80,"perm":"-r--","paddr":428,"vaddr":134513068},{"name":".dynstr","size":74,"vsize":74,"perm":"-r--","paddr":508,"vaddr":134513148},{"name":".gnu.version","size":10,"vsize":10,"perm":"-r--","paddr":582,"vaddr":134513222},{"name":".gnu.version_r","size":32,"vsize":32,"perm":"-r--","paddr":592,"vaddr":134513232},{"name":".rel.dyn","size":8,"vsize":8,"perm":"-r--","paddr":624,"vaddr":134513264},{"name":".rel.plt","size":24,"vsize":24,"perm":"-r--","paddr":632,"vaddr":134513272},{"name":".init","size":35,"vsize":35,"perm":"-r-x","paddr":656,"vaddr":134513296},{"name":".plt","size":64,"vsize":64,"perm":"-r-x","paddr":704,"vaddr":134513344},{"name":".text","size":404,"vsize":404,"perm":"-r-x","paddr":768,"vaddr":134513408},{"name":".fini","size":20,"vsize":20,"perm":"-r-x","paddr":1172,"vaddr":134513812},{"name":".rodata","size":21,"vsize":21,"perm":"-r--","paddr":1192,"vaddr":134513832},{"name":".eh_frame_hdr","size":44,"vsize":44,"perm":"-r--","paddr":1216,"vaddr":134513856},{"name":".eh_frame","size":176,"vsize":176,"perm":"-r--","paddr":1260,"vaddr":134513900},{"name":".init_array","size":4,"vsize":4,"perm":"-rw-","paddr":1436,"vaddr":134518172},{"name":".fini_array","size":4,"vsize":4,"perm":"-rw-","paddr":1440,"vaddr":134518176},{"name":".jcr","size":4,"vsize":4,"perm":"-rw-","paddr":1444,"vaddr":134518180},{"name":".dynamic","size":232,"vsize":232,"perm":"-rw-","paddr":1448,"vaddr":134518184},{"name":".got","size":4,"vsize":4,"perm":"-rw-","paddr":1680,"vaddr":134518416},{"name":".got.plt","size":24,"vsize":24,"perm":"-rw-","paddr":1684,"vaddr":134518420},{"name":".data","size":8,"vsize":8,"perm":"-rw-","paddr":1708,"vaddr":134518444},{"name":".bss","size":0,"vsize":4,"perm":"-rw-","paddr":1716,"vaddr":134518452},{"name":".comment","size":17,"vsize":17,"perm":"----","paddr":1716,"vaddr":0},{"name":".shstrtab","size":262,"vsize":262,"perm":"----","paddr":1733,"vaddr":0},{"name":".symtab","size":1104,"vsize":1104,"perm":"----","paddr":3196,"vaddr":0},{"name":".strtab","size":599,"vsize":599,"perm":"----","paddr":4300,"vaddr":0}]
[{"name":"","size":0,"vsize":0,"perm":"----","paddr":0,"vaddr":0},{"name":".interp","size":19,"vsize":19,"perm":"-r--","paddr":308,"vaddr":134512948},{"name":".note.ABI-tag","size":32,"vsize":32,"perm":"-r--","paddr":328,"vaddr":134512968},{"name":".note.gnu.build-id","size":36,"vsize":36,"perm":"-r--","paddr":360,"vaddr":134513000},{"name":".gnu.hash","size":32,"vsize":32,"perm":"-r--","paddr":396,"vaddr":134513036},{"name":".dynsym","size":80,"vsize":80,"perm":"-r--","paddr":428,"vaddr":134513068},{"name":".dynstr","size":74,"vsize":74,"perm":"-r--","paddr":508,"vaddr":134513148},{"name":".gnu.version","size":10,"vsize":10,"perm":"-r--","paddr":582,"vaddr":134513222},{"name":".gnu.version_r","size":32,"vsize":32,"perm":"-r--","paddr":592,"vaddr":134513232},{"name":".rel.dyn","size":8,"vsize":8,"perm":"-r--","paddr":624,"vaddr":134513264},{"name":".rel.plt","size":24,"vsize":24,"perm":"-r--","paddr":632,"vaddr":134513272},{"name":".init","size":35,"vsize":35,"perm":"-r-x","paddr":656,"vaddr":134513296},{"name":".plt","size":64,"vsize":64,"perm":"-r-x","paddr":704,"vaddr":134513344},{"name":".text","size":404,"vsize":404,"perm":"-r-x","paddr":768,"vaddr":134513408},{"name":".fini","size":20,"vsize":20,"perm":"-r-x","paddr":1172,"vaddr":134513812},{"name":".rodata","size":21,"vsize":21,"perm":"-r--","paddr":1192,"vaddr":134513832},{"name":".eh_frame_hdr","size":44,"vsize":44,"perm":"-r--","paddr":1216,"vaddr":134513856},{"name":".eh_frame","size":176,"vsize":176,"perm":"-r--","paddr":1260,"vaddr":134513900},{"name":".init_array","size":4,"vsize":4,"perm":"-rw-","paddr":1436,"vaddr":134518172},{"name":".fini_array","size":4,"vsize":4,"perm":"-rw-","paddr":1440,"vaddr":134518176},{"name":".jcr","size":4,"vsize":4,"perm":"-rw-","paddr":1444,"vaddr":134518180},{"name":".dynamic","size":232,"vsize":232,"perm":"-rw-","paddr":1448,"vaddr":134518184},{"name":".got","size":4,"vsize":4,"perm":"-rw-","paddr":1680,"vaddr":134518416},{"name":".got.plt","size":24,"vsize":24,"perm":"-rw-","paddr":1684,"vaddr":134518420},{"name":".data","size":8,"vsize":8,"perm":"-rw-","paddr":1708,"vaddr":134518444},{"name":".bss","size":0,"vsize":4,"perm":"-rw-","paddr":1716,"vaddr":134518452},{"name":".comment","size":17,"vsize":17,"perm":"----","paddr":1716,"vaddr":0},{"name":".shstrtab","size":262,"vsize":262,"perm":"----","paddr":1733,"vaddr":0},{"name":".symtab","size":1104,"vsize":1104,"perm":"----","paddr":3196,"vaddr":0},{"name":".strtab","size":599,"vsize":599,"perm":"----","paddr":4300,"vaddr":0}]
EOF
RUN
@ -2747,8 +2747,8 @@ CMDS=iSq
EXPECT=<<EOF
0x0 0x0 ----
0x8048134 0x8048147 -r-- .interp
0x8048148 0x8048168 -r-- .note.ABI_tag
0x8048168 0x804818c -r-- .note.gnu.build_id
0x8048148 0x8048168 -r-- .note.ABI-tag
0x8048168 0x804818c -r-- .note.gnu.build-id
0x804818c 0x80481ac -r-- .gnu.hash
0x80481ac 0x80481fc -r-- .dynsym
0x80481fc 0x8048246 -r-- .dynstr
@ -3119,8 +3119,8 @@ nth paddr size vaddr vsize perm name
-------------------------------------------------
0 0x00000000 0x0 0x00000000 0x0 ----
1 0x00000200 0x1a 0x00400200 0x1a -r-- .interp
2 0x0000021c 0x20 0x0040021c 0x20 -r-- .note.ABI_tag
3 0x0000023c 0x24 0x0040023c 0x24 -r-- .note.gnu.build_id
2 0x0000021c 0x20 0x0040021c 0x20 -r-- .note.ABI-tag
3 0x0000023c 0x24 0x0040023c 0x24 -r-- .note.gnu.build-id
4 0x00000260 0x1c 0x00400260 0x1c -r-- .gnu.hash
5 0x00000280 0x60 0x00400280 0x60 -r-- .dynsym
6 0x000002e0 0x3d 0x004002e0 0x3d -r-- .dynstr
@ -3382,7 +3382,7 @@ izzz*~:0
izzz*~:1
EOF
EXPECT=<<EOF
f str.8 10 @ 0x00000034
f str._8_b_ 10 @ 0x00000034
Cs 10 @ 0x00000034
EOF
RUN
@ -3863,7 +3863,7 @@ nth paddr size vaddr vsize perm entropy name
------------------------------------------------------------
0 0x00000000 0x0 0x00000000 0x0 ---- 0.00000000
1 0x00000154 0x13 0x08048154 0x13 -r-- 3.68188080 .interp
2 0x00000168 0x20 0x08048168 0x20 -r-- 1.74868984 .note.ABI_tag
2 0x00000168 0x20 0x08048168 0x20 -r-- 1.74868984 .note.ABI-tag
3 0x00000188 0x38 0x08048188 0x38 -r-- 1.23442903 .hash
4 0x000001c0 0x20 0x080481c0 0x20 -r-- 1.99254169 .gnu.hash
5 0x000001e0 0x90 0x080481e0 0x90 -r-- 1.56755604 .dynsym
@ -3949,7 +3949,7 @@ vaddr paddr type name
0x00000000 52 segment.ehdr
0x00000000 16 loc.imp._ITM_deregisterTMCloneTable
0x00000000 16 sym.imp.__cxa_finalize
0x00000000 16 loc.imp.__gmon_start
0x00000000 16 loc.imp.__gmon_start__
0x00000000 16 loc.imp._Jv_RegisterClasses
0x00000000 16 loc.imp._ITM_registerTMCloneTable
0x00000034 288 segment.PHDR
@ -3969,7 +3969,7 @@ vaddr paddr type name
0x00001ef8 240 segment.DYNAMIC
0x00001fe8 4 reloc._ITM_deregisterTMCloneTable
0x00001fec 4 reloc.__cxa_finalize
0x00001ff0 4 reloc.__gmon_start
0x00001ff0 4 reloc.__gmon_start__
0x00001ff8 4 reloc._Jv_RegisterClasses
0x00001ffc 4 reloc._ITM_registerTMCloneTable
0x00002000 16 section..got.plt
@ -4282,9 +4282,12 @@ RUN
NAME=izzz*
FILE=bins/mach0/fatmach0-3true
CMDS=izzz*~str.http:__www.apple.com_appleca_codesigning.crl0
CMDS=izzz*~appleca
EXPECT=<<EOF
f str.http:__www.apple.com_appleca_codesigning.crl0 48 @ 0x00002f3c
f str._http:__www.apple.com_appleca_ro 41 @ 0x00002562
f str.https:__www.apple.com_appleca_0 32 @ 0x00002963
f str.http:__www.apple.com_appleca_0 31 @ 0x00002e47
f str._http:__www.apple.com_appleca_co 48 @ 0x00002f3c
EOF
RUN

View File

@ -7,7 +7,7 @@ fi 1 @ 0x00401010
EOF
EXPECT=<<EOF
0x00401000 4096 section..text
0x00401000 0 pdb.void___cdecl_SomeCoolFunction_void
0x00401000 0 pdb.void___cdecl_SomeCoolFunction_void_
0x00401010 0 pdb._main
EOF
RUN

View File

@ -711,10 +711,10 @@ e asm.cmt.right=false
pd 1 @ 0x0001145f
EOF
EXPECT=<<EOF
0x0001145f 488d3d72a100. lea rdi, str.A_NULL_argv_0__was_passed_through_an_exec_system_call. ; 0x1b5d8 ; "A NULL argv[0] was passed through an exec system call.\n"
0x0001145f 488d3d72a100. lea rdi, str.A_NULL_argv_0__was_passed_through_an_exec_system_call._n ; 0x1b5d8 ; "A NULL argv[0] was passed through an exec system call.\n"
; 0x1b5d8
; "A NULL argv[0] was passed through an exec system call.\n"
0x0001145f 488d3d72a100. lea rdi, str.A_NULL_argv_0__was_passed_through_an_exec_system_call.
0x0001145f 488d3d72a100. lea rdi, str.A_NULL_argv_0__was_passed_through_an_exec_system_call._n
EOF
RUN
@ -745,10 +745,10 @@ e asm.cmt.right=false
pd 1 @ 0x004010f0
EOF
EXPECT=<<EOF
0x004010f0 68b8214000 push str.Number_of_CPU__d ; 0x4021b8 ; u"Number of CPU %d\n"
0x004010f0 68b8214000 push str.Number_of_CPU__d_n ; 0x4021b8 ; u"Number of CPU %d\n"
; 0x4021b8
; u"Number of CPU %d\n"
0x004010f0 68b8214000 push str.Number_of_CPU__d
0x004010f0 68b8214000 push str.Number_of_CPU__d_n
EOF
RUN
@ -814,7 +814,7 @@ e asm.sub.names=false
pd 1 @ 0x0001145f
EOF
EXPECT=<<EOF
0x0001145f lea rdi, str.A_NULL_argv_0__was_passed_through_an_exec_system_call.
0x0001145f lea rdi, str.A_NULL_argv_0__was_passed_through_an_exec_system_call._n
0x0001145f lea rdi, [0x0001b5d8]
EOF
RUN
@ -833,20 +833,20 @@ pd 1 @ 0x140001010
pd 1 @ 0x14000101c
EOF
EXPECT=<<EOF
0x140001004 488d05f54f01. lea rax, str.ANSI__esc:__e_33m ; section..data
0x140001004 488d05f54f01. lea rax, str._tANSIesc:_e_33m_r_n ; section..data
; 0x140016000 ; "\tANSI\esc: \x1b[33m\r\n"
0x140001010 488d05015001. lea rax, str.wide__esc:__e_0m ; 0x140016018 ; u"\twide\esc: \x1b[0m\xa1\r\n"
0x14000101c 488d051d5001. lea rax, str.wide__in_Arabic: ; 0x140016040 ; u"\"wide\" in Arabic: \u0648\u0627\u0633\u0639"
0x140001010 488d05015001. lea rax, str._twideesc:_e_0m ; 0x140016018 ; u"\twide\esc: \x1b[0m\xa1\r\n"
0x14000101c 488d051d5001. lea rax, str._wide__in_Arabic:_ ; 0x140016040 ; u"\"wide\" in Arabic: \u0648\u0627\u0633\u0639"
; section..data
; 0x140016000
; "\tANSI\esc: \x1b[33m\r\n"
0x140001004 488d05f54f01. lea rax, str.ANSI__esc:__e_33m
0x140001004 488d05f54f01. lea rax, str._tANSIesc:_e_33m_r_n
; 0x140016018
; u"\twide\esc: \x1b[0m\xa1\r\n"
0x140001010 488d05015001. lea rax, str.wide__esc:__e_0m
0x140001010 488d05015001. lea rax, str._twideesc:_e_0m
; 0x140016040
; u"\"wide\" in Arabic: \u0648\u0627\u0633\u0639"
0x14000101c 488d051d5001. lea rax, str.wide__in_Arabic:
0x14000101c 488d051d5001. lea rax, str._wide__in_Arabic:_
EOF
RUN
@ -881,8 +881,8 @@ pd 1 @ 0x004016ed
pd 1 @ 0x004016f7
EOF
EXPECT=<<EOF
0x0040169d mov esi, str.see ; "see \xdab\xbee\xace\xcaf\n"
0x0040169d mov esi, str.see ; "see .b.e.e.f\n"
0x0040169d mov esi, str.see_ ; "see \xdab\xbee\xace\xcaf\n"
0x0040169d mov esi, str.see_ ; "see .b.e.e.f\n"
0x00401693 mov edi, 0x4021ff ; "utf8> \\u00a2\\u20ac\\U00010348 in yellow:.[33m ......... .[0m\n"
0x00401693 mov edi, 0x4021ff ; "utf8> \\u00a2\\u20ac\\U00010348 in yellow:.[33m ... .[0m."
0x004016ac mov edi, 0x40224a ; 'J"@' ; u"utf16le> \\u00a2\\u20ac\\U00010348 in green:.[32m ... .[0m."
@ -952,12 +952,12 @@ pd 1 @ 0x004016d4
EOF
EXPECT=<<EOF
0x004016ac mov edi, 0x40224a ; 'J"@' ; u"utf16le> \\u00a2\\u20ac\\U00010348 in green:\x1b[32m \xa2\u20ac\U00010348 \x1b[0m\n"
0x004016b6 mov edi, str.e_e_b ; "_%e%e%b% "
0x004016b6 mov edi, str.e_e_b ; u"\u255f\u2565\u2565\u2562 is a wall with no embedded zeros\n"
0x004016c0 mov edi, 0x40230c ; " %B%"
0x004016c0 mov edi, 0x40230c ; u"\u2520\u2542\u2500\u2500\u2542\u2528 is a fence with embedded zeros\n"
0x004016ca mov edi, 0x40235a ; 'Z#@' ; u"\u2520\u2542-\u2500-\u2500\u2542\u2528 is a fence with embedded double zeros\n"
0x004016d4 mov edi, str.e_e_e_e_e_e_e_e_e_k_e_e_e_e_e_e_e_e_e_k_e_e_e_e_e_e_e_e_e_k_e_e_e_e_e_e_e_e_e_k_e_e_e_e_e_e_e_e_e_k_e_e_e_e_e_e_e_e_e_k_e_e_e_e_e_e_e_e_e_k_e_e_e_e_e_e_e_e_e_k_e_e_e_e_e_e_e_e_e_k_e_e_e_e_e_e_e_e_e_k_e_e_e_e_e_e_e_e_e_k_e_e_e_e_e_e_e_e_e_k_e_e_e_e_e_e_e_e_e_k_e_e_e_e_e_e_e_e_e_k_e_e_e_e_e_e_e_e_e_k_e_e_e_e_e_e_e_e_e_k_e_e_e_e_e_e_e_e_e_k_e_e_e_e_e_e_e_e_e_k ; u"\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u256b\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u256b\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u256b\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u256b\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u256b\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u256b\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u256b\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u256b\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u256b\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u256b\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u256b\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u256b\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u256b\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u256b\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u256b\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u256b\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u256b\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u256b\n"
0x004016b6 mov edi, str.__e_e_b__ ; "_%e%e%b% "
0x004016b6 mov edi, str.__e_e_b__ ; u"\u255f\u2565\u2565\u2562 is a wall with no embedded zeros\n"
0x004016c0 mov edi, str.__B_ ; " %B%"
0x004016c0 mov edi, str.__B_ ; u"\u2520\u2542\u2500\u2500\u2542\u2528 is a fence with embedded zeros\n"
0x004016ca mov edi, str.__B__ ; u"\u2520\u2542-\u2500-\u2500\u2542\u2528 is a fence with embedded double zeros\n"
0x004016d4 mov edi, str.e_e_e_e_e_e_e_e_e_k_e_e_e_e_e_e_e_e_e_k_e_e_e_e_e_e_e_e_e_k_e_e_e_e_e_e_e_e_e_k_e_e_e_e_e_e_e_e_e_k_e_e_e_e_e_e_e_e_e_k_e_e_e_e_e_e_e_e_e_k_e_e_e_e_e_e_e_e_e_k_e_e_e_e_e_e_e_e_e_k_e_e_e_e_e_e_e_e_e_k_e_e_e_e_e_e_e_e_e_k_e_e_e_e_e_e_e_e_e_k_e_e_e_e_e_e_e_e_e_k_e_e_e_e_e_e_e_e_e_k_e_e_e_e_e_e_e_e_e_k_e_e_e_e_e_e_e_e_e_k_e_e_e_e_e_e_e_e_e_k_e_e_e_e_e_e_e_e_e_k__n ; u"\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u256b\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u256b\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u256b\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u256b\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u256b\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u256b\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u256b\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u256b\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u256b\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u256b\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u256b\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u256b\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u256b\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u256b\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u256b\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u256b\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u256b\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u2565\u256b\n"
EOF
RUN
@ -981,8 +981,8 @@ e bin.str.enc=utf32le
pd 1 @ 0x00401701
EOF
EXPECT=<<EOF
0x004016de mov esi, str.Linux_wide__esc:__e_0m ; u"\t"
0x004016de mov esi, str.Linux_wide__esc:__e_0m ; U"\tLinux_wide\\esc: \x1b[0m\xa1\r\n"
0x004016de mov esi, str._tLinux_wideesc:_e_0m_r_n ; u"\t"
0x004016de mov esi, str._tLinux_wideesc:_e_0m_r_n ; U"\tLinux_wide\\esc: \x1b[0m\xa1\r\n"
0x004016ed mov edi, 0x40258c ; U"utf32le> \\u00a2\\u20ac\\U00010348 in cyan:\x1b[36m \xa2\u20ac\U00010348 \x1b[0m\n"
0x004016f7 mov edi, 0x40266c ; U"Mountain range with embedded quad zeros: \U00010300A\U00010300A\U00010300A\n"
0x00401701 mov edi, 0x402730 ; '0'@' ; "e%"
@ -1093,13 +1093,12 @@ pd 1 @ 0x140001010
EOF
EXPECT=<<EOF
0x140001010 488d05015001. lea rax, [0x140016018] ; u"\twide\esc: \x1b[0m\xa1\r\n"
0x140001028 488d05415001. lea rax, [0x140016070] ; str.Formfeed_at_start
0x140001028 488d05415001. lea rax, [0x140016070] ; str._fFormfeed_at_start
; u"\twide\esc: \x1b[0m\xa1\r\n"
0x140001010 488d05015001. lea rax, [0x140016018]
; str.Formfeed_at_start
; str._fFormfeed_at_start
0x140001028 488d05415001. lea rax, [0x140016070]
0x140001010 488d05015001. lea rax, [0x140016018] ; str.wide ; u"\twide\esc: \x1b[0m\xa1\r\n"
; str.wide
0x140001010 488d05015001. lea rax, [0x140016018] ; u"\twide\esc: \x1b[0m\xa1\r\n"
; u"\twide\esc: \x1b[0m\xa1\r\n"
0x140001010 488d05015001. lea rax, [0x140016018]
EOF
@ -1117,8 +1116,8 @@ e asm.cmt.right=false
pd 1 @ 0x140001010
EOF
EXPECT=<<EOF
0x140001010 488d05015001. lea rax, [0x140016018] ; str.wide__esc:__e_0m ; u"\twide\esc: \x1b[0m\xa1\r\n"
; str.wide__esc:__e_0m
0x140001010 488d05015001. lea rax, [0x140016018] ; str._twideesc:_e_0m ; u"\twide\esc: \x1b[0m\xa1\r\n"
; str._twideesc:_e_0m
; u"\twide\esc: \x1b[0m\xa1\r\n"
0x140001010 488d05015001. lea rax, [0x140016018]
EOF
@ -1169,7 +1168,7 @@ e asm.cmt.off=nodup
pd 1 @ 0x140001010
EOF
EXPECT=<<EOF
0x140001010 488d05015001. lea rax, str.wide__esc:__e_0m ; u"\twide\esc: \x1b[0m\xa1\r\n"
0x140001010 488d05015001. lea rax, str._twideesc:_e_0m ; u"\twide\esc: \x1b[0m\xa1\r\n"
0x140001010 488d05015001. lea rax, [0x140016018] ; 0x140016018 ; u"\twide\esc: \x1b[0m\xa1\r\n"
0x140001010 488d05015001. lea rax, [0x140016018] ; u"\twide\esc: \x1b[0m\xa1\r\n"
EOF
@ -1222,7 +1221,7 @@ e asm.bytes=false
pd 1 @ 0x004004ee
EOF
EXPECT=<<EOF
0x004004ee mov edi, str.S ; 0x4005c0 ; u"\ufeff--> %S\ufeff\n"
0x004004ee mov edi, str._____S ; 0x4005c0 ; u"\ufeff--> %S\ufeff\n"
EOF
RUN
@ -1355,7 +1354,7 @@ e str.escbslash=1
pdJ 1 @ 0x08048532
EOF
EXPECT=<<EOF
[{"offset":134513970,"text":"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;&nbsp;[0x8048679:4]=0x73736150"},{"offset":134513970,"text":"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;&nbsp;\"Password&nbsp;Incorrect!\\n\""},{"offset":134513970,"text":"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0x08048532&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;c70424798604.&nbsp;&nbsp;mov&nbsp;dword&nbsp;[esp],&nbsp;str.Password_Incorrect"}]
[{"offset":134513970,"text":"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;&nbsp;[0x8048679:4]=0x73736150"},{"offset":134513970,"text":"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;&nbsp;\"Password&nbsp;Incorrect!\\n\""},{"offset":134513970,"text":"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0x08048532&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;c70424798604.&nbsp;&nbsp;mov&nbsp;dword&nbsp;[esp],&nbsp;str.Password_Incorrect__n"}]
EOF
RUN
@ -1434,7 +1433,7 @@ NAME=pdJ escape flagname
FILE=bins/elf/crackme
CMDS=pdJ 1 @ 0x0040082f
EXPECT=<<EOF
[{"offset":4196399,"text":" ;-- str.Password_Correct:"},{"offset":4196399,"text":" 0x0040082f .string \"Password Correct!\" ; len=18"}]
[{"offset":4196399,"text":" ;-- str.Password_Correct_:"},{"offset":4196399,"text":" 0x0040082f .string \"Password Correct!\" ; len=18"}]
EOF
RUN
@ -1512,10 +1511,10 @@ EXPECT=<<EOF
0x0040488d mov rdi, main ; section..text
; 0x4028a0
--4--
| 0x004028e0 mov esi, str.usr_share_locale ; 0x414fbf ; "/usr/share/locale"
| 0x004028e0 mov esi, str._usr_share_locale ; 0x414fbf ; "/usr/share/locale"
| 0x00402abd mov edi, str.TABSIZE ; 0x414fe7
--5--
| 0x004028e0 mov esi, str.usr_share_locale ; 0x414fbf
| 0x004028e0 mov esi, str._usr_share_locale ; 0x414fbf
| 0x00402abd mov edi, str.TABSIZE ; 0x414fe7
EOF
RUN
@ -1666,8 +1665,8 @@ e bin.str.filter=U
pd 1
EOF
EXPECT=<<EOF
0x004028e0 mov esi, str.usr_share_locale ; "/usr/share/locale"
0x004028e0 mov esi, str.usr_share_locale
0x004028e0 mov esi, str._usr_share_locale ; "/usr/share/locale"
0x004028e0 mov esi, str._usr_share_locale
EOF
RUN
@ -1710,16 +1709,16 @@ e emu.str.inv=false
pd 1 @ 0x161d
EOF
EXPECT=<<EOF
0x0000161d lea eax, [esi - abcdefghi] ; 0x21f7 ; "abcdefghi" ; "\n Blue Pill" str.Blue_Pill
0x0000161d lea eax, [esi - abcdefghi] ; 0x21f7 ; "abcdefghi" ; "\n Blue Pill" str.Blue_Pill
0x0000161d lea eax, [esi - abcdefghi] ; 0x21f7 ; "abcdefghi" ; "\n Blue Pill" str._n__Blue_Pill
0x0000161d lea eax, [esi - abcdefghi] ; 0x21f7 ; "abcdefghi" ; "\n Blue Pill" str._n__Blue_Pill
; 0x21f7
; "abcdefghi"
 ; "\n Blue Pill" str.Blue_Pill
 ; "\n Blue Pill" str._n__Blue_Pill
 0x0000161d lea eax, [esi - abcdefghi]
; 0x21f7
; "abcdefghi"
 ; "\n Blue Pill" str.Blue_Pill
 ; "\n Blue Pill" str._n__Blue_Pill
 0x0000161d lea eax, [esi - abcdefghi]
EOF
RUN
@ -1737,7 +1736,7 @@ pd 1 @ 0x161d
pd 1 @ 0x1447
EOF
EXPECT=<<EOF
0x0000161d lea eax, [esi - 0x21f7] ; "\n Blue Pill" str.Blue_Pill
0x0000161d lea eax, [esi - 0x21f7] ; "\n Blue Pill" str._n__Blue_Pill
0x0000161d lea eax, [esi - 0x21f7] ; "\n Blue Pill"
0x00001447 add esi, 0x2bb9 ; section..got.plt
EOF
@ -1751,7 +1750,7 @@ e asm.cmt.off=false
pd 1 @ 0x0040040b
EOF
EXPECT=<<EOF
0x0040040b mov edi, str.Control_chars: ; "Control chars: \b\v\f\n\r\t\a"
0x0040040b mov edi, str.Control_chars:__b_v_f_n_r_t_a ; "Control chars: \b\v\f\n\r\t\a"
EOF
RUN
@ -2058,8 +2057,8 @@ e asm.cmt.off=false
pd 1 @ 0x004016ca
EOF
EXPECT=<<EOF
0x004016ca mov edi, 0x40235a ; 'Z#@' ; u"\u2520\u2542-\u2500-\u2500\u2542\u2528 is a fence with embedded double zeros\n"
0x004016ca mov edi, str.fence ; u"\u2520\u2542-\u2500-\u2500\u2542\u2528 is a fence with embedded double zeros\n"
0x004016ca mov edi, str.__B__ ; 0x40235a ; u"\u2520\u2542-\u2500-\u2500\u2542\u2528 is a fence with embedded double zeros\n"
0x004016ca mov edi, str.__B__ ; str.fence ; u"\u2520\u2542-\u2500-\u2500\u2542\u2528 is a fence with embedded double zeros\n"
EOF
RUN

View File

@ -406,7 +406,7 @@ EXPECT=<<EOF
,=< 0x08048598 jg 0x804859e
| 0x0804859a cmp al, byte [esp + 0x27]
,`-> 0x0804859e je 0x80485b3
| 0x080485a0 mov dword [esp], str.Wrong
| 0x080485a0 mov dword [esp], str.Wrong_
| 0x080485a7 call sym.imp.puts
| 0x080485ac mov eax, 1
,=.-> 0x080485b1 jmp 0x80485f9
@ -540,13 +540,13 @@ pd 1 @ 0x080493ca
EOF
EXPECT=<<EOF
| 0x080493b4 call 0x80490b0 ; sym.imp.strlen ; size_t strlen(const char *s)
| 0x080493ca call 0x80490e0 ; sym.imp.QString::fromAscii_helper_char_const___int
| 0x080493ca call 0x80490e0 ; sym.imp.QString::fromAscii_helper_char_const__int_
| ; QString::fromAscii_helper(char const*, int)
| ; sym.imp.strlen
| ; size_t strlen(const char *s)
| 0x080493b4 call 0x80490b0
| ; sym.imp.QString::fromAscii_helper_char_const___int
| ; sym.imp.QString::fromAscii_helper_char_const__int_
| ; QString::fromAscii_helper(char const*, int)
| 0x080493ca call 0x80490e0
EOF

View File

@ -4,7 +4,7 @@ CMDS=<<EOF
e asm.lines.bb=0
e asm.bytes=0
e asm.comments=0
s sym.static_int_Test::callMeNot
s sym.static_int_Test::callMeNot__
pd 20~?NSLog
af
pd 20~?NSLog

View File

@ -754,12 +754,46 @@ FILE=-
CMDS=<<EOF
. scripts/palette.r2
woe 0 0xff 1
(test_flag; f `p8 1`)
(test_flag; f _`p8 1`)
.(test_flag) @@s:0 0xff 1
e scr.color=3
pxa 256
prc 256
EOF
EXPECT=<<EOF
- offset - 0 1 2 3 4 5 6 7 8 9 A B C D E F 0123456789ABCDEF
/0/01/0/03/0/05/0/07/0/09/0/0b/0/0d/0/0f
0x00000000 0001 0203 0405 0607 0809 0a0b 0c0d 0e0f ................
/1/11/1/13/1/15/1/17/1/19/1/1b/1/1d/1/1f
0x00000010 1011 1213 1415 1617 1819 1a1b 1c1d 1e1f ................
/2/21/2/23/2/25/2/27/2/29/2/2b/2/2d/2/2f
0x00000020 2021 2223 2425 2627 2829 2a2b 2c2d 2e2f  !"#$%&'()*+,-./
/3/31/3/33/3/35/3/37/3/39/3/3b/3/3d/3/3f
0x00000030 3031 3233 3435 3637 3839 3a3b 3c3d 3e3f 0123456789:;<=>?
/4/41/4/43/4/45/4/47/4/49/4/4b/4/4d/4/4f
0x00000040 4041 4243 4445 4647 4849 4a4b 4c4d 4e4f @ABCDEFGHIJKLMNO
/5/51/5/53/5/55/5/57/5/59/5/5b/5/5d/5/5f
0x00000050 5051 5253 5455 5657 5859 5a5b 5c5d 5e5f PQRSTUVWXYZ[\]^_
/6/61/6/63/6/65/6/67/6/69/6/6b/6/6d/6/6f
0x00000060 6061 6263 6465 6667 6869 6a6b 6c6d 6e6f `abcdefghijklmno
/7/71/7/73/7/75/7/77/7/79/7/7b/7/7d/7/7f
0x00000070 7071 7273 7475 7677 7879 7a7b 7c7d 7e7f pqrstuvwxyz{|}~.
/8/81/8/83/8/85/8/87/8/89/8/8b/8/8d/8/8f
0x00000080 8081 8283 8485 8687 8889 8a8b 8c8d 8e8f ................
/9/91/9/93/9/95/9/97/9/99/9/9b/9/9d/9/9f
0x00000090 9091 9293 9495 9697 9899 9a9b 9c9d 9e9f ................
/a/a1/a/a3/a/a5/a/a7/a/a9/a/ab/a/ad/a/af
0x000000a0 a0a1 a2a3 a4a5 a6a7 a8a9 aaab acad aeaf ................
/b/b1/b/b3/b/b5/b/b7/b/b9/b/bb/b/bd/b/bf
0x000000b0 b0b1 b2b3 b4b5 b6b7 b8b9 babb bcbd bebf ................
/c/c1/c/c3/c/c5/c/c7/c/c9/c/cb/c/cd/c/cf
0x000000c0 c0c1 c2c3 c4c5 c6c7 c8c9 cacb cccd cecf ................
/d/d1/d/d3/d/d5/d/d7/d/d9/d/db/d/dd/d/df
0x000000d0 d0d1 d2d3 d4d5 d6d7 d8d9 dadb dcdd dedf ................
/e/e1/e/e3/e/e5/e/e7/e/e9/e/eb/e/ed/e/ef
0x000000e0 e0e1 e2e3 e4e5 e6e7 e8e9 eaeb eced eeef ................
/f/f1/f/f3/f/f5/f/f7/f/f9/f/fb/f/fd/f/ff
0x000000f0 f0f1 f2f3 f4f5 f6f7 f8f9 fafb fcfd feff ................
0x00000000 000102030405060708090a0b0c0d0e0f
0x00000010 101112131415161718191a1b1c1d1e1f
0x00000020 202122232425262728292a2b2c2d2e2f

View File

@ -285,7 +285,7 @@ CMDS=<<EOF
EOF
EXPECT=<<EOF
0x08048515 # 3: mov ebx, dword [esp]
0x08048527 # 5: mov ebx, obj.__CTOR_LIST
0x08048527 # 5: mov ebx, obj.__CTOR_LIST__
--
--
[{"offset":134513941,"len":3,"code":"mov ebx, dword [esp]"},{"offset":134513959,"len":5,"code":"mov ebx, 0x8049f0c"}]
@ -307,10 +307,10 @@ CMDS=<<EOF
EOF
EXPECT=<<EOF
0x08048515 # 3: mov ebx, dword [esp]
0x08048527 # 5: mov ebx, obj.__CTOR_LIST
0x08048527 # 5: mov ebx, obj.__CTOR_LIST__
--
0x08048515 # 3: mov ebx, dword [esp]
0x08048527 # 5: mov ebx, obj.__CTOR_LIST
0x08048527 # 5: mov ebx, obj.__CTOR_LIST__
--
[{"offset":134513941,"len":3,"code":"mov ebx, dword [esp]"},{"offset":134513959,"len":5,"code":"mov ebx, 0x8049f0c"}]
--

View File

@ -45,13 +45,13 @@ EXPECT=<<EOF
| 0x00001243 53 push rbx
| 0x00001244 4883ec28 sub rsp, 0x28
| 0x00001248 bf08000000 mov edi, 8
| 0x0000124d e81efeffff call sym.imp.operator_new_unsigned_long
| 0x0000124d e81efeffff call sym.imp.operator_new_unsigned_long_
| 0x00001252 4889c3 mov rbx, rax
| 0x00001255 4889df mov rdi, rbx
| 0x00001258 e827010000 call method Bird::Bird() ; dbg.Bird::Bird()
| 0x00001258 e827010000 call dbg.Bird::Bird()
| 0x0000125d 48895de0 mov qword [b], rbx
| 0x00001261 bf08000000 mov edi, 8
| 0x00001266 e805feffff call sym.imp.operator_new_unsigned_long
| 0x00001266 e805feffff call sym.imp.operator_new_unsigned_long_
EOF
RUN
@ -206,12 +206,12 @@ FILE=bins/elf/dwarf_rust_bubble
CMDS=<<EOF
e asm.dwarf=false
aaa
pd 40 @ dbg.bubble_sort_i32
pd 40 @ dbg.bubble_sort_i32_
EOF
EXPECT=<<EOF
; CALL XREF from rust::main::h523dcf5432fcfd88 @ 0x5875 ; dbg.main
;-- rust::bubble_sort::h0777bc845caabc60:
;-- dbg.bubble_sort_i32:
;-- dbg.bubble_sort_i32_:
/ 614: dbg.bubble_sort<i32> (int64_t arg1, int64_t arg2);
| ; var int64_t var_fh @ rsp+0xf
| ; var int64_t var_10h @ rsp+0x10
@ -296,7 +296,7 @@ EOF
EXPECT=<<EOF
; CALL XREF from dbg.main @ 0x10001ae8
;-- Grid::init():
;-- method.Grid.init:
;-- method.Grid.init__:
/ 64: dbg.init (Grid * const this);
| ; arg Grid * const this @ r3
| 0x100012bc 39030144 addi r8, r3, 0x144 ; arg1 ; void init(Grid * const this);

View File

@ -401,9 +401,9 @@ Cm 8 wwww @ 0x00000380
----
[{"offset":0,"type":"Cs","name":"aGVsbG8gd29ybGQ=","enc":"latin1","ascii":true}]
----
[{"offset":256,"type":"Cd","name":"3","size":3}]
[{"offset":256,"type":"Cd","name":"","size":3}]
----
[{"offset":512,"type":"Ch","name":"2"}]
[{"offset":512,"type":"Ch","name":""}]
----
[{"offset":768,"type":"Cf","name":"x"}]
----
@ -411,7 +411,7 @@ Cm 8 wwww @ 0x00000380
----
[{"offset":896,"type":"Cm","name":"wwww"}]
----
[{"offset":0,"type":"Cs","name":"aGVsbG8gd29ybGQ=","enc":"latin1","ascii":true},{"offset":0,"type":"CCu","name":"Hello!"},{"offset":256,"type":"Cd","name":"3","size":3},{"offset":512,"type":"Ch","name":"2"},{"offset":768,"type":"Cf","name":"x"},{"offset":896,"type":"Cm","name":"wwww"}]
[{"offset":0,"type":"Cs","name":"aGVsbG8gd29ybGQ=","enc":"latin1","ascii":true},{"offset":0,"type":"CCu","name":"Hello!"},{"offset":256,"type":"Cd","name":"","size":3},{"offset":512,"type":"Ch","name":""},{"offset":768,"type":"Cf","name":"x"},{"offset":896,"type":"Cm","name":"wwww"}]
EOF
RUN
@ -468,12 +468,12 @@ EXPECT=<<EOF
Csa 2 @ 0x140016018 # \t
"\t"
ascii[2] "\t"
;-- str.wide__esc:__e_0m:
;-- str._twideesc:_e_0m:
0x140016018 .string "\t" ; len=2
Cs 19 @ 0x140016018 # \twide\\esc: \x1b[0m\xa1\r\n
"\twide\\esc: \x1b[0m\xa1\r\n"
latin1[19] "\twide\\esc: \x1b[0m\xa1\r\n"
;-- str.wide__esc:__e_0m:
;-- str._twideesc:_e_0m:
0x140016018 .string "\twide\\esc: \x1b[0m\xa1\r\n" ; len=19
ascii[4] "\t"
ascii[4] "\twid"
@ -517,12 +517,12 @@ EXPECT=<<EOF
Cs 61 @ 0x004021ff # utf8> \\u00a2\\u20ac\\U00010348 in yellow:\e[33m \xc2\xa2\xe2\x82\xac\xf0\x90\x8d\x88 \e[0m\n
"utf8> \\u00a2\\u20ac\\U00010348 in yellow:\e[33m \xc2\xa2\xe2\x82\xac\xf0\x90\x8d\x88 \e[0m\n"
latin1[61] "utf8> \\u00a2\\u20ac\\U00010348 in yellow:\e[33m \xc2\xa2\xe2\x82\xac\xf0\x90\x8d\x88 \e[0m\n"
;-- str.utf8____u00a2__u20ac__U00010348_in_yellow:_e_33m____________e_0m:
;-- str.utf8__u00a2u20acU00010348_in_yellow:e_33m__e_0m_n:
0x004021ff .string "utf8> \\u00a2\\u20ac\\U00010348 in yellow:\e[33m \xc2\xa2\xe2\x82\xac\xf0\x90\x8d\x88 \e[0m\n" ; len=61
Cs8 61 @ 0x004021ff # utf8> \\u00a2\\u20ac\\U00010348 in yellow:\x1b[33m \u00a2\u20ac\U00010348 \x1b[0m\n
"utf8> \\u00a2\\u20ac\\U00010348 in yellow:\x1b[33m \u00a2\u20ac\U00010348 \x1b[0m\n"
utf8[61] "utf8> \\u00a2\\u20ac\\U00010348 in yellow:\x1b[33m \u00a2\u20ac\U00010348 \x1b[0m\n"
;-- str.utf8____u00a2__u20ac__U00010348_in_yellow:_e_33m____________e_0m:
;-- str.utf8__u00a2u20acU00010348_in_yellow:e_33m__e_0m_n:
0x004021ff .string "utf8> \\u00a2\\u20ac\\U00010348 in yellow:\x1b[33m \u00a2\u20ac\U00010348 \x1b[0m\n" ; len=61
EOF
RUN
@ -559,12 +559,12 @@ EOF
EXPECT=<<EOF
"\tANSI\\esc: \x1b[33m\r\n"
ascii[19] "\tANSI\\esc: \x1b[33m\r\n"
;-- str.ANSI__esc:__e_33m:
;-- str._tANSIesc:_e_33m_r_n:
;-- section..data:
0x140016000 .string "\tANSI\\esc: \x1b[33m\r\n" ; len=19 ; [02] -rw- section size 8192 named .data
"\tANSI\esc: \x1b[33m\r\n"
ascii[19] "\tANSI\esc: \x1b[33m\r\n"
;-- str.ANSI__esc:__e_33m:
;-- str._tANSIesc:_e_33m_r_n:
;-- section..data:
0x140016000 .string "\tANSI\esc: \x1b[33m\r\n" ; len=19 ; [02] -rw- section size 8192 named .data
EOF

View File

@ -97,15 +97,15 @@ addr,size,space,name
[
{
"addr": 6296136,
"name": "reloc.__gmon_start"
"name": "reloc.__gmon_start__"
},
{
"addr": 6296168,
"name": "reloc.std::ostream::operator___int"
"name": "reloc.std::ostream::operator___int_"
},
{
"addr": 6296176,
"name": "reloc.operator_delete_void"
"name": "reloc.operator_delete_void_"
}
]
@ -113,25 +113,25 @@ space name
---------------------
segments segment.GNU_STACK
symbols.sections sym..comment
imports loc.imp.__gmon_start
imports loc.imp.__gmon_start__
imports loc.imp._Jv_RegisterClasses
imports loc.imp._ITM_deregisterTMCloneTable
.----------------------------------------------------------------------------------------------------.
| space | size | name |
)----------------------------------------------------------------------------------------------------(
| classes | 1 | class.std::ostream |
| classes | 1 | class.std::ios_base::Init |
| classes | 1 | class.std::basic_ostream_char__std::char_traits_char_____std::operator____std |
| classes | 1 | class.std::basic_ostream_char__std::char_traits_char_____std::endl_char__std |
| classes | 1 | class.B |
| classes | 1 | class.A |
| classes | 1 | class.C |
| imports | 16 | loc.imp._ITM_registerTMCloneTable |
| imports | 16 | loc.imp._ITM_deregisterTMCloneTable |
| segments | 64 | segment.ehdr |
| segments | 4132 | segment.LOAD0 |
`----------------------------------------------------------------------------------------------------'
.---------------------------------------------------------------------------------------------------.
| space | size | name |
)---------------------------------------------------------------------------------------------------(
| classes | 1 | class.std::ostream |
| classes | 1 | class.std::ios_base::Init |
| classes | 1 | class.std::basic_ostream_char__std::char_traits_char____std::operator____std |
| classes | 1 | class.std::basic_ostream_char__std::char_traits_char____std::endl_char__std |
| classes | 1 | class.B |
| classes | 1 | class.A |
| classes | 1 | class.C |
| imports | 16 | loc.imp._ITM_registerTMCloneTable |
| imports | 16 | loc.imp._ITM_deregisterTMCloneTable |
| segments | 64 | segment.ehdr |
| segments | 4132 | segment.LOAD0 |
`---------------------------------------------------------------------------------------------------'
EOF
RUN

View File

@ -27,7 +27,7 @@ af
pdsf
EOF
EXPECT=<<EOF
0x00002900&nbsp;argc<br />0x00002904&nbsp;argv<br />0x00002918&nbsp;"alloc"<br />0x00002920&nbsp;str.alloc<br />0x00002928&nbsp;bl&nbsp;sym.imp.objc_msgSend<br />0x00002934&nbsp;"init"<br />0x0000293c&nbsp;str.init<br />0x00002940&nbsp;bl&nbsp;sym.imp.objc_msgSend<br />0x0000294c&nbsp;"X\x10\x9d\xe5"<br />0x0000295c&nbsp;bl&nbsp;sym.imp.objc_msgSend<br />0x00002970&nbsp;bl&nbsp;sym.imp.objc_msgSend<br />0x00002998&nbsp;"Usage:&nbsp;FileDP&nbsp;[-f/-d]&nbsp;[Full&nbsp;path&nbsp;to&nbsp;file/directory]&nbsp;"<br />0x0000299c&nbsp;bl&nbsp;sym.imp.puts<br />0x000029c8&nbsp;bl&nbsp;sym.imp.strcmp<br />0x00002a1c&nbsp;bl&nbsp;sym.imp.objc_msgSend<br />0x00002a38&nbsp;bl&nbsp;sym.imp.objc_msgSend<br />0x00002a64&nbsp;bl&nbsp;sym.imp.objc_msgSend<br />0x00002a90&nbsp;bl&nbsp;sym.imp.objc_msgSend<br />0x00002aa4&nbsp;bl&nbsp;sym.imp.NSLog<br />0x00002ab0&nbsp;str.File_Not_Found<br />0x00002ab4&nbsp;bl&nbsp;sym.imp.puts<br />0x00002b00&nbsp;bl&nbsp;sym.imp.objc_msgSend<br />0x00002b1c&nbsp;bl&nbsp;sym.imp.objc_msgSend<br />0x00002b48&nbsp;bl&nbsp;sym.imp.objc_msgSend<br />0x00002b64&nbsp;bl&nbsp;sym.imp.objc_msgSend<br />0x00002ba4&nbsp;bl&nbsp;sym.imp.objc_msgSend<br />0x00002c00&nbsp;bl&nbsp;sym.imp.objc_msgSend<br />0x00002c54&nbsp;bl&nbsp;sym.imp.objc_enumerationMutation<br />0x00002ca0&nbsp;bl&nbsp;sym.imp.objc_msgSend<br />0x00002cc0&nbsp;bl&nbsp;sym.imp.objc_msgSend<br />0x00002cec&nbsp;bl&nbsp;sym.imp.objc_msgSend<br />0x00002cfc&nbsp;str.cstr.file_name_is:_____protection_class:<br />0x00002d04&nbsp;bl&nbsp;sym.imp.NSLog<br />0x00002d50&nbsp;bl&nbsp;sym.imp.objc_msgSend<br />0x00002d84&nbsp;str.Directory_Not_found<br />0x00002d88&nbsp;bl&nbsp;sym.imp.puts<br />0x00002dac&nbsp;bl&nbsp;sym.imp.objc_msgSend<br />0x00002dcc&nbsp;bx&nbsp;lr
0x00002900&nbsp;argc<br />0x00002904&nbsp;argv<br />0x00002918&nbsp;"alloc"<br />0x00002920&nbsp;str.alloc<br />0x00002928&nbsp;bl&nbsp;sym.imp.objc_msgSend<br />0x00002934&nbsp;"init"<br />0x0000293c&nbsp;str.init<br />0x00002940&nbsp;bl&nbsp;sym.imp.objc_msgSend<br />0x0000294c&nbsp;"X\x10\x9d\xe5"<br />0x0000295c&nbsp;bl&nbsp;sym.imp.objc_msgSend<br />0x00002970&nbsp;bl&nbsp;sym.imp.objc_msgSend<br />0x00002998&nbsp;"Usage:&nbsp;FileDP&nbsp;[-f/-d]&nbsp;[Full&nbsp;path&nbsp;to&nbsp;file/directory]&nbsp;"<br />0x0000299c&nbsp;bl&nbsp;sym.imp.puts<br />0x000029c8&nbsp;bl&nbsp;sym.imp.strcmp<br />0x00002a1c&nbsp;bl&nbsp;sym.imp.objc_msgSend<br />0x00002a38&nbsp;bl&nbsp;sym.imp.objc_msgSend<br />0x00002a64&nbsp;bl&nbsp;sym.imp.objc_msgSend<br />0x00002a90&nbsp;bl&nbsp;sym.imp.objc_msgSend<br />0x00002aa4&nbsp;bl&nbsp;sym.imp.NSLog<br />0x00002ab0&nbsp;str.File_Not_Found_<br />0x00002ab4&nbsp;bl&nbsp;sym.imp.puts<br />0x00002b00&nbsp;bl&nbsp;sym.imp.objc_msgSend<br />0x00002b1c&nbsp;bl&nbsp;sym.imp.objc_msgSend<br />0x00002b48&nbsp;bl&nbsp;sym.imp.objc_msgSend<br />0x00002b64&nbsp;bl&nbsp;sym.imp.objc_msgSend<br />0x00002ba4&nbsp;bl&nbsp;sym.imp.objc_msgSend<br />0x00002c00&nbsp;bl&nbsp;sym.imp.objc_msgSend<br />0x00002c54&nbsp;bl&nbsp;sym.imp.objc_enumerationMutation<br />0x00002ca0&nbsp;bl&nbsp;sym.imp.objc_msgSend<br />0x00002cc0&nbsp;bl&nbsp;sym.imp.objc_msgSend<br />0x00002cec&nbsp;bl&nbsp;sym.imp.objc_msgSend<br />0x00002cfc&nbsp;str.cstr.file_name_is:_____protection_class:__<br />0x00002d04&nbsp;bl&nbsp;sym.imp.NSLog<br />0x00002d50&nbsp;bl&nbsp;sym.imp.objc_msgSend<br />0x00002d84&nbsp;str.Directory_Not_found_<br />0x00002d88&nbsp;bl&nbsp;sym.imp.puts<br />0x00002dac&nbsp;bl&nbsp;sym.imp.objc_msgSend<br />0x00002dcc&nbsp;bx&nbsp;lr
EOF
RUN
@ -60,7 +60,7 @@ EXPECT=<<EOF
0x00002a64 bl sym.imp.objc_msgSend
0x00002a90 bl sym.imp.objc_msgSend
0x00002aa4 bl sym.imp.NSLog
0x00002ab0 str.File_Not_Found
0x00002ab0 str.File_Not_Found_
0x00002ab4 bl sym.imp.puts
0x00002b00 bl sym.imp.objc_msgSend
0x00002b1c bl sym.imp.objc_msgSend
@ -72,10 +72,10 @@ EXPECT=<<EOF
0x00002ca0 bl sym.imp.objc_msgSend
0x00002cc0 bl sym.imp.objc_msgSend
0x00002cec bl sym.imp.objc_msgSend
0x00002cfc str.cstr.file_name_is:_____protection_class:
0x00002cfc str.cstr.file_name_is:_____protection_class:__
0x00002d04 bl sym.imp.NSLog
0x00002d50 bl sym.imp.objc_msgSend
0x00002d84 str.Directory_Not_found
0x00002d84 str.Directory_Not_found_
0x00002d88 bl sym.imp.puts
0x00002dac bl sym.imp.objc_msgSend
0x00002dcc bx lr

View File

@ -1247,9 +1247,9 @@ pd 1 @ 0x11c0
pd 1 @ 0x1523
EOF
EXPECT=<<EOF
0x00001557 lea eax, [esi - 0x220c] ; " fwhibbit{" str.fwhibbit
0x000011c0 lea eax, [ebx - 0x2448] ; " -os--/sosdmmNNMMNy .+// " str.os___sosdmmNNMMNy_________.
0x00001523 lea eax, [esi - 0x2218] ; "\n Red Pill" str.Red_Pill
0x00001557 lea eax, [esi - 0x220c] ; " fwhibbit{" str.__fwhibbit
0x000011c0 lea eax, [ebx - 0x2448] ; " -os--/sosdmmNNMMNy .+// " str.____os___sosdmmNNMMNy_________.___
0x00001523 lea eax, [esi - 0x2218] ; "\n Red Pill" str._n__Red_Pill
EOF
RUN
@ -1264,8 +1264,8 @@ pd 1 @ 0x1557
pd 1 @ 0x1523
EOF
EXPECT=<<EOF
| 0x00001557 lea eax, str.fwhibbit ; 0x1df4 ; " fwhibbit{"
| 0x00001523 lea eax, str.Red_Pill ; 0x1de8 ; "\n Red Pill"
| 0x00001557 lea eax, str.__fwhibbit ; 0x1df4 ; " fwhibbit{"
| 0x00001523 lea eax, str._n__Red_Pill ; 0x1de8 ; "\n Red Pill"
EOF
RUN

View File

@ -39,17 +39,17 @@ nth vaddr bind type lib name
nth paddr size vaddr vsize perm name
---------------------------------------------------
0 0x000001cc 0x2f 0x00000000 0x2f ---- .drectve_0
1 0x000001fb 0x8670 0x00000030 0x8670 -r-- .debug_S_1
2 0x0000ad73 0x70 0x000086a0 0x70 -r-- .debug_T_2
3 0x0000ade3 0x625 0x00008710 0x625 -rw- .data_3
4 0x0000b408 0x54 0x00008d40 0x54 -r-- .rdata_4
5 0x00000000 0x8 0x00008da0 0x8 -rw- .bss_5
6 0x0000b45c 0x2895 0x00008db0 0x2895 -r-x .text_mn_6
7 0x0000e967 0x8 0x0000b650 0x8 -r-- .rdata_7
8 0x0000e96f 0x4 0x0000b660 0x4 -r-- .rdata_8
9 0x0000e973 0x8 0x0000b670 0x8 -r-- .rdata_9
10 0x0000e97b 0x4 0x0000b680 0x4 -r-- .rdata_10
0 0x000001cc 0x2f 0x00000000 0x2f ---- .drectve-0
1 0x000001fb 0x8670 0x00000030 0x8670 -r-- .debug$S-1
2 0x0000ad73 0x70 0x000086a0 0x70 -r-- .debug$T-2
3 0x0000ade3 0x625 0x00008710 0x625 -rw- .data-3
4 0x0000b408 0x54 0x00008d40 0x54 -r-- .rdata-4
5 0x00000000 0x8 0x00008da0 0x8 -rw- .bss-5
6 0x0000b45c 0x2895 0x00008db0 0x2895 -r-x .text$mn-6
7 0x0000e967 0x8 0x0000b650 0x8 -r-- .rdata-7
8 0x0000e96f 0x4 0x0000b660 0x4 -r-- .rdata-8
9 0x0000e973 0x8 0x0000b670 0x8 -r-- .rdata-9
10 0x0000e97b 0x4 0x0000b680 0x4 -r-- .rdata-10
EOF
RUN
@ -106,7 +106,7 @@ EXPECT=<<EOF
;-- section..text_mn_5:
;-- .text$mn:
;-- ??1FooBar@@QAE@XZ:
0x00000d30 55 push ebp ; [05] -r-x section size 42 named .text_mn_5
0x00000d30 55 push ebp ; [05] -r-x section size 42 named .text$mn-5
0x00000d31 8bec mov ebp, esp
EOF
RUN
@ -140,6 +140,6 @@ pd 2 @ sym.main+6
EOF
EXPECT=<<EOF
0x00000006 4c8d05230000. lea r8, [0x00000030] ; sym..data ; "Win64 assembly"; RELOC 32 .data @ 0x00000030
0x0000000d 488d152b0000. lea rdx, [0x0000003f] ; str.Coffee_time ; "Coffee time!"; RELOC 32 .data @ 0x00000030 + 0xf
0x0000000d 488d152b0000. lea rdx, [0x0000003f] ; str.Coffee_time_ ; "Coffee time!"; RELOC 32 .data @ 0x00000030 + 0xf
EOF
RUN

View File

@ -159,11 +159,11 @@ EXPECT=<<EOF
0x00000178 0 sym.LWorld.ifield_worldVar2:I
0x000001b0 0 sym.imp.Ljava_io_PrintStream.method.println_Ljava_lang_String__V
0x000001b8 0 sym.imp.Ljava_lang_Integer.method._init__I_V
0x000001c0 0 sym.imp.Ljava_lang_Integer.method.toString__Ljava_lang_String
0x000001c0 0 sym.imp.Ljava_lang_Integer.method.toString__Ljava_lang_String_
0x000001c8 0 sym.imp.Ljava_lang_Object.method._init___V
0x000001d0 0 sym.imp.Ljava_lang_StringBuilder.method._init___V
0x000001d8 0 sym.imp.Ljava_lang_StringBuilder.method.append_Ljava_lang_String__Ljava_lang_StringBuilder
0x000001e0 0 sym.imp.Ljava_lang_StringBuilder.method.toString__Ljava_lang_String
0x000001d8 0 sym.imp.Ljava_lang_StringBuilder.method.append_Ljava_lang_String__Ljava_lang_StringBuilder_
0x000001e0 0 sym.imp.Ljava_lang_StringBuilder.method.toString__Ljava_lang_String_
0x000001e8 1 class.LHello
0x00000208 1 class.LWorld
0x00000228 308 section.code
@ -180,19 +180,19 @@ EXPECT=<<EOF
0x00000318 68 sym.LWorld.method.foo_I_V
0x00000318 1 method.public.LWorld.LWorld.method.foo_I_V
0x0000035c 600 section.data
0x00000372 6 str.init
0x00000372 6 str._init_
0x0000037a 6 str.Findus
0x00000382 10 str.Hello.java
0x00000394 7 str.LHello
0x000003a1 7 str.LWorld
0x00000394 7 str.LHello_
0x000003a1 7 str.LWorld_
0x00000438 10 str.World.java
0x00000459 6 str.append
0x00000466 6 str.foo
0x00000466 6 str.foo_
0x0000046e 8 str.localVar
0x00000478 9 str.localVar2
0x0000048e 7 str.println
0x00000497 8 str.toString
0x000004a1 8 str.world
0x000004a1 8 str.world_
0x000004ab 8 str.worldVar
0x000004b5 9 str.worldVar2
EOF

View File

@ -40,7 +40,7 @@ NAME=x86 - init_array detection
FILE=bins/elf/analysis/x86-helloworld-gcc
CMDS=aa;afl~0x080482e0[3]
EXPECT=<<EOF
loc.imp.__gmon_start
loc.imp.__gmon_start__
EOF
RUN
@ -58,8 +58,8 @@ CMDS=C
EXPECT=<<EOF
0x00000000 CCu "[29] ---- section size 599 named .strtab"
0x08048134 CCu "[01] -r-- section size 19 named .interp"
0x08048148 CCu "[02] -r-- section size 32 named .note.ABI_tag"
0x08048168 CCu "[03] -r-- section size 36 named .note.gnu.build_id"
0x08048148 CCu "[02] -r-- section size 32 named .note.ABI-tag"
0x08048168 CCu "[03] -r-- section size 36 named .note.gnu.build-id"
0x0804818c CCu "[04] -r-- section size 32 named .gnu.hash"
0x080481ac CCu "[05] -r-- section size 80 named .dynsym"
0x080481fc CCu "[06] -r-- section size 74 named .dynstr"
@ -156,8 +156,8 @@ CMDS=C*
EXPECT=<<EOF
CCu base64:WzI5XSAtLS0tIHNlY3Rpb24gc2l6ZSA1OTkgbmFtZWQgLnN0cnRhYg== @ 0x00000000
CCu base64:WzAxXSAtci0tIHNlY3Rpb24gc2l6ZSAxOSBuYW1lZCAuaW50ZXJw @ 0x08048134
CCu base64:WzAyXSAtci0tIHNlY3Rpb24gc2l6ZSAzMiBuYW1lZCAubm90ZS5BQklfdGFn @ 0x08048148
CCu base64:WzAzXSAtci0tIHNlY3Rpb24gc2l6ZSAzNiBuYW1lZCAubm90ZS5nbnUuYnVpbGRfaWQ= @ 0x08048168
CCu base64:WzAyXSAtci0tIHNlY3Rpb24gc2l6ZSAzMiBuYW1lZCAubm90ZS5BQkktdGFn @ 0x08048148
CCu base64:WzAzXSAtci0tIHNlY3Rpb24gc2l6ZSAzNiBuYW1lZCAubm90ZS5nbnUuYnVpbGQtaWQ= @ 0x08048168
CCu base64:WzA0XSAtci0tIHNlY3Rpb24gc2l6ZSAzMiBuYW1lZCAuZ251Lmhhc2g= @ 0x0804818c
CCu base64:WzA1XSAtci0tIHNlY3Rpb24gc2l6ZSA4MCBuYW1lZCAuZHluc3lt @ 0x080481ac
CCu base64:WzA2XSAtci0tIHNlY3Rpb24gc2l6ZSA3NCBuYW1lZCAuZHluc3Ry @ 0x080481fc
@ -461,7 +461,7 @@ EXPECT=<<EOF
0x080482c0 64 section..plt
0x080482c0 0 sym..plt
0x080482d0 16 sym.imp.puts
0x080482e0 16 loc.imp.__gmon_start
0x080482e0 16 loc.imp.__gmon_start__
0x080482f0 16 sym.imp.__libc_start_main
0x08048300 1 entry0
0x08048300 404 section..text
@ -485,13 +485,13 @@ EXPECT=<<EOF
0x080484a8 0 sym..rodata
0x080484a8 4 obj._fp_hw
0x080484ac 4 obj._IO_stdin_used
0x080484b0 13 str.Hello_world
0x080484b0 13 str.Hello_world_
0x080484c0 44 section..eh_frame_hdr
0x080484c0 44 segment.GNU_EH_FRAME
0x080484c0 0 sym..eh_frame_hdr
0x080484ec 176 section..eh_frame
0x080484ec 0 sym..eh_frame
0x08048598 0 obj.__FRAME_END
0x08048598 0 obj.__FRAME_END__
0x0804959c 4 section..init_array
0x0804959c 284 segment.LOAD1
0x0804959c 0 sym..init_array
@ -503,8 +503,8 @@ EXPECT=<<EOF
0x080495a0 0 loc.__init_array_end
0x080495a4 4 section..jcr
0x080495a4 0 sym..jcr
0x080495a4 0 obj.__JCR_LIST
0x080495a4 0 obj.__JCR_END
0x080495a4 0 obj.__JCR_LIST__
0x080495a4 0 obj.__JCR_END__
0x080495a8 232 section..dynamic
0x080495a8 232 segment.DYNAMIC
0x080495a8 0 sym..dynamic
@ -513,9 +513,9 @@ EXPECT=<<EOF
0x08049690 0 sym..got
0x08049694 24 section..got.plt
0x08049694 0 sym..got.plt
0x08049694 0 obj._GLOBAL_OFFSET_TABLE
0x08049694 0 obj._GLOBAL_OFFSET_TABLE_
0x080496a0 4 reloc.puts
0x080496a4 4 reloc.__gmon_start
0x080496a4 4 reloc.__gmon_start__
0x080496a8 4 reloc.__libc_start_main
0x080496ac 8 section..data
0x080496ac 0 sym..data
@ -527,7 +527,7 @@ EXPECT=<<EOF
0x080496b4 1 obj.completed.5979
0x080496b4 0 loc._edata
0x080496b4 0 loc.__bss_start
0x080496b4 0 obj.__TMC_END
0x080496b4 0 obj.__TMC_END__
0x080496b8 0 loc._end
EOF
RUN

View File

@ -8,8 +8,8 @@ nth paddr size vaddr vsize perm name
-------------------------------------------------
0 0x00000000 0x0 0x00000000 0x0 ----
1 0x00000200 0x1c 0x00404500 0x1c -r-- .interp
2 0x0000021c 0x20 0x0040021c 0x20 -r-- .note.ABI_tag
3 0x0000023c 0x24 0x0040023c 0x24 -r-- .note.gnu.build_id
2 0x0000021c 0x20 0x0040021c 0x20 -r-- .note.ABI-tag
3 0x0000023c 0x24 0x0040023c 0x24 -r-- .note.gnu.build-id
4 0x00000260 0x1c 0x00400260 0x1c -r-- .gnu.hash
5 0x00000280 0x60 0x00400280 0x60 -r-- .dynsym
6 0x000002e0 0x3d 0x004002e0 0x3d -r-- .dynstr

View File

@ -21,47 +21,47 @@ f~segment
f~section
EOF
EXPECT=<<EOF
0x00000000 0 segment.PAGEZERO
0x100000000 32768 segment.TEXT
0x100008000 16384 segment.DATA
0x10000c000 81920 segment.LLVM
0x100020000 4096 segment.LINKEDIT
0x100021000 942080 segment.DWARF
0x00000000 0 segment.__PAGEZERO
0x100000000 32768 segment.__TEXT
0x100008000 16384 segment.__DATA
0x10000c000 81920 segment.__LLVM
0x100020000 4096 segment.__LINKEDIT
0x100021000 942080 segment.__DWARF
0x100000000 25544 section.MACH_HEADER
0x1000063c8 412 section.TEXT___text
0x100006564 144 section.TEXT___stubs
0x1000065f4 168 section.TEXT___stub_helper
0x10000669c 3366 section.TEXT___objc_methname
0x1000073c2 112 section.TEXT___objc_classname
0x100007432 2778 section.TEXT___objc_methtype
0x100007f0c 144 section.TEXT___cstring
0x100007f9c 100 section.TEXT___unwind_info
0x100008000 8 section.DATA___got
0x100008008 96 section.DATA___la_symbol_ptr
0x100008068 32 section.DATA___cfstring
0x100008088 24 section.DATA___objc_classlist
0x1000080a0 32 section.DATA___objc_protolist
0x1000080c0 8 section.DATA___objc_imageinfo
0x1000080c8 4872 section.DATA___objc_const
0x1000093d0 32 section.DATA___objc_selrefs
0x1000093f0 16 section.DATA___objc_classrefs
0x100009400 8 section.DATA___objc_superrefs
0x100009408 4 section.DATA___objc_ivar
0x100009410 240 section.DATA___objc_data
0x100009500 392 section.DATA___data
0x10000c000 77261 section.LLVM___bundle
0x100021000 42034 section.DWARF___debug_line
0x10002b432 125245 section.DWARF___debug_pubtypes
0x100049d6f 288036 section.DWARF___debug_info
0x100090293 685 section.DWARF___debug_pubnames
0x100090540 729 section.DWARF___debug_loc
0x100090819 192 section.DWARF___debug_aranges
0x1000908d9 1925 section.DWARF___debug_abbrev
0x10009105e 342172 section.DWARF___debug_str
0x1000e48fa 732 section.DWARF___apple_names
0x1000e4bd6 36 section.DWARF___apple_namespac
0x1000e4bfa 139417 section.DWARF___apple_types
0x100106c93 156 section.DWARF___apple_objc
0x1000063c8 412 section.__TEXT___text
0x100006564 144 section.__TEXT___stubs
0x1000065f4 168 section.__TEXT___stub_helper
0x10000669c 3366 section.__TEXT___objc_methname
0x1000073c2 112 section.__TEXT___objc_classname
0x100007432 2778 section.__TEXT___objc_methtype
0x100007f0c 144 section.__TEXT___cstring
0x100007f9c 100 section.__TEXT___unwind_info
0x100008000 8 section.__DATA___got
0x100008008 96 section.__DATA___la_symbol_ptr
0x100008068 32 section.__DATA___cfstring
0x100008088 24 section.__DATA___objc_classlist
0x1000080a0 32 section.__DATA___objc_protolist
0x1000080c0 8 section.__DATA___objc_imageinfo
0x1000080c8 4872 section.__DATA___objc_const
0x1000093d0 32 section.__DATA___objc_selrefs
0x1000093f0 16 section.__DATA___objc_classrefs
0x100009400 8 section.__DATA___objc_superrefs
0x100009408 4 section.__DATA___objc_ivar
0x100009410 240 section.__DATA___objc_data
0x100009500 392 section.__DATA___data
0x10000c000 77261 section.__LLVM___bundle
0x100021000 42034 section.__DWARF___debug_line
0x10002b432 125245 section.__DWARF___debug_pubtypes
0x100049d6f 288036 section.__DWARF___debug_info
0x100090293 685 section.__DWARF___debug_pubnames
0x100090540 729 section.__DWARF___debug_loc
0x100090819 192 section.__DWARF___debug_aranges
0x1000908d9 1925 section.__DWARF___debug_abbrev
0x10009105e 342172 section.__DWARF___debug_str
0x1000e48fa 732 section.__DWARF___apple_names
0x1000e4bd6 36 section.__DWARF___apple_namespac
0x1000e4bfa 139417 section.__DWARF___apple_types
0x100106c93 156 section.__DWARF___apple_objc
EOF
RUN
@ -71,15 +71,15 @@ CMDS=<<EOF
is*~SceneDelegate
EOF
EXPECT=<<EOF
"f sym.__SceneDelegate_scene:willConnectToSession:options: 4 0x100006514"
"f sym.__SceneDelegate_sceneDidDisconnect: 4 0x100006518"
"f sym.__SceneDelegate_sceneDidBecomeActive: 4 0x10000651c"
"f sym.__SceneDelegate_sceneWillResignActive: 4 0x100006520"
"f sym.__SceneDelegate_sceneWillEnterForeground: 4 0x100006524"
"f sym.__SceneDelegate_sceneDidEnterBackground: 4 0x100006528"
"f sym.__SceneDelegate_window 16 0x10000652c"
"f sym.__SceneDelegate_setWindow: 20 0x10000653c"
"f sym.__SceneDelegate_.cxx_destruct 20 0x100006550"
"f sym.__SceneDelegate_scene:willConnectToSession:options:_ 4 0x100006514"
"f sym.__SceneDelegate_sceneDidDisconnect:_ 4 0x100006518"
"f sym.__SceneDelegate_sceneDidBecomeActive:_ 4 0x10000651c"
"f sym.__SceneDelegate_sceneWillResignActive:_ 4 0x100006520"
"f sym.__SceneDelegate_sceneWillEnterForeground:_ 4 0x100006524"
"f sym.__SceneDelegate_sceneDidEnterBackground:_ 4 0x100006528"
"f sym.__SceneDelegate_window_ 16 0x10000652c"
"f sym.__SceneDelegate_setWindow:_ 20 0x10000653c"
"f sym.__SceneDelegate_.cxx_destruct_ 20 0x100006550"
"f sym.__OBJC_LABEL_PROTOCOL___UISceneDelegate 8 0x1000080b0"
"f sym.__OBJC_LABEL_PROTOCOL___UIWindowSceneDelegate 8 0x1000080b8"
"f sym.__OBJC___PROTOCOL_REFS_UISceneDelegate 24 0x100008f50"
@ -124,7 +124,7 @@ fdj@0x100006430~{:
EOF
EXPECT=<<EOF
offset: 4294992900
name: sym.__AppDelegate_application:configurationForConnectingSceneSession:options:
name: sym.__AppDelegate_application:configurationForConnectingSceneSession:options:_
realname: -[AppDelegate application:configurationForConnectingSceneSession:options:]
EOF
RUN

View File

@ -72,7 +72,7 @@ NAME=MSVC import symbol demangling
FILE=bins/pe/libzmq-v100-mt-4_0_4.dll
CMDS=f~0x1004e0f4[2]
EXPECT=<<EOF
sym.imp.MSVCP100.dll_public:_void___thiscall_std::basic_ostream_char__struct_std::char_traits_char__::_Osfx_void
sym.imp.MSVCP100.dll_public:_void___thiscall_std::basic_ostream_char__struct_std::char_traits_char__::_Osfx_void_
EOF
RUN
@ -133,22 +133,22 @@ e asm.demangle=false
EOF
EXPECT=<<EOF
0x0804921a call sym.__x86.get_pc_thunk.si
0x08049249 call method QFlags<Qt::WindowType>::QFlags(int QFlags<Qt::WindowType>::Private::*) ; method.QFlags_Qt::WindowType_.QFlags_int_QFlags_Qt::WindowType_::Private::
0x08049278 call sym QLabel::QLabel(QString const&, QWidget*, QFlags<Qt::WindowType>) ; sym.imp.QLabel::QLabel_QString_const___QWidget___QFlags_Qt::WindowType
0x08049249 call method QFlags<Qt::WindowType>::QFlags(int QFlags<Qt::WindowType>::Private::*) ; method.QFlags_Qt::WindowType_.QFlags_int_QFlags_Qt::WindowType_::Private::_
0x08049278 call sym QLabel::QLabel(QString const&, QWidget*, QFlags<Qt::WindowType>) ; sym.imp.QLabel::QLabel_QString_const__QWidget__QFlags_Qt::WindowType__
0x0804921a call sym.__x86.get_pc_thunk.si
; method.QFlags_Qt::WindowType_.QFlags_int_QFlags_Qt::WindowType_::Private::
; method.QFlags_Qt::WindowType_.QFlags_int_QFlags_Qt::WindowType_::Private::_
0x08049249 call method QFlags<Qt::WindowType>::QFlags(int QFlags<Qt::WindowType>::Private::*)
; sym.imp.QLabel::QLabel_QString_const___QWidget___QFlags_Qt::WindowType
; sym.imp.QLabel::QLabel_QString_const__QWidget__QFlags_Qt::WindowType__
0x08049278 call sym QLabel::QLabel(QString const&, QWidget*, QFlags<Qt::WindowType>)
| 0x0804921a call sym.__x86.get_pc_thunk.si
| 0x08049249 call method QFlags<Qt::WindowType>::QFlags(int QFlags<Qt::WindowType>::Private::*) ; method.QFlags_Qt::WindowType_.QFlags_int_QFlags_Qt::WindowType_::Private::
| 0x08049278 call sym QLabel::QLabel(QString const&, QWidget*, QFlags<Qt::WindowType>) ; sym.imp.QLabel::QLabel_QString_const___QWidget___QFlags_Qt::WindowType
| 0x08049249 call method QFlags<Qt::WindowType>::QFlags(int QFlags<Qt::WindowType>::Private::*) ; method.QFlags_Qt::WindowType_.QFlags_int_QFlags_Qt::WindowType_::Private::_
| 0x08049278 call sym QLabel::QLabel(QString const&, QWidget*, QFlags<Qt::WindowType>) ; sym.imp.QLabel::QLabel_QString_const__QWidget__QFlags_Qt::WindowType__
| 0x0804921a call sym.__x86.get_pc_thunk.si
| 0x08049249 call method.QFlags_Qt::WindowType_.QFlags_int_QFlags_Qt::WindowType_::Private::
| 0x08049278 call sym.imp.QLabel::QLabel_QString_const___QWidget___QFlags_Qt::WindowType
| 0x08049249 call method.QFlags_Qt::WindowType_.QFlags_int_QFlags_Qt::WindowType_::Private::_
| 0x08049278 call sym.imp.QLabel::QLabel_QString_const__QWidget__QFlags_Qt::WindowType__
EOF
RUN
@ -176,9 +176,9 @@ pd 1
EOF
EXPECT=<<EOF
; CALL XREF from sym._init @ 0x8049008
; CALL XREF from QtPrivate::RefCount::deref() @ 0x8049349 ; method.QtPrivate::RefCount.deref
; CALL XREF from QString::QString(char const*) @ 0x804939d ; method.QString.QString_char_const
; CALL XREF from QString::~QString() @ 0x80493e5 ; method.QString._QString
; CALL XREF from QtPrivate::RefCount::deref() @ 0x8049349 ; method.QtPrivate::RefCount.deref__
; CALL XREF from QString::QString(char const*) @ 0x804939d ; method.QString.QString_char_const_
; CALL XREF from QString::~QString() @ 0x80493e5 ; method.QString.QString__
; CALL XREF from sym._fini @ 0x80495d4
/ 4: sym.__x86.get_pc_thunk.bx ();
| 0x08049140 mov ebx, dword [esp]
@ -188,11 +188,11 @@ EXPECT=<<EOF
| 0x8049140 |
| ; CALL XREF from sym._init @ 0x8049008 |
| ; CALL XREF from QtPrivate::RefCount::deref() @ 0x8049349 |
| ; method.QtPrivate::RefCount.deref |
| ; method.QtPrivate::RefCount.deref__ |
| ; CALL XREF from QString::QString(char const*) @ 0x804939d |
| ; method.QString.QString_char_const |
| ; method.QString.QString_char_const_ |
| ; CALL XREF from QString::~QString() @ 0x80493e5 |
| ; method.QString._QString |
| ; method.QString.QString__ |
| ; CALL XREF from sym._fini @ 0x80495d4 |
| 4: sym.__x86.get_pc_thunk.bx (); |
| mov ebx, dword [esp] |
@ -200,9 +200,9 @@ EXPECT=<<EOF
`--------------------------------------------------------------'
; CALL XREF from sym._init @ 0x8049008
; CALL XREF from method.QtPrivate::RefCount.deref @ 0x8049349
; CALL XREF from method.QString.QString_char_const @ 0x804939d
; CALL XREF from method.QString._QString @ 0x80493e5
; CALL XREF from method.QtPrivate::RefCount.deref__ @ 0x8049349
; CALL XREF from method.QString.QString_char_const_ @ 0x804939d
; CALL XREF from method.QString.QString__ @ 0x80493e5
; CALL XREF from sym._fini @ 0x80495d4
/ 4: sym.__x86.get_pc_thunk.bx ();
| 0x08049140 mov ebx, dword [esp]
@ -210,7 +210,7 @@ EXPECT=<<EOF
| ; CODE XREFS from QtPrivate::RefCount::deref() @ 0x8049371, 0x804937e
| 0x08049390 mov ebx, dword [var_4h]
| ; CODE XREFS from method.QtPrivate::RefCount.deref @ 0x8049371, 0x804937e
| ; CODE XREFS from method.QtPrivate::RefCount.deref__ @ 0x8049371, 0x804937e
| 0x08049390 mov ebx, dword [var_4h]
EOF
RUN
@ -230,15 +230,15 @@ EOF
EXPECT=<<EOF
; CALL XREF from main @ +0x222
; CALL XREF from fcn.00001717 @ +0xbb
; CALL XREF from std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string<char*, void>(char*, char*, std::allocator<char> const&) @ +0x66 ; sym.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___::basic_string_char___void__char___char___std::allocator_char__const
; CALL XREF from void std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char*>(char*, char*, std::forward_iterator_tag) @ +0x116 ; sym.void_std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___::_M_construct_char___char___char___std::forward_iterator_tag
; CALL XREF from std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string<char*, void>(char*, char*, std::allocator<char> const&) @ +0x66 ; sym.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___::basic_string_char__void__char__char__std::allocator_char__const_
; CALL XREF from void std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char*>(char*, char*, std::forward_iterator_tag) @ +0x116 ; sym.void_std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___::_M_construct_char__char__char__std::forward_iterator_tag_
/ 6: sym.imp._Unwind_Resume ();
\ 0x00000f10 jmp dword [ebx + 0x70]
; CALL XREF from main @ +0x222
; CALL XREF from fcn.00001717 @ +0xbb
; CALL XREF from sym.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___::basic_string_char___void__char___char___std::allocator_char__const @ +0x66
; CALL XREF from sym.void_std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___::_M_construct_char___char___char___std::forward_iterator_tag @ +0x116
; CALL XREF from sym.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___::basic_string_char__void__char__char__std::allocator_char__const_ @ +0x66
; CALL XREF from sym.void_std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___::_M_construct_char__char__char__std::forward_iterator_tag_ @ +0x116
/ 6: sym.imp._Unwind_Resume ();
\ 0x00000f10 jmp dword [ebx + 0x70]
EOF

View File

@ -46,7 +46,7 @@ NAME=: sections
FILE=bins/mdmp/calc.dmp
CMDS=iS~calc
EXPECT=<<EOF
9 0x00000000 0xe3000 0xfffe0000 0xe3000 ---- C:_Windows_System32_calc.exe
9 0x00000000 0xe3000 0xfffe0000 0xe3000 ---- C:\Windows\System32\calc.exe
EOF
RUN

View File

@ -33,7 +33,7 @@ EOF
EXPECT=<<EOF
;-- main:
;-- section..text:
0x00401000 68f0204000 push str.Hello__World ; 0x4020f0 ; "Hello, World!" ; [00] -r-x section size 4096 named .text
0x00401000 68f0204000 push str.Hello__World_ ; 0x4020f0 ; "Hello, World!" ; [00] -r-x section size 4096 named .text
EOF
RUN
@ -58,7 +58,7 @@ pd 1
EOF
EXPECT=<<EOF
;-- main:
0x00401380 68304b4000 push str.Hello__World ; 0x404b30 ; "Hello, World!"
0x00401380 68304b4000 push str.Hello__World_ ; 0x404b30 ; "Hello, World!"
EOF
RUN

View File

@ -111,7 +111,7 @@ e asm.comments=false
pd 1@0x0040131a~str.Hello
EOF
EXPECT=<<EOF
0x0040131a mov dword [esp], str.Hello
0x0040131a mov dword [esp], str.Hello_n
EOF
RUN

View File

@ -99,7 +99,7 @@ pi 2 @ 0x004010b7
EOF
EXPECT=<<EOF
push str.CrackMe_v1.0
push str.No_need_to_disasm_the_code
push str.No_need_to_disasm_the_code_
EOF
RUN
@ -111,8 +111,8 @@ aaa
pi 2 @ 0x0040136b
EOF
EXPECT=<<EOF
push str.No_luck
push str.No_luck_there__mate
push str.No_luck_
push str.No_luck_there__mate_
EOF
RUN
@ -124,8 +124,8 @@ aaa
pi 2 @ 0x004013af
EOF
EXPECT=<<EOF
push str.No_luck
push str.No_luck_there__mate
push str.No_luck_
push str.No_luck_there__mate_
EOF
RUN
@ -137,7 +137,7 @@ aaa
pi 2 @ 0x0040134f
EOF
EXPECT=<<EOF
push str.Good_work
push str.Great_work__mate__Now_try_the_next_CrackMe
push str.Good_work_
push str.Great_work__mate_Now_try_the_next_CrackMe_
EOF
RUN

View File

@ -105,7 +105,7 @@ EOF
EXPECT=<<EOF
0x00f003ec 3 35 sym._init
0x00f00420 1 6 sym.imp.__cxa_finalize
0x00f00430 1 6 loc.imp.__gmon_start
0x00f00430 1 6 loc.imp.__gmon_start__
0x00f00440 1 6 sym.imp.__libc_start_main
0x00f00450 1 49 entry0
0x00f00482 1 4 fcn.00f00482

View File

@ -107,8 +107,8 @@ nth paddr size vaddr vsize perm name
-------------------------------------------------
0 0x00000000 0x0 0x00000000 0x0 ---- prixfixe.
1 0x00000134 0x13 0x08048134 0x13 -r-- prixfixe..interp
2 0x00000148 0x20 0x08048148 0x20 -r-- prixfixe..note.ABI_tag
3 0x00000168 0x24 0x08048168 0x24 -r-- prixfixe..note.gnu.build_id
2 0x00000148 0x20 0x08048148 0x20 -r-- prixfixe..note.ABI-tag
3 0x00000168 0x24 0x08048168 0x24 -r-- prixfixe..note.gnu.build-id
4 0x0000018c 0x20 0x0804818c 0x20 -r-- prixfixe..gnu.hash
5 0x000001ac 0x50 0x080481ac 0x50 -r-- prixfixe..dynsym
6 0x000001fc 0x4a 0x080481fc 0x4a -r-- prixfixe..dynstr
@ -481,8 +481,8 @@ nth paddr size vaddr vsize perm name
-------------------------------------------------
0 0x00000000 0x0 0x00000000 0x0 ----
1 0x00000134 0x13 0x08048134 0x13 -r-- .interp
2 0x00000148 0x20 0x08048148 0x20 -r-- .note.ABI_tag
3 0x00000168 0x24 0x08048168 0x24 -r-- .note.gnu.build_id
2 0x00000148 0x20 0x08048148 0x20 -r-- .note.ABI-tag
3 0x00000168 0x24 0x08048168 0x24 -r-- .note.gnu.build-id
4 0x0000018c 0x20 0x0804818c 0x20 -r-- .gnu.hash
5 0x000001ac 0x50 0x080481ac 0x50 -r-- .dynsym
6 0x000001fc 0x4a 0x080481fc 0x4a -r-- .dynstr
@ -687,10 +687,10 @@ Segment Section
--------------------
PHDR
INTERP .interp
LOAD0 .interp .note.ABI_tag .note.gnu.build_id .gnu.hash .dynsym .dynstr .gnu.version .gnu.version_r .rel.dyn .rel.plt .init .plt .text .fini .rodata .eh_frame_hdr .eh_frame
LOAD0 .interp .note.ABI-tag .note.gnu.build-id .gnu.hash .dynsym .dynstr .gnu.version .gnu.version_r .rel.dyn .rel.plt .init .plt .text .fini .rodata .eh_frame_hdr .eh_frame
LOAD1 .init_array .fini_array .jcr .dynamic .got .got.plt .data .bss
DYNAMIC .dynamic
NOTE .note.ABI_tag .note.gnu.build_id
NOTE .note.ABI-tag .note.gnu.build-id
GNU_EH_FRAME .eh_frame_hdr
GNU_STACK
ehdr