mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-08-22 22:23:38 -07:00
Magic Mifare tags detection and version printing
This commit is contained in:
parent
0f6838d5a0
commit
e1d43151ea
2 changed files with 12 additions and 7 deletions
|
@ -1388,12 +1388,12 @@ void MifareCIdent(){
|
||||||
|
|
||||||
ReaderTransmitBitsPar(wupC1,7,0, NULL);
|
ReaderTransmitBitsPar(wupC1,7,0, NULL);
|
||||||
if(ReaderReceive(receivedAnswer, receivedAnswerPar) && (receivedAnswer[0] == 0x0a)) {
|
if(ReaderReceive(receivedAnswer, receivedAnswerPar) && (receivedAnswer[0] == 0x0a)) {
|
||||||
isOK = 1;
|
isOK = 2;
|
||||||
};
|
|
||||||
|
|
||||||
ReaderTransmit(wupC2, sizeof(wupC2), NULL);
|
ReaderTransmit(wupC2, sizeof(wupC2), NULL);
|
||||||
if(ReaderReceive(receivedAnswer, receivedAnswerPar) && (receivedAnswer[0] == 0x0a)) {
|
if(ReaderReceive(receivedAnswer, receivedAnswerPar) && (receivedAnswer[0] == 0x0a)) {
|
||||||
isOK = 1;
|
isOK = 1;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
// From iceman1001: removed the if, since some magic tags misbehavies and send an answer to it.
|
// From iceman1001: removed the if, since some magic tags misbehavies and send an answer to it.
|
||||||
|
|
|
@ -411,8 +411,13 @@ int CmdHF14AReader(const char *Cmd)
|
||||||
c.arg[2] = 0;
|
c.arg[2] = 0;
|
||||||
SendCommand(&c);
|
SendCommand(&c);
|
||||||
WaitForResponse(CMD_ACK,&resp);
|
WaitForResponse(CMD_ACK,&resp);
|
||||||
uint8_t isOK = resp.arg[0] & 0xff;
|
|
||||||
PrintAndLog("Answers to chinese magic backdoor commands: %s", (isOK ? "YES" : "NO") );
|
uint8_t isGeneration = resp.arg[0] & 0xff;
|
||||||
|
switch( isGeneration ){
|
||||||
|
case 1: PrintAndLog("Answers to chinese magic backdoor commands (GEN 1a): YES"); break;
|
||||||
|
case 2: PrintAndLog("Answers to chinese magic backdoor commands (GEN 1b): YES"); break;
|
||||||
|
default: PrintAndLog("Answers to chinese magic backdoor commands: NO"); break;
|
||||||
|
}
|
||||||
|
|
||||||
// disconnect
|
// disconnect
|
||||||
c.cmd = CMD_READER_ISO_14443a;
|
c.cmd = CMD_READER_ISO_14443a;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue