mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-02-15 19:59:34 +08:00
chg: hexlen is half size..
This commit is contained in:
parent
e536cb082f
commit
f2ad37aa00
1 changed files with 10 additions and 1 deletions
|
@ -477,6 +477,7 @@ int CmdAnalyseA(const char *Cmd){
|
|||
switch (tolower(param_getchar(Cmd, cmdp))) {
|
||||
case 'd':
|
||||
param_gethex_ex(Cmd, cmdp+1, data, &hexlen);
|
||||
hexlen >>= 1;
|
||||
if ( hexlen != sizeof(data) ) {
|
||||
PrintAndLogEx(WARNING, "Read %d bytes of %u", hexlen, sizeof(data) );
|
||||
}
|
||||
|
@ -500,6 +501,14 @@ int CmdAnalyseA(const char *Cmd){
|
|||
memcpy(c.d.asBytes, data, hexlen );
|
||||
clearCommandBuffer();
|
||||
SendCommand(&c);
|
||||
|
||||
// reading response from smart card
|
||||
UsbCommand resp;
|
||||
if (!WaitForResponseTimeout(CMD_ACK, &resp, 2500)) {
|
||||
PrintAndLogEx(WARNING, "smart card response failed");
|
||||
return 1;
|
||||
}
|
||||
PrintAndLogEx(SUCCESS,"resp: %s", sprint_hex(resp.d.asBytes, resp.arg[0]));
|
||||
return 0;
|
||||
|
||||
PrintAndLogEx(NORMAL, "-- " _BLUE_(its my message) "\n");
|
||||
|
|
Loading…
Reference in a new issue