From 7594ea49426566a40b30aafb4a786fe9b543058f Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Wed, 4 Sep 2019 23:13:51 +0200 Subject: [PATCH] skip comments in cmdscripts --- client/cmdparser.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/client/cmdparser.c b/client/cmdparser.c index 768941e10..9e7b83afa 100644 --- a/client/cmdparser.c +++ b/client/cmdparser.c @@ -176,6 +176,9 @@ int CmdsParse(const command_t Commands[], const char *Cmd) { memset(cmd_name, 0, sizeof(cmd_name)); sscanf(Cmd, "%127s%n", cmd_name, &len); str_lower(cmd_name); + // Comment + if (cmd_name[0] == '#') + return PM3_SUCCESS; int i = 0; while (Commands[i].Name) { if (0 == strcmp(Commands[i].Name, cmd_name)) {