2020-07-15 16:08:28 +08:00
|
|
|
/* radare2 - LGPL - [$minyear-$maxyear] - [$author]*/
|
|
|
|
|
|
|
|
#include <r_core.h>
|
2018-09-26 16:49:16 +08:00
|
|
|
|
|
|
|
typedef struct r_core_rtr_host_t2 {
|
|
|
|
int proto;
|
|
|
|
int port;
|
2020-07-15 16:08:28 +08:00
|
|
|
char host[512];
|
2018-09-26 16:49:16 +08:00
|
|
|
char file[1024];
|
|
|
|
RSocket *fd;
|
|
|
|
} RCoreRtrHost2;
|
|
|
|
|
|
|
|
static const char *help_msg_aa[] = {
|
|
|
|
"Usage:", "aa[0*?]", " # see also 'af' and 'afna'",
|
|
|
|
"aa", " ", "alias for 'af@@ sym.*;af@entry0;afva'", //;.afna @@ fcn.*'",
|
|
|
|
"aa*", "", "analyze all flags starting with sym. (af @@ sym.*)",
|
2020-07-15 16:08:28 +08:00
|
|
|
NULL
|
2018-09-26 16:49:16 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
static int cmpaddr(const void *_a, const void *_b) {
|
|
|
|
const RAnalFunction *a = _a, *b = _b;
|
|
|
|
return a->addr - b->addr;
|
|
|
|
}
|
|
|
|
|
2020-07-15 16:08:28 +08:00
|
|
|
int main(int argc, char **argv) {
|
|
|
|
r_anal_esil_set_pc (core->anal->esil, fcn? fcn->addr: core->offset);
|
2018-09-26 16:49:16 +08:00
|
|
|
switch (*input) {
|
2019-01-04 21:19:06 +08:00
|
|
|
case '\0': // "aft"
|
2018-09-26 16:49:16 +08:00
|
|
|
seek = core->offset;
|
2020-07-15 16:08:28 +08:00
|
|
|
r_anal_esil_set_pc (core->anal->esil, fcn? fcn->addr: core->offset);
|
2018-09-26 16:49:16 +08:00
|
|
|
r_core_anal_type_match (core, fcn);
|
|
|
|
r_core_seek (core, seek, true);
|
|
|
|
break;
|
2020-07-15 16:08:28 +08:00
|
|
|
case '0':
|
|
|
|
{
|
|
|
|
int a = 0;
|
|
|
|
printf ("LocalA: %d\n", a);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case 'a':
|
|
|
|
argc--;
|
|
|
|
/* fallthrough */
|
|
|
|
case 'b':
|
2018-09-26 16:49:16 +08:00
|
|
|
case '?':
|
|
|
|
default:
|
|
|
|
r_core_cmd_help (core, help_msg_aft);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|