forked from radareorg/iaito
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCorePlugin.cpp
More file actions
32 lines (30 loc) · 789 Bytes
/
CorePlugin.cpp
File metadata and controls
32 lines (30 loc) · 789 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include <r_core.h>
extern int main_iaito();
static int r_cmd_anal_call(void *user, const char *input)
{
RCore *core = (RCore *) user;
if (r_str_startswith(input, "iaito")) {
char *n = r_str_newf("%p", user);
r_sys_setenv("R2COREPTR", n);
free(n);
main_iaito();
return true;
}
return false;
}
extern "C" {
// PLUGIN Definition Info
RCorePlugin r_core_plugin_iaito = {
.meta =
{
.name = (char *)"iaito",
.desc = (char *)"Start iaito GUI from the radare2 shell",
.license = (char *)"LGPL3",
},
.call = r_cmd_anal_call,
};
#ifndef R2_PLUGIN_INCORE
R_API RLibStruct radare_plugin
= {.type = R_LIB_TYPE_CORE, .data = &r_core_plugin_iaito, .version = R2_VERSION};
#endif
}