mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-02-15 19:59:34 +08:00
implemented output of received octets in 'hf 15 cmd raw'
This commit is contained in:
parent
6d7234cd43
commit
fdb67f1c8d
1 changed files with 9 additions and 1 deletions
|
@ -445,6 +445,7 @@ int CmdHF15CmdRaw (const char *cmd) {
|
||||||
int i=0;
|
int i=0;
|
||||||
uint8_t data[100];
|
uint8_t data[100];
|
||||||
unsigned int datalen=0, temp;
|
unsigned int datalen=0, temp;
|
||||||
|
char *hexout;
|
||||||
|
|
||||||
|
|
||||||
if (strlen(cmd)<3) {
|
if (strlen(cmd)<3) {
|
||||||
|
@ -514,7 +515,14 @@ int CmdHF15CmdRaw (const char *cmd) {
|
||||||
if (r!=NULL) {
|
if (r!=NULL) {
|
||||||
recv = r->d.asBytes;
|
recv = r->d.asBytes;
|
||||||
PrintAndLog("received %i octets",r->arg[0]);
|
PrintAndLog("received %i octets",r->arg[0]);
|
||||||
// TODO: output
|
hexout = (char *)malloc(r->arg[0] * 3 + 1);
|
||||||
|
if (hexout != NULL) {
|
||||||
|
for (int i = 0; i < r->arg[0]; i++) { // data in hex
|
||||||
|
sprintf(&hexout[i * 3], "%02hX ", recv[i]);
|
||||||
|
}
|
||||||
|
PrintAndLog("%s", hexout);
|
||||||
|
free(hexout);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
PrintAndLog("timeout while waiting for reply.");
|
PrintAndLog("timeout while waiting for reply.");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue