Now TT in sandbox mode and fix segfault in free

This commit is contained in:
pancake 2014-08-28 03:41:23 +02:00
parent c6bc6f099d
commit 60c7c33e3f
3 changed files with 10 additions and 4 deletions

View File

@ -296,7 +296,7 @@ static int autocomplete(RLine *line) {
line->completion.argc = i;
line->completion.argv = tmp_argv;
free (path);
free (p);
//free (p);
} else
if((!memcmp (line->buffer.data, ".(", 2)) ||
(!memcmp (line->buffer.data, "(-", 2))) {

View File

@ -316,8 +316,6 @@ R_API int r_core_rtr_http(RCore *core, int launch, const char *path) {
R_API void r_core_rtr_help(RCore *core) {
const char* help_msg[] = {
"Usage:", " =[:!+-=hH] [...]", " # radare remote command execution protocol",
"=", ":port", "listen on given port using rap protocol (o rap://9999)",
"=", ":host:port cmd", "run 'cmd' command on remote server",
"\nrap commands:", "", "",
"=", "", "list all open connections",
"=<", "[fd] cmd", "send output of local command to remote fd",
@ -326,6 +324,9 @@ R_API void r_core_rtr_help(RCore *core) {
"=+", " [proto://]host", "add host (default=rap://, tcp://, udp://)",
"=-", "[fd]", "remove all hosts or host 'fd'",
"==", "[fd]", "open remote session with host 'fd', 'q' to quit",
"\nrap server:","","",
"=", ":port", "listen on given port using rap protocol (o rap://9999)",
"=", ":host:port cmd", "run 'cmd' command on remote server",
"\nhttp server:", "", "",
"=h", "", "listen for http connections (r2 -qc=H /bin/ls)",
"=H", "", "launch browser and listen for http",

View File

@ -606,7 +606,12 @@ R_API int r_core_visual_cmd(RCore *core, int ch) {
showcursor (core, R_FALSE);
break;
case 'T':
r_core_cmd0 (core, "TT");
if (r_sandbox_enable (0)) {
eprintf ("sandbox not enabled\n");
} else {
if (r_config_get_i (core->config, "scr.interactive"))
r_core_cmd0 (core, "TT");
}
break;
case 'F':
r_flag_unset_i (core->flags, core->offset + cursor, NULL);