mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2024-12-28 19:31:19 +08:00
chg: @merlokk 's minor adjustment to waitCmd
This commit is contained in:
parent
f6d2d508b4
commit
76e139701a
1 changed files with 14 additions and 3 deletions
|
@ -404,7 +404,7 @@ int CmdHF14AReader(const char *Cmd) {
|
|||
}
|
||||
|
||||
// disconnect
|
||||
SendCommand(&cDisconnect);
|
||||
//SendCommand(&cDisconnect);
|
||||
|
||||
if (isMifareClassic) {
|
||||
if ( detect_classic_prng() )
|
||||
|
@ -726,10 +726,21 @@ static void waitCmd(uint8_t iSelect) {
|
|||
uint16_t len = 0;
|
||||
|
||||
if (WaitForResponseTimeout(CMD_ACK, &resp, 1500)) {
|
||||
len = iSelect ? (resp.arg[1] & 0xffff) : (resp.arg[0] & 0xffff);
|
||||
PrintAndLog("received %i octets", len);
|
||||
uint8_t iLen = resp.arg[0];
|
||||
if (iSelect){
|
||||
iLen = resp.arg[1];
|
||||
if (iLen){
|
||||
PrintAndLog("Card selected. UID[%i]:", iLen);
|
||||
} else {
|
||||
PrintAndLog("Can't select card.");
|
||||
}
|
||||
} else {
|
||||
PrintAndLog("received %i bytes:", iLen);
|
||||
}
|
||||
|
||||
if(!len)
|
||||
return;
|
||||
|
||||
PrintAndLog("%s", sprint_hex(resp.d.asBytes, len) );
|
||||
} else {
|
||||
PrintAndLog("timeout while waiting for reply.");
|
||||
|
|
Loading…
Reference in a new issue