mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-08-22 22:23:38 -07:00
CHG: corrections for the detection of chinese backdoor commands in cmdhf14a.c
This commit is contained in:
parent
052bbe08d0
commit
5db9756676
1 changed files with 18 additions and 7 deletions
|
@ -98,13 +98,6 @@ int CmdHF14AReader(const char *Cmd)
|
||||||
card.ats_len = resp.arg[0]; // note: ats_len includes CRC Bytes
|
card.ats_len = resp.arg[0]; // note: ats_len includes CRC Bytes
|
||||||
}
|
}
|
||||||
|
|
||||||
// disconnect
|
|
||||||
c.arg[0] = 0;
|
|
||||||
c.arg[1] = 0;
|
|
||||||
c.arg[2] = 0;
|
|
||||||
SendCommand(&c);
|
|
||||||
|
|
||||||
|
|
||||||
if(card.ats_len >= 3) { // a valid ATS consists of at least the length byte (TL) and 2 CRC bytes
|
if(card.ats_len >= 3) { // a valid ATS consists of at least the length byte (TL) and 2 CRC bytes
|
||||||
bool ta1 = 0, tb1 = 0, tc1 = 0;
|
bool ta1 = 0, tb1 = 0, tc1 = 0;
|
||||||
int pos;
|
int pos;
|
||||||
|
@ -243,6 +236,24 @@ int CmdHF14AReader(const char *Cmd)
|
||||||
PrintAndLog("proprietary non iso14443-4 card found, RATS not supported");
|
PrintAndLog("proprietary non iso14443-4 card found, RATS not supported");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// try to see if card responses to "chinese magic backdoor" commands.
|
||||||
|
c.cmd = CMD_MIFARE_CIDENT;
|
||||||
|
c.arg[0] = 0;
|
||||||
|
c.arg[1] = 0;
|
||||||
|
c.arg[2] = 0;
|
||||||
|
SendCommand(&c);
|
||||||
|
WaitForResponse(CMD_ACK,&resp);
|
||||||
|
uint8_t isOK = resp.arg[0] & 0xff;
|
||||||
|
PrintAndLog(" Answers to chinese magic backdoor commands: %s", (isOK ? "YES" : "NO") );
|
||||||
|
|
||||||
|
// disconnect
|
||||||
|
c.cmd = CMD_READER_ISO_14443a;
|
||||||
|
c.arg[0] = 0;
|
||||||
|
c.arg[1] = 0;
|
||||||
|
c.arg[2] = 0;
|
||||||
|
SendCommand(&c);
|
||||||
|
|
||||||
return select_status;
|
return select_status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue