diff --git a/binrz/rz-test/run.c b/binrz/rz-test/run.c index feca5f12d2..c6d5f47e04 100644 --- a/binrz/rz-test/run.c +++ b/binrz/rz-test/run.c @@ -157,7 +157,7 @@ RZ_API RzSubprocessOutput *rz_test_run_cmd_test(RzTestRunConfig *config, RzCmdTe } else { files->free = NULL; } - rz_list_push(files, "-"); + rz_list_push(files, "="); } ut64 timeout_ms = test->timeout.set ? test->timeout.value * 1000 : config->timeout_ms; RzSubprocessOutput *out = run_rz_test(config, timeout_ms, test->cmds.value, files, extra_args, test->load_plugins, runner, user); diff --git a/librz/core/cdebug.c b/librz/core/cdebug.c index abf14e67fa..2d2b7b43be 100644 --- a/librz/core/cdebug.c +++ b/librz/core/cdebug.c @@ -581,5 +581,5 @@ RZ_IPI void rz_core_debug_attach(RzCore *core, int pid) { } rz_debug_select(core->dbg, core->dbg->pid, core->dbg->tid); rz_config_set_i(core->config, "dbg.swstep", (core->dbg->h && !core->dbg->h->canstep)); - rz_core_cmdf(core, "=! \"pid %d\"", core->dbg->pid); + rz_core_cmdf(core, "R! \"pid %d\"", core->dbg->pid); } diff --git a/librz/core/cfile.c b/librz/core/cfile.c index 1c07a6a9af..0a33a634aa 100644 --- a/librz/core/cfile.c +++ b/librz/core/cfile.c @@ -1103,7 +1103,7 @@ RZ_API RzCoreFile *rz_core_file_open(RzCore *r, const char *file, int flags, ut6 const bool openmany = rz_config_get_i(r->config, "file.openmany"); RzCoreFile *fh = NULL; - if (!strcmp(file, "-")) { + if (!strcmp(file, "=")) { file = "malloc://512"; } //if not flags was passed open it with -r-- @@ -1186,7 +1186,7 @@ RZ_API RzCoreFile *rz_core_file_open(RzCore *r, const char *file, int flags, ut6 if (loadaddr != UT64_MAX) { rz_config_set_i(r->config, "bin.laddr", loadaddr); } - rz_core_cmd0(r, "=!"); + rz_core_cmd0(r, "R!"); beach: r->times->file_open_time = rz_time_now_mono() - prev; return fh; diff --git a/librz/core/cmd.c b/librz/core/cmd.c index 13a212eef5..8e20f851ae 100644 --- a/librz/core/cmd.c +++ b/librz/core/cmd.c @@ -6625,7 +6625,7 @@ RZ_API void rz_core_cmd_init(RzCore *core) { { "-", "open cfg.editor and run script", rz_cmd_stdin }, { ".", "interpret", rz_cmd_interpret }, { "/", "search kw, pattern aes", rz_cmd_search }, - { "=", "io pipe", rz_cmd_remote }, + { "R", "io pipe", rz_cmd_remote }, { "?", "help message", rz_cmd_help }, { "<", "pipe into RzCons.readChar", rz_cmd_pipein }, { "0", "alias for s 0x", rz_cmd_ox }, diff --git a/librz/core/cmd_api.c b/librz/core/cmd_api.c index 0155670f9b..a86cdee0fb 100644 --- a/librz/core/cmd_api.c +++ b/librz/core/cmd_api.c @@ -473,7 +473,7 @@ RZ_API int rz_cmd_call(RzCmd *cmd, const char *input) { rz_cons_strcat(ji + 1); return true; } else { - nstr = rz_str_newf("=! %s", input); + nstr = rz_str_newf("R! %s", input); input = nstr; } } diff --git a/librz/core/cmd_descs/cmd_descs.c b/librz/core/cmd_descs/cmd_descs.c index 119f06cfd6..17590e01a8 100644 --- a/librz/core/cmd_descs/cmd_descs.c +++ b/librz/core/cmd_descs/cmd_descs.c @@ -509,7 +509,7 @@ static const RzCmdDescHelp cmd_search_help = { .summary = "Search for bytes, regexps, patterns, ..", }; -static const RzCmdDescHelp equal__help = { +static const RzCmdDescHelp R_help = { .summary = "Connect with other instances of rizin", }; static const RzCmdDescArg remote_args[] = { @@ -683,7 +683,7 @@ static const RzCmdDescArg remote_rap_bg_args[] = { { 0 }, }; static const RzCmdDescHelp remote_rap_bg_help = { - .summary = "Start rap server in background (same as '&_=h')", + .summary = "Start rap server in background (same as '& Rr')", .args = remote_rap_bg_args, }; @@ -3971,45 +3971,45 @@ RZ_IPI void newshell_cmddescs_init(RzCore *core) { RzCmdDesc *cmd_search_cd = rz_cmd_desc_oldinput_new(core->rcmd, root_cd, "/", rz_cmd_search, &cmd_search_help); rz_warn_if_fail(cmd_search_cd); - RzCmdDesc *equal__cd = rz_cmd_desc_group_new(core->rcmd, root_cd, "=", rz_remote_handler, &remote_help, &equal__help); - rz_warn_if_fail(equal__cd); - RzCmdDesc *remote_send_cd = rz_cmd_desc_argv_new(core->rcmd, equal__cd, "=<", rz_remote_send_handler, &remote_send_help); + RzCmdDesc *R_cd = rz_cmd_desc_group_new(core->rcmd, root_cd, "R", rz_remote_handler, &remote_help, &R_help); + rz_warn_if_fail(R_cd); + RzCmdDesc *remote_send_cd = rz_cmd_desc_argv_new(core->rcmd, R_cd, "R<", rz_remote_send_handler, &remote_send_help); rz_warn_if_fail(remote_send_cd); - RzCmdDesc *io_system_run_oldhandler_cd = rz_cmd_desc_oldinput_new(core->rcmd, equal__cd, "=!", rz_io_system_run_oldhandler, &io_system_run_oldhandler_help); + RzCmdDesc *io_system_run_oldhandler_cd = rz_cmd_desc_oldinput_new(core->rcmd, R_cd, "R!", rz_io_system_run_oldhandler, &io_system_run_oldhandler_help); rz_warn_if_fail(io_system_run_oldhandler_cd); - RzCmdDesc *remote_add_cd = rz_cmd_desc_argv_new(core->rcmd, equal__cd, "=+", rz_remote_add_handler, &remote_add_help); + RzCmdDesc *remote_add_cd = rz_cmd_desc_argv_new(core->rcmd, R_cd, "R+", rz_remote_add_handler, &remote_add_help); rz_warn_if_fail(remote_add_cd); - RzCmdDesc *remote_del_cd = rz_cmd_desc_argv_new(core->rcmd, equal__cd, "=-", rz_remote_del_handler, &remote_del_help); + RzCmdDesc *remote_del_cd = rz_cmd_desc_argv_new(core->rcmd, R_cd, "R-", rz_remote_del_handler, &remote_del_help); rz_warn_if_fail(remote_del_cd); - RzCmdDesc *remote_open_cd = rz_cmd_desc_argv_new(core->rcmd, equal__cd, "==", rz_remote_open_handler, &remote_open_help); + RzCmdDesc *remote_open_cd = rz_cmd_desc_argv_new(core->rcmd, R_cd, "R=", rz_remote_open_handler, &remote_open_help); rz_warn_if_fail(remote_open_cd); - RzCmdDesc *remote_mode_enable_cd = rz_cmd_desc_argv_new(core->rcmd, equal__cd, "=!=", rz_remote_mode_enable_handler, &remote_mode_enable_help); + RzCmdDesc *remote_mode_enable_cd = rz_cmd_desc_argv_new(core->rcmd, R_cd, "R!=", rz_remote_mode_enable_handler, &remote_mode_enable_help); rz_warn_if_fail(remote_mode_enable_cd); - RzCmdDesc *remote_mode_disable_cd = rz_cmd_desc_argv_new(core->rcmd, equal__cd, "!=!", rz_remote_mode_disable_handler, &remote_mode_disable_help); + RzCmdDesc *remote_mode_disable_cd = rz_cmd_desc_argv_new(core->rcmd, R_cd, "R=!", rz_remote_mode_disable_handler, &remote_mode_disable_help); rz_warn_if_fail(remote_mode_disable_cd); - RzCmdDesc *remote_rap_cd = rz_cmd_desc_argv_new(core->rcmd, equal__cd, "=r", rz_remote_rap_handler, &remote_rap_help); + RzCmdDesc *remote_rap_cd = rz_cmd_desc_argv_new(core->rcmd, R_cd, "Rr", rz_remote_rap_handler, &remote_rap_help); rz_warn_if_fail(remote_rap_cd); - RzCmdDesc *equal_g_handler_old_cd = rz_cmd_desc_oldinput_new(core->rcmd, equal__cd, "=g", rz_equal_g_handler_old, &equal_g_handler_old_help); + RzCmdDesc *equal_g_handler_old_cd = rz_cmd_desc_oldinput_new(core->rcmd, R_cd, "Rg", rz_equal_g_handler_old, &equal_g_handler_old_help); rz_warn_if_fail(equal_g_handler_old_cd); - RzCmdDesc *equal_h_handler_old_cd = rz_cmd_desc_oldinput_new(core->rcmd, equal__cd, "=h", rz_equal_h_handler_old, &equal_h_handler_old_help); + RzCmdDesc *equal_h_handler_old_cd = rz_cmd_desc_oldinput_new(core->rcmd, R_cd, "Rh", rz_equal_h_handler_old, &equal_h_handler_old_help); rz_warn_if_fail(equal_h_handler_old_cd); - RzCmdDesc *equal_H_handler_old_cd = rz_cmd_desc_oldinput_new(core->rcmd, equal__cd, "=H", rz_equal_H_handler_old, &equal_H_handler_old_help); + RzCmdDesc *equal_H_handler_old_cd = rz_cmd_desc_oldinput_new(core->rcmd, R_cd, "RH", rz_equal_H_handler_old, &equal_H_handler_old_help); rz_warn_if_fail(equal_H_handler_old_cd); - RzCmdDesc *remote_tcp_cd = rz_cmd_desc_argv_new(core->rcmd, equal__cd, "=t", rz_remote_tcp_handler, &remote_tcp_help); + RzCmdDesc *remote_tcp_cd = rz_cmd_desc_argv_new(core->rcmd, R_cd, "Rt", rz_remote_tcp_handler, &remote_tcp_help); rz_warn_if_fail(remote_tcp_cd); - RzCmdDesc *remote_rap_bg_cd = rz_cmd_desc_argv_new(core->rcmd, equal__cd, "=&r", rz_remote_rap_bg_handler, &remote_rap_bg_help); + RzCmdDesc *remote_rap_bg_cd = rz_cmd_desc_argv_new(core->rcmd, R_cd, "R&r", rz_remote_rap_bg_handler, &remote_rap_bg_help); rz_warn_if_fail(remote_rap_bg_cd); RzCmdDesc *cmd_help_search_cd = rz_cmd_desc_argv_modes_new(core->rcmd, root_cd, "?*", RZ_OUTPUT_MODE_STANDARD | RZ_OUTPUT_MODE_JSON, rz_cmd_help_search_handler, &cmd_help_search_help); diff --git a/librz/core/cmd_descs/cmd_descs.yaml b/librz/core/cmd_descs/cmd_descs.yaml index 22fce737a5..3bc7d3fd53 100644 --- a/librz/core/cmd_descs/cmd_descs.yaml +++ b/librz/core/cmd_descs/cmd_descs.yaml @@ -150,7 +150,7 @@ commands: cname: cmd_search summary: Search for bytes, regexps, patterns, .. type: RZ_CMD_DESC_TYPE_OLDINPUT - - name: "=" + - name: "R" summary: Connect with other instances of rizin subcommands: cmd_remote - name: "?*" diff --git a/librz/core/cmd_descs/cmd_remote.yaml b/librz/core/cmd_descs/cmd_remote.yaml index c86bc24fe5..a3e6108cf2 100644 --- a/librz/core/cmd_descs/cmd_remote.yaml +++ b/librz/core/cmd_descs/cmd_remote.yaml @@ -3,7 +3,7 @@ --- name: cmd_remote commands: - - name: "=" + - name: "R" cname: remote summary: List all open connections / Exec at remote args_str: " [[] ]" @@ -13,7 +13,7 @@ commands: optional: true - name: cmd type: RZ_CMD_ARG_TYPE_CMD - - name: =< + - name: R< cname: remote_send summary: Send output of local to remote args: @@ -22,43 +22,43 @@ commands: optional: true - name: cmd type: RZ_CMD_ARG_TYPE_CMD - - name: =! + - name: R! cname: io_system_run_oldhandler summary: Run via rz_io_system type: RZ_CMD_DESC_TYPE_OLDINPUT args_str: "[]" options: "" - - name: =+ + - name: R+ cname: remote_add summary: Connect to remote host:port args: - name: "[proto://]host:port" type: RZ_CMD_ARG_TYPE_STRING - - name: =- + - name: R- cname: remote_del summary: remove all hosts or host 'fd' args: - name: fd type: RZ_CMD_ARG_TYPE_NUM optional: true - - name: == + - name: R= cname: remote_open summary: Open remote session with host 'fd', 'q' to quit args: - name: fd type: RZ_CMD_ARG_TYPE_NUM - - name: =!= + - name: R!= cname: remote_mode_enable summary: Enable remote cmd mode, sending commands to remote server args: - name: fd type: RZ_CMD_ARG_TYPE_NUM default_value: "0" - - name: "!=!" + - name: "R=!" cname: remote_mode_disable summary: Disable remote cmd mode args: [] - - name: "=r" + - name: "Rr" cname: remote_rap summary: Start the rap server (o rap://9999) / Execute on rap server args: @@ -67,19 +67,19 @@ commands: - name: cmd type: RZ_CMD_ARG_TYPE_CMD optional: true - - name: =g + - name: Rg cname: equal_g_handler_old summary: Start the gdbserver type: RZ_CMD_DESC_TYPE_OLDINPUT - - name: =h + - name: Rh cname: equal_h_handler_old summary: Start the http webserver type: RZ_CMD_DESC_TYPE_OLDINPUT - - name: =H + - name: RH cname: equal_H_handler_old summary: Start the http webserver (and launch the web browser) type: RZ_CMD_DESC_TYPE_OLDINPUT - - name: =t + - name: Rt cname: remote_tcp summary: Start the tcp server args: @@ -88,9 +88,9 @@ commands: - name: cmd type: RZ_CMD_ARG_TYPE_CMD optional: true - - name: "=&r" + - name: "R&r" cname: remote_rap_bg - summary: Start rap server in background (same as '&_=h') + summary: Start rap server in background (same as '& Rr') args: - name: port type: RZ_CMD_ARG_TYPE_NUM \ No newline at end of file diff --git a/librz/core/cmd_help.c b/librz/core/cmd_help.c index d5361b0233..8386c8dfd8 100644 --- a/librz/core/cmd_help.c +++ b/librz/core/cmd_help.c @@ -67,8 +67,8 @@ static const char *help_msg_exclamation[] = { "!", "echo $RZ_SIZE", "display file size", "!-", "", "clear history in current session", "!-*", "", "clear and save empty history log", - "!=!", "", "enable remotecmd mode", - "=!=", "", "disable remotecmd mode", + "R=!", "", "enable remotecmd mode", + "R!=", "", "disable remotecmd mode", NULL }; diff --git a/librz/core/cmd_remote.c b/librz/core/cmd_remote.c index 930af05291..ff54a2db1e 100644 --- a/librz/core/cmd_remote.c +++ b/librz/core/cmd_remote.c @@ -7,53 +7,52 @@ #include "rz_core.h" static const char *help_msg_equal[] = { - "Usage:", " =[:!+-=ghH] [...]", " # connect with other instances of rizin", + "Usage:", " R[:!+-=ghH] [...]", " # connect with other instances of rizin", "\nremote commands:", "", "", - "=", "", "list all open connections", - "=<", "[fd] cmd", "send output of local command to remote fd", // XXX may not be a special char - "=", "[fd] cmd", "exec cmd at remote 'fd' (last open is default one)", - "=!", " cmd", "run command via rz_io_system", - "=+", " [proto://]host:port", "connect to remote host:port (*rap://, raps://, tcp://, udp://, http://)", - "=-", "[fd]", "remove all hosts or host 'fd'", - "==", "[fd]", "open remote session with host 'fd', 'q' to quit", - "=!=", "", "disable remote cmd mode", - "!=!", "", "enable remote cmd mode", + "R", "", "list all open connections", + "R<", "[fd] cmd", "send output of local command to remote fd", // XXX may not be a special char + "R", "[fd] cmd", "exec cmd at remote 'fd' (last open is default one)", + "R!", " cmd", "run command via rz_io_system", + "R+", " [proto://]host:port", "connect to remote host:port (*rap://, raps://, tcp://, udp://, http://)", + "R-", "[fd]", "remove all hosts or host 'fd'", + "R=", "[fd]", "open remote session with host 'fd', 'q' to quit", + "R!=", "", "disable remote cmd mode", + "R=!", "", "enable remote cmd mode", "\nservers:", "", "", ".:", "9000", "start the tcp server (echo x|nc ::1 9090 or curl ::1:9090/cmd/x)", - "=:", "port", "start the rap server (o rap://9999)", - "=g", "[?]", "start the gdbserver", - "=h", "[?]", "start the http webserver", - "=H", "[?]", "start the http webserver (and launch the web browser)", + "R:", "port", "start the rap server (o rap://9999)", + "Rg", "[?]", "start the gdbserver", + "Rh", "[?]", "start the http webserver", + "RH", "[?]", "start the http webserver (and launch the web browser)", "\nother:", "", "", - "=&", ":port", "start rap server in background (same as '&_=h')", - "=", ":host:port cmd", "run 'cmd' command on remote server", + "R&", ":port", "start rap server in background (same as '& Rr')", + "R", ":host:port cmd", "run 'cmd' command on remote server", "\nexamples:", "", "", - "=+", "tcp://localhost:9090/", "connect to: rizin -c.:9090 ./bin", - // "=+", "udp://localhost:9090/", "connect to: rizin -c.:9090 ./bin", - "=+", "rap://localhost:9090/", "connect to: rizin rap://:9090", - "=+", "http://localhost:9090/cmd/", "connect to: rizin -c'=h 9090' bin", + "R+", "tcp://localhost:9090/", "connect to: rizin -c.:9090 ./bin", + "R+", "rap://localhost:9090/", "connect to: rizin rap://:9090", + "R+", "http://localhost:9090/cmd/", "connect to: rizin -c'Rh 9090' bin", "o ", "rap://:9090/", "start the rap server on tcp port 9090", NULL }; static const char *help_msg_equalh[] = { - "Usage:", " =[hH] [...]", " # http server", + "Usage:", " R[hH] [...]", " # http server", "http server:", "", "", - "=h", " port", "listen for http connections (rizin -qc=H /bin/ls)", - "=h-", "", "stop background webserver", - "=h--", "", "stop foreground webserver", - "=h*", "", "restart current webserver", - "=h&", " port", "start http server in background", - "=H", " port", "launch browser and listen for http", - "=H&", " port", "launch browser and listen for http in background", + "Rh", " port", "listen for http connections (rizin -qcRH /bin/ls)", + "Rh-", "", "stop background webserver", + "Rh--", "", "stop foreground webserver", + "Rh*", "", "restart current webserver", + "Rh&", " port", "start http server in background", + "RH", " port", "launch browser and listen for http", + "RH&", " port", "launch browser and listen for http in background", NULL }; static const char *help_msg_equalg[] = { - "Usage:", " =[g] [...]", " # gdb server", + "Usage:", " R[g] [...]", " # gdb server", "gdbserver:", "", "", - "=g", " port file [args]", "listen on 'port' debugging 'file' using gdbserver", - "=g!", " port file [args]", "same as above, but debug protocol messages (like gdbserver --remote-debug)", + "Rg", " port file [args]", "listen on 'port' debugging 'file' using gdbserver", + "Rg!", " port file [args]", "same as above, but debug protocol messages (like gdbserver --remote-debug)", NULL }; @@ -100,16 +99,16 @@ RZ_IPI int rz_equal_H_handler_old(void *data, const char *input) { RZ_IPI int rz_cmd_remote(void *data, const char *input) { RzCore *core = (RzCore *)data; switch (*input) { - case '\0': // "=" + case '\0': // "R" rz_core_rtr_list(core); break; - case 'j': // "=j" + case 'j': // "Rj" eprintf("TODO: list connections in json\n"); break; - case '!': // "=!" + case '!': // "R!" if (input[1] == 'q') { RZ_FREE(core->cmdremote); - } else if (input[1] == '=') { // =!=0 or =!= for iosystem + } else if (input[1] == '=') { // R!=0 or R!= for iosystem RZ_FREE(core->cmdremote); core->cmdremote = rz_str_trim_dup(input + 2); } else { @@ -120,29 +119,29 @@ RZ_IPI int rz_cmd_remote(void *data, const char *input) { } } break; - case '+': // "=+" + case '+': // "R+" rz_core_rtr_add(core, input + 1); break; - case '-': // "=-" + case '-': // "R-" rz_core_rtr_remove(core, input + 1); break; //case ':': rz_core_rtr_cmds (core, input + 1); break; - case '<': // "=<" + case '<': // "R<" rz_core_rtr_pushout(core, input + 1); break; - case '=': // "==" + case '=': // "R=" rz_core_rtr_session(core, input + 1); break; - case 'g': // "=g" + case 'g': // "Rg" rz_equal_g_handler_old(core, input + 1); break; - case 'h': // "=h" + case 'h': // "Rh" rz_equal_h_handler_old(core, input + 1); break; - case 'H': // "=H" + case 'H': // "RH" rz_equal_H_handler_old(core, input + 1); break; - case '?': // "=?" + case '?': // "R?" rz_core_cmd_help(core, help_msg_equal); break; default: diff --git a/librz/core/core.c b/librz/core/core.c index a76e526d1d..0563fe6d0d 100644 --- a/librz/core/core.c +++ b/librz/core/core.c @@ -838,8 +838,8 @@ static const char *rizin_argv[] = { "*?", "*", "$", "(", "(*", "(-", "()", ".?", ".", "..", "...", ".:", ".--", ".-", ".!", ".(", "./", ".*", "_?", "_", - "=?", "=", "=<", "=!", "=+", "=-", "==", "=!=", "!=!", "=:", "=&:", - "=g?", "=g", "=g!", "=h?", "=h", "=h-", "=h--", "=h*", "=h&", "=H?", "=H", "=H&", + "R?", "R", "R<", "R!", "R+", "R-", "R=", "R!=", "R=!", "R:", "R&:", + "Rg?", "Rg", "Rg!", "Rh?", "Rh", "Rh-", "Rh--", "Rh*", "Rh&", "RH?", "RH", "RH&", "<", "/?", "/", "/j", "/j!", "/j!x", "/+", "//", "/a", "/a1", "/ab", "/ad", "/aa", "/as", "/asl", "/at", "/atl", "/af", "/afl", "/ae", "/aej", "/ai", "/aij", "/c", "/ca", "/car", "/d", "/e", "/E", "/Ej", "/f", "/F", "/g", "/gg", "/h", "/ht", "/i", "/m", "/mb", "/mm", @@ -2733,7 +2733,7 @@ static void set_prompt(RzCore *r) { char *s = rz_core_cmd_str(r, "s"); r->offset = rz_num_math(NULL, s); free(s); - remote = "=!"; + remote = "R!"; } if (rz_config_get_i(r->config, "scr.color")) { diff --git a/librz/core/rtr.c b/librz/core/rtr.c index 817c83c05b..f31a468443 100644 --- a/librz/core/rtr.c +++ b/librz/core/rtr.c @@ -861,7 +861,7 @@ RZ_API void rz_core_rtr_cmd(RzCore *core, const char *input) { return; } - if (*input == '&') { // "=h&" "=&:9090" + if (*input == '&') { // "Rh&" "R&:9090" if (rapthread) { eprintf("RAP Thread is already running\n"); eprintf("This is experimental and probably buggy. Use at your own risk\n"); diff --git a/librz/core/rtr_http.c b/librz/core/rtr_http.c index 9e29fb4ed2..daa2df785d 100644 --- a/librz/core/rtr_http.c +++ b/librz/core/rtr_http.c @@ -313,8 +313,8 @@ static int rz_core_rtr_http_run(RzCore *core, int launch, int browse, const char rz_str_uri_decode(cmd); rz_config_set(core->config, "scr.interactive", "false"); - if ((!strcmp(cmd, "=h*") || - !strcmp(cmd, "=h--"))) { + if ((!strcmp(cmd, "Rh*") || + !strcmp(cmd, "Rh--"))) { out = NULL; } else if (*cmd == ':') { /* commands in /cmd/: starting with : do not show any output */ @@ -336,14 +336,14 @@ static int rz_core_rtr_http_run(RzCore *core, int launch, int browse, const char rz_socket_http_response(rs, 200, "", 0, headers); } - if (!strcmp(cmd, "=h*")) { + if (!strcmp(cmd, "Rh*")) { /* do stuff */ rz_socket_http_close(rs); free(dir); free(refstr); ret = -2; goto the_end; - } else if (!strcmp(cmd, "=h--")) { + } else if (!strcmp(cmd, "Rh--")) { rz_socket_http_close(rs); free(dir); free(refstr); @@ -530,7 +530,7 @@ RZ_API int rz_core_rtr_http(RzCore *core, int launch, int browse, const char *pa while (*path == '&') { path++; } - return rz_core_cmdf(core, "& =h%s", path); + return rz_core_cmdf(core, "& Rh%s", path); } #if 0 if (httpthread) { diff --git a/librz/io/p/io_bochs.c b/librz/io/p/io_bochs.c index 3177f405cd..3a44f291fe 100644 --- a/librz/io/p/io_bochs.c +++ b/librz/io/p/io_bochs.c @@ -90,9 +90,9 @@ static int __close(RzIODesc *fd) { static char *__system(RzIO *io, RzIODesc *fd, const char *cmd) { lprintf("system command (%s)\n", cmd); if (!strcmp(cmd, "help")) { - lprintf("Usage: =!cmd args\n" - " =!: - Send a bochs command.\n" - " =!dobreak - pause bochs.\n"); + lprintf("Usage: R!cmd args\n" + " R!: - Send a bochs command.\n" + " R!dobreak - pause bochs.\n"); lprintf("io_system: Enviando commando bochs\n"); bochs_send_cmd(desc, &cmd[1], true); io->cb_printf("%s\n", desc->data); diff --git a/librz/io/p/io_gdb.c b/librz/io/p/io_gdb.c index 20f55918e4..0f5df2c837 100644 --- a/librz/io/p/io_gdb.c +++ b/librz/io/p/io_gdb.c @@ -208,19 +208,19 @@ static char *__system(RzIO *io, RzIODesc *fd, const char *cmd) { return NULL; } if (cmd[0] == '?' || !strcmp(cmd, "help")) { - eprintf("Usage: =!cmd args\n" - " =!pid - show targeted pid\n" - " =!pkt s - send packet 's'\n" - " =!rd - show reverse debugging availability\n" - " =!dsb - step backwards\n" - " =!dcb - continue backwards\n" - " =!monitor cmd - hex-encode monitor command and pass" + eprintf("Usage: R!cmd args\n" + " R!pid - show targeted pid\n" + " R!pkt s - send packet 's'\n" + " R!rd - show reverse debugging availability\n" + " R!dsb - step backwards\n" + " R!dcb - continue backwards\n" + " R!monitor cmd - hex-encode monitor command and pass" " to target interpreter\n" - " =!detach [pid] - detach from remote/detach specific pid\n" - " =!inv.reg - invalidate reg cache\n" - " =!pktsz - get max packet size used\n" - " =!pktsz bytes - set max. packet size as 'bytes' bytes\n" - " =!exec_file [pid] - get file which was executed for" + " R!detach [pid] - detach from remote/detach specific pid\n" + " R!inv.reg - invalidate reg cache\n" + " R!pktsz - get max packet size used\n" + " R!pktsz bytes - set max. packet size as 'bytes' bytes\n" + " R!exec_file [pid] - get file which was executed for" " current/specified pid\n"); return NULL; } @@ -396,7 +396,7 @@ static char *__system(RzIO *io, RzIODesc *fd, const char *cmd) { desc->get_baddr = true; return NULL; } - eprintf("Try: '=!?'\n"); + eprintf("Try: 'R!?'\n"); return NULL; } diff --git a/librz/io/p/io_gprobe.c b/librz/io/p/io_gprobe.c index 5d8852c8c2..c61ceb4464 100644 --- a/librz/io/p/io_gprobe.c +++ b/librz/io/p/io_gprobe.c @@ -1165,13 +1165,13 @@ static char *__system(RzIO *io, RzIODesc *fd, const char *cmd) { gprobe = (RzIOGprobe *)fd->data; if (!cmd[0] || cmd[0] == '?' || !strcmp(cmd, "help")) { - printf("Usage: =!cmd args\n" - " =!reset code\n" - " =!debugon\n" - " =!debugoff\n" - " =!runcode address\n" - " =!getdeviceid\n" - " =!getinformation\n"); + printf("Usage: R!cmd args\n" + " R!reset code\n" + " R!debugon\n" + " R!debugoff\n" + " R!runcode address\n" + " R!getdeviceid\n" + " R!getinformation\n"); return NULL; } @@ -1218,7 +1218,7 @@ static char *__system(RzIO *io, RzIODesc *fd, const char *cmd) { return NULL; } - printf("Try: '=!?'\n"); + printf("Try: 'R!?'\n"); return NULL; } diff --git a/librz/io/p/io_mach.c b/librz/io/p/io_mach.c index 5650d35289..d45f59b468 100644 --- a/librz/io/p/io_mach.c +++ b/librz/io/p/io_mach.c @@ -492,7 +492,7 @@ static char *__system(RzIO *io, RzIODesc *fd, const char *cmd) { int pagesize = tsk_pagesize(fd); tsk_setperm(io, task, io->off, pagesize, perm); } else { - eprintf("Usage: =!perm [rwx]\n"); + eprintf("Usage: R!perm [rwx]\n"); } return NULL; } @@ -527,7 +527,7 @@ static char *__system(RzIO *io, RzIODesc *fd, const char *cmd) { } eprintf("io_mach_system: Invalid pid %d\n", pid); } else { - eprintf("Try: '=!pid' or '=!perm'\n"); + eprintf("Try: 'R!pid' or 'R!perm'\n"); } return NULL; } diff --git a/librz/io/p/io_procpid.c b/librz/io/p/io_procpid.c index 6ed247f81a..573504b1c5 100644 --- a/librz/io/p/io_procpid.c +++ b/librz/io/p/io_procpid.c @@ -115,7 +115,7 @@ static char *__system(RzIO *io, RzIODesc *fd, const char *cmd) { } io->cb_printf("%d\n", iop->pid); } else { - eprintf("Try: '=!pid'\n"); + eprintf("Try: 'R!pid'\n"); } return NULL; } diff --git a/librz/io/p/io_ptrace.c b/librz/io/p/io_ptrace.c index 46d759e502..8cd15752da 100644 --- a/librz/io/p/io_ptrace.c +++ b/librz/io/p/io_ptrace.c @@ -297,11 +297,11 @@ static char *__system(RzIO *io, RzIODesc *fd, const char *cmd) { return NULL; } if (!strcmp(cmd, "help")) { - eprintf("Usage: =!cmd args\n" - " =!ptrace - use ptrace io\n" - " =!mem - use /proc/pid/mem io if possible\n" - " =!pid - show targeted pid\n" - " =!pid <#> - select new pid\n"); + eprintf("Usage: R!cmd args\n" + " R!ptrace - use ptrace io\n" + " R!mem - use /proc/pid/mem io if possible\n" + " R!pid - show targeted pid\n" + " R!pid <#> - select new pid\n"); } else if (!strcmp(cmd, "ptrace")) { close_pidmem(iop); } else if (!strcmp(cmd, "mem")) { @@ -321,7 +321,7 @@ static char *__system(RzIO *io, RzIODesc *fd, const char *cmd) { return rz_str_newf("%d", iop->pid); } } else { - eprintf("Try: '=!pid'\n"); + eprintf("Try: 'R!pid'\n"); } return NULL; } diff --git a/librz/io/p/io_rap.c b/librz/io/p/io_rap.c index b9f91a5d07..9f6019660d 100644 --- a/librz/io/p/io_rap.c +++ b/librz/io/p/io_rap.c @@ -147,9 +147,9 @@ static RzIODesc *__rap_open(RzIO *io, const char *pathname, int rw, int mode) { if (i > 0) { eprintf("rap connection was successful. open %d\n", i); // io->corebind.cmd (io->corebind.core, "e io.va=0"); - io->corebind.cmd(io->corebind.core, ".=!i*"); - io->corebind.cmd(io->corebind.core, ".=!f*"); - io->corebind.cmd(io->corebind.core, ".=!om*"); + io->corebind.cmd(io->corebind.core, ".R!i*"); + io->corebind.cmd(io->corebind.core, ".R!f*"); + io->corebind.cmd(io->corebind.core, ".R!om*"); } } return rz_io_desc_new(io, &rz_io_plugin_rap, diff --git a/librz/io/p/io_rzk.c b/librz/io/p/io_rzk.c index 39df0b9ebd..0943b52e49 100644 --- a/librz/io/p/io_rzk.c +++ b/librz/io/p/io_rzk.c @@ -98,7 +98,7 @@ static char *rzk__system(RzIO *io, RzIODesc *fd, const char *cmd) { (void)run_ioctl_command(io, fd, cmd); return NULL; #else - eprintf("Try: '=!mod'\n '.=!mod'\n"); + eprintf("Try: 'R!mod'\n '.R!mod'\n"); #endif } return NULL; diff --git a/librz/io/p/io_rzk_linux.c b/librz/io/p/io_rzk_linux.c index fafeb4b41e..16f4bd9e7d 100644 --- a/librz/io/p/io_rzk_linux.c +++ b/librz/io/p/io_rzk_linux.c @@ -247,10 +247,10 @@ static void print_help(RzIO *io, char *cmd, int p_usage) { "\\rl addr len Read from linear address", "\\rp pid addr len Read from process address", "\\rP addr len Read physical address", - "\\R[p] Print control registers. Use =!Rp for detailed description", - "\\wl[x] addr input Write at linear address. Use =!wlx for input in hex", - "\\wp[x] pid addr input Write at process address. Use =!wpx for input in hex", - "\\wP[x] addr input Write at physical address. Use =!wPx for input in hex", + "\\R[p] Print control registers. Use R!Rp for detailed description", + "\\wl[x] addr input Write at linear address. Use R!wlx for input in hex", + "\\wp[x] pid addr input Write at process address. Use R!wpx for input in hex", + "\\wP[x] addr input Write at physical address. Use R!wPx for input in hex", "\\W 1|0 Honor arch write protect (1 enable WP, 0 disable WP)" }; if (p_usage) { @@ -442,7 +442,7 @@ int run_old_command(RzIO *io, RzIODesc *iodesc, const char *buf) { switch (buf[1]) { case 'l': //read linear address - //=! rl addr len + //R! rl addr len if (buf[2] != ' ') { print_help(io, "rl", 0); goto end; @@ -459,7 +459,7 @@ int run_old_command(RzIO *io, RzIODesc *iodesc, const char *buf) { break; case 'p': //read process address - //=! rp pid address len + //R! rp pid address len if (buf[2] != ' ') { print_help(io, "rp", 0); goto end; @@ -477,7 +477,7 @@ int run_old_command(RzIO *io, RzIODesc *iodesc, const char *buf) { break; case 'P': //read physical address - //=! rP address len + //R! rP address len if (buf[2] != ' ') { print_help(io, "rP", 0); goto end; @@ -513,7 +513,7 @@ int run_old_command(RzIO *io, RzIODesc *iodesc, const char *buf) { switch (buf[1]) { case 'l': //write linear address - //=! wl addr str + //R! wl addr str if ((inphex && buf[3] != ' ') || (!inphex && buf[2] != ' ')) { print_help(io, "wl", 0); goto end; @@ -530,7 +530,7 @@ int run_old_command(RzIO *io, RzIODesc *iodesc, const char *buf) { break; case 'p': //write process address - //=! wp pid address str + //R! wp pid address str if ((inphex && buf[3] != ' ') || (!inphex && buf[2] != ' ')) { print_help(io, "wp", 0); goto end; @@ -547,7 +547,7 @@ int run_old_command(RzIO *io, RzIODesc *iodesc, const char *buf) { break; case 'P': //write physical address - //=! wP address str + //R! wP address str if ((inphex && buf[3] != ' ') || (!inphex && buf[2] != ' ')) { print_help(io, "wP", 0); goto end; @@ -586,7 +586,7 @@ int run_old_command(RzIO *io, RzIODesc *iodesc, const char *buf) { break; case 'M': { //Print kernel memory map. - //=! M + //R! M int i, j; struct rzk_kernel_maps map_data; struct rzk_kernel_map_info *info; @@ -625,7 +625,7 @@ int run_old_command(RzIO *io, RzIODesc *iodesc, const char *buf) { } break; case 'R': { //Read control registers - //=! R[p] + //R! R[p] struct rzk_control_reg reg_data; ioctl_n = IOCTL_READ_CONTROL_REG; ret = ioctl((int)(size_t)iodesc->data, ioctl_n, ®_data); @@ -673,7 +673,7 @@ int run_old_command(RzIO *io, RzIODesc *iodesc, const char *buf) { } break; case 'p': { //Print process info - //=! p pid + //R! p pid ut64 i; ut64 nextstart; ut64 buffsize; diff --git a/librz/io/p/io_self.c b/librz/io/p/io_self.c index f9ff183775..ba2adccba9 100644 --- a/librz/io/p/io_self.c +++ b/librz/io/p/io_self.c @@ -339,7 +339,7 @@ static char *__system(RzIO *io, RzIODesc *fd, const char *cmd) { char *argv = strdup(cmd + 5); int argc = rz_str_word_set0(argv); if (argc == 0) { - eprintf("Usage: =!call [fcnptr] [a0] [a1] ...\n"); + eprintf("Usage: R!call [fcnptr] [a0] [a1] ...\n"); free(argv); return NULL; } @@ -465,16 +465,16 @@ static char *__system(RzIO *io, RzIODesc *fd, const char *cmd) { self_sections[i].name); } } else { - eprintf("|Usage: =![cmd] [args]\n"); - eprintf("| =!pid show getpid()\n"); - eprintf("| =!maps show map regions\n"); - eprintf("| =!kill commit suicide\n"); + eprintf("|Usage: R![cmd] [args]\n"); + eprintf("| R!pid show getpid()\n"); + eprintf("| R!maps show map regions\n"); + eprintf("| R!kill commit suicide\n"); #if !defined(__WINDOWS__) - eprintf("| =!alarm [secs] setup alarm signal to raise rizin prompt\n"); + eprintf("| R!alarm [secs] setup alarm signal to raise rizin prompt\n"); #endif - eprintf("| =!dlsym [sym] dlopen\n"); - eprintf("| =!call [sym] [...] nativelly call a function\n"); - eprintf("| =!mameio enter mame IO mode\n"); + eprintf("| R!dlsym [sym] dlopen\n"); + eprintf("| R!call [sym] [...] nativelly call a function\n"); + eprintf("| R!mameio enter mame IO mode\n"); } return NULL; } diff --git a/librz/io/p/io_w32dbg.c b/librz/io/p/io_w32dbg.c index 366ac5f70f..c8fd5d52e1 100644 --- a/librz/io/p/io_w32dbg.c +++ b/librz/io/p/io_w32dbg.c @@ -250,7 +250,7 @@ static char *__system(RzIO *io, RzIODesc *fd, const char *cmd) { } return rz_str_newf("%lu", wrap->pi.dwProcessId); } else { - eprintf("Try: '=!pid'\n"); + eprintf("Try: 'R!pid'\n"); } return NULL; } diff --git a/librz/main/rizin.c b/librz/main/rizin.c index 369f1d58e3..e1eb5a31bc 100644 --- a/librz/main/rizin.c +++ b/librz/main/rizin.c @@ -92,9 +92,9 @@ static int main_help(int line) { if (line != 1) { printf( " -- run rizin without opening any file\n" - " - same as 'rizin malloc://512'\n" - " = read file from stdin (use -i and -c to run cmds)\n" - " -= perform !=! command to run all commands remotely\n" + " = same as 'rizin malloc://512'\n" + " - read file from stdin \n" + " -= perform R=! command to run all commands remotely\n" " -0 print \\x00 after init and every command\n" " -2 close stderr file descriptor (silent warning messages)\n" " -a [arch] set asm.arch\n" @@ -102,7 +102,7 @@ static int main_help(int line) { " -b [bits] set asm.bits\n" " -B [baddr] set base address for PIE binaries\n" " -c 'cmd..' execute rizin command\n" - " -C file is host:port (alias for -c+=http://%%s/cmd/)\n" + " -C file is host:port (alias for -cR+http://%%s/cmd/)\n" " -d debug the executable 'file' or running process 'pid'\n" " -D [backend] enable debug mode (e cfg.debug=true)\n" " -e k=v evaluate config var\n" @@ -401,10 +401,7 @@ RZ_API int rz_main_rizin(int argc, const char **argv) { free(fmt); free(sysdbg); } - if (argc < 2) { - LISTS_FREE(); - return main_help(1); - } + r = rz_core_new(); if (!r) { eprintf("Cannot initialize RzCore\n"); @@ -442,8 +439,15 @@ RZ_API int rz_main_rizin(int argc, const char **argv) { RzGetopt opt; rz_getopt_init(&opt, argc, argv, "=02AMCwxfF:H:hm:e:nk:NdqQs:p:b:B:a:Lui:I:l:R:r:c:D:vVSTzuXt"); - while ((c = rz_getopt_next(&opt)) != -1) { + while (argc >= 2 && (c = rz_getopt_next(&opt)) != -1) { switch (c) { + case '-': + + eprintf("%c: invalid combinations of argument flags - %s\n", opt.opt, opt.argv[2]); + ret = 1; + goto beach; + + break; case '=': RZ_FREE(r->cmdremote); r->cmdremote = strdup(""); @@ -795,12 +799,12 @@ RZ_API int rz_main_rizin(int argc, const char **argv) { return 1; } if (strstr(uri, "://")) { - rz_core_cmdf(r, "=+ %s", uri); + rz_core_cmdf(r, "R+ %s", uri); } else { argv[opt.ind] = rz_str_newf("http://%s/cmd/", argv[opt.ind]); - rz_core_cmdf(r, "=+ %s", argv[opt.ind]); + rz_core_cmdf(r, "R+ %s", argv[opt.ind]); } - rz_core_cmd0(r, "=!="); + rz_core_cmd0(r, "R!="); argv[opt.ind] = "-"; } @@ -859,7 +863,7 @@ RZ_API int rz_main_rizin(int argc, const char **argv) { RZ_FREE(debugbackend); return 1; } - } else if (argv[opt.ind] && !strcmp(argv[opt.ind], "=")) { + } else if (argv[opt.ind] && !strcmp(argv[opt.ind], "-")) { int sz; /* stdin/batch mode */ char *buf = rz_stdin_slurp(&sz); @@ -899,7 +903,7 @@ RZ_API int rz_main_rizin(int argc, const char **argv) { LISTS_FREE(); return 1; } - } else if (strcmp(argv[opt.ind - 1], "--")) { + } else if ((argc >= 2 && strcmp(argv[opt.ind - 1], "--")) || ((!strcmp(argv[opt.ind - 1], "--") && argv[opt.ind]))) { if (debug) { if (asmbits) { rz_config_set(r->config, "asm.bits", asmbits); @@ -1175,7 +1179,7 @@ RZ_API int rz_main_rizin(int argc, const char **argv) { const char *fstype = r->bin->cur->o->info->bclass; rz_core_cmdf(r, "m /root %s @ 0", fstype); } - rz_core_cmd0(r, "=!"); // initalize io subsystem + rz_core_cmd0(r, "R!"); // initalize io subsystem iod = r->io && fh ? rz_io_desc_get(r->io, fh->fd) : NULL; if (mapaddr) { rz_core_seek(r, mapaddr, true); diff --git a/librz/main/rz-agent.c b/librz/main/rz-agent.c index fa1117375b..c2dd95658b 100644 --- a/librz/main/rz-agent.c +++ b/librz/main/rz-agent.c @@ -150,7 +150,7 @@ RZ_API int rz_main_rz_agent(int argc, const char **argv) { perror("malloc"); return 1; } - snprintf(cmd, cmd_len, "rizin -q %s-e http.port=%d -c=h \"%s\"", + snprintf(cmd, cmd_len, "rizin -q %s-e http.port=%d -cRh \"%s\"", listenlocal ? "" : "-e http.bind=public ", session_port, escaped_filename); diff --git a/librz/util/getopt.c b/librz/util/getopt.c index 410b3df968..e0e96e63e9 100644 --- a/librz/util/getopt.c +++ b/librz/util/getopt.c @@ -48,8 +48,14 @@ RZ_API int rz_getopt_next(RzGetopt *opt) { * if the user didn't specify '-' as an option, * assume it means -1. */ - if (opt->opt == '-') { - return -1; + if (opt->opt == (int)'-') { + opt->ind++; + if (rz_getopt_next(opt) == -1) { + opt->ind--; + return -1; + } + + return '-'; } if (!*place) { opt->ind++; diff --git a/shlr/rizin-shell-parser/corpus/special_commands.txt b/shlr/rizin-shell-parser/corpus/special_commands.txt index 6bb66e9d27..40fcba5eb2 100644 --- a/shlr/rizin-shell-parser/corpus/special_commands.txt +++ b/shlr/rizin-shell-parser/corpus/special_commands.txt @@ -290,20 +290,20 @@ editor - ============== -equal commands +R commands ============== -= -=< -= 3 cmd -=! cmd -=+ http://host:3000 -=- 3 -== 3 -=!= -!=! -=: host:3000 cmd -=&: 3000 +R +R< +R 3 cmd +R! cmd +R+ http://host:3000 +R- 3 +R= 3 +R!= +R=! +R: host:3000 cmd +R&: 3000 --- diff --git a/shlr/rizin-shell-parser/src/scanner.c b/shlr/rizin-shell-parser/src/scanner.c index d0ee595ea4..66d184ae13 100644 --- a/shlr/rizin-shell-parser/src/scanner.c +++ b/shlr/rizin-shell-parser/src/scanner.c @@ -45,8 +45,8 @@ static bool is_at_cmd(const char *s) { return s[0] == '@'; } -static bool is_equal_cmd(const char *s) { - return s[0] == '='; +static bool is_remote_cmd(const char *s) { + return s[0] == 'R'; } static bool is_comment(const char *s) { @@ -85,7 +85,7 @@ static bool is_mid_command(const char *res, int len, const int32_t ch) { ch == ':' || ch == '+' || ch == '=' || ch == '/' || ch == '*' || ch == '-' || ch == ',' || ch == '&' || ch == '_' || (is_interpret_cmd (res) && ch == '(') || - (is_equal_cmd (res) && ch == '<') || (is_at_cmd (res) && ch == '@'); + (is_remote_cmd (res) && ch == '<') || (is_at_cmd (res) && ch == '@'); } static bool is_concat(const int32_t ch) { @@ -185,7 +185,7 @@ bool tree_sitter_rzcmd_external_scanner_scan(void *payload, TSLexer *lexer, cons } lexer->result_symbol = HELP_COMMAND; } else { - if ((is_special_start (res[0]) && strcmp (res, "!=!")) || is_pf_cmd (res) || is_env_cmd (res) || is_at_cmd (res) || !valid_symbols[CMD_IDENTIFIER]) { + if ((is_special_start(res[0]) && strcmp(res, "R=!")) || is_pf_cmd(res) || is_env_cmd(res) || is_at_cmd(res) || !valid_symbols[CMD_IDENTIFIER]) { return false; } lexer->result_symbol = CMD_IDENTIFIER; diff --git a/test/db/analysis/arm b/test/db/analysis/arm index 86e179cc0c..c91bc8e742 100644 --- a/test/db/analysis/arm +++ b/test/db/analysis/arm @@ -153,7 +153,7 @@ EOF RUN NAME=arm 16 BE 4 bytes instruction -FILE=- +FILE== ARGS=-a arm -b 16 CMDS=<\nint entry(){printf(\"Hello\\n\");return 0;}" > .tmp-hashc.c #!c .tmp-hashc.c @@ -11,7 +11,7 @@ EOF RUN NAME=#! with ext != name -FILE=- +FILE== CMDS=<\nint main(){printf(\"Hello\\n\");return 0;}" > .tmp-hashextname.c #!cpipe .tmp-hashextname.c @@ -20,4 +20,4 @@ EOF EXPECT=< 1 -FILE=- +FILE== CMDS=< 1 -FILE=- +FILE== CMDS=< $a ?v $? diff --git a/test/db/cmd/cmd_ax b/test/db/cmd/cmd_ax index 467df995db..ac58c3c82d 100644 --- a/test/db/cmd/cmd_ax +++ b/test/db/cmd/cmd_ax @@ -21,7 +21,7 @@ EOF RUN NAME=axf -FILE=- +FILE== CMDS=< /dev/null; ?= -FILE=- +FILE== CMDS=< /dev/null s diff --git a/test/db/cmd/cmd_ec b/test/db/cmd/cmd_ec index 5043f65263..cb32cb6694 100644 --- a/test/db/cmd/cmd_ec +++ b/test/db/cmd/cmd_ec @@ -1,5 +1,5 @@ NAME=ec* fgbg -FILE=- +FILE== CMDS=<