From 34d8a41021a0bf153e6a764ce7b77cddb4367169 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Thu, 19 Oct 2023 11:08:53 +0200 Subject: [PATCH] hw ping - fix output text --- client/src/cmdhw.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/client/src/cmdhw.c b/client/src/cmdhw.c index 7483a07a9..7cef9fa81 100644 --- a/client/src/cmdhw.c +++ b/client/src/cmdhw.c @@ -987,7 +987,7 @@ static int CmdPing(const char *Cmd) { len = PM3_CMD_DATA_SIZE; if (len) { - PrintAndLogEx(INFO, "Ping sent with payload len " _YELLOW_("%d"), len); + PrintAndLogEx(INFO, "Ping sent with payload len... " _YELLOW_("%d"), len); } else { PrintAndLogEx(INFO, "Ping sent"); } @@ -996,14 +996,15 @@ static int CmdPing(const char *Cmd) { PacketResponseNG resp; uint8_t data[PM3_CMD_DATA_SIZE] = {0}; - for (uint16_t i = 0; i < len; i++) + for (uint16_t i = 0; i < len; i++) { data[i] = i & 0xFF; + } SendCommandNG(CMD_PING, data, len); if (WaitForResponseTimeout(CMD_PING, &resp, 1000)) { if (len) { bool error = (memcmp(data, resp.data.asBytes, len) != 0); - PrintAndLogEx((error) ? ERR : SUCCESS, "Ping response " _GREEN_("received") " and content () %s )", error ? _RED_("fail") : _GREEN_("ok")); + PrintAndLogEx((error) ? ERR : SUCCESS, "Ping response " _GREEN_("received") " and content ( %s )", error ? _RED_("fail") : _GREEN_("ok")); } else { PrintAndLogEx(SUCCESS, "Ping response " _GREEN_("received")); }