mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 05:13:46 -07:00
textual
This commit is contained in:
parent
dd82c42588
commit
52396e8b5a
1 changed files with 3 additions and 3 deletions
|
@ -468,7 +468,7 @@ static int CmdPingNG(const char *Cmd) {
|
||||||
uint32_t len = strtol(Cmd, NULL, 0);
|
uint32_t len = strtol(Cmd, NULL, 0);
|
||||||
if (len > PM3_CMD_DATA_SIZE)
|
if (len > PM3_CMD_DATA_SIZE)
|
||||||
len = PM3_CMD_DATA_SIZE;
|
len = PM3_CMD_DATA_SIZE;
|
||||||
PrintAndLogEx(NORMAL, "PingNG sent with payload len=%d", len);
|
PrintAndLogEx(INFO, "PingNG sent with payload len=%d", len);
|
||||||
clearCommandBuffer();
|
clearCommandBuffer();
|
||||||
PacketResponseNG resp;
|
PacketResponseNG resp;
|
||||||
uint8_t data[PM3_CMD_DATA_SIZE] = {0};
|
uint8_t data[PM3_CMD_DATA_SIZE] = {0};
|
||||||
|
@ -479,9 +479,9 @@ static int CmdPingNG(const char *Cmd) {
|
||||||
bool error = false;
|
bool error = false;
|
||||||
if (len)
|
if (len)
|
||||||
error = memcmp(data, resp.data.asBytes, len) != 0;
|
error = memcmp(data, resp.data.asBytes, len) != 0;
|
||||||
PrintAndLogEx(NORMAL, "PingNG response received, content is %s", error ? _RED_("NOT ok") : _GREEN_("ok"));
|
PrintAndLogEx((error)? ERR:SUCCESS, "PingNG response received, content is %s", error ? _RED_("NOT ok") : _GREEN_("ok"));
|
||||||
} else
|
} else
|
||||||
PrintAndLogEx(NORMAL, "PingNG response " _RED_("timeout"));
|
PrintAndLogEx(WARNING, "PingNG response " _RED_("timeout"));
|
||||||
return PM3_SUCCESS;
|
return PM3_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue