From: iceman1001 Date: Sun, 1 Nov 2015 21:16:16 +0000 (+0100) Subject: CHG: some magic generation1 tags is not following protocol and answers to the "halt... X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/commitdiff_plain/acd7ccdbc9b98f2e10df25e7cf2a6d17824f1b7e CHG: some magic generation1 tags is not following protocol and answers to the "halt" command. This gives an error and makes the users think something went wrong. This also affected the magic identification in "Hf 14a reader" command, where it in those moments stated "NO" even if the tag is indeed a generation1. --- diff --git a/armsrc/mifarecmd.c b/armsrc/mifarecmd.c index 0b75ebc3..e51ae18b 100644 --- a/armsrc/mifarecmd.c +++ b/armsrc/mifarecmd.c @@ -1078,7 +1078,7 @@ void MifareCSetBlock(uint32_t arg0, uint32_t arg1, uint32_t arg2, uint8_t *datai }; if(mifare_classic_halt(NULL, cuid)) { - if (MF_DBGLEVEL >= 1) Dbprintf("Halt error"); + if (MF_DBGLEVEL >= 4) Dbprintf("INFO - Tag answered the 'Halt' command"); break; }; }; @@ -1114,7 +1114,7 @@ void MifareCSetBlock(uint32_t arg0, uint32_t arg1, uint32_t arg2, uint8_t *datai if (workFlags & 0x04) { if (mifare_classic_halt(NULL, cuid)) { - if (MF_DBGLEVEL >= 1) Dbprintf("Halt error"); + if (MF_DBGLEVEL >= 4) Dbprintf("INFO - Tag answered the 'Halt' command"); break; }; } @@ -1192,7 +1192,7 @@ void MifareCGetBlock(uint32_t arg0, uint32_t arg1, uint32_t arg2, uint8_t *datai if (workFlags & 0x04) { if (mifare_classic_halt(NULL, cuid)) { - if (MF_DBGLEVEL >= 1) Dbprintf("Halt error"); + if (MF_DBGLEVEL >= 4) Dbprintf("INFO - Tag answered the 'Halt' command"); break; }; } @@ -1239,9 +1239,8 @@ void MifareCIdent(){ isOK = 0; }; - if (mifare_classic_halt(NULL, 0)) { - isOK = 0; - }; + // removed the if, since some magic tags misbehavies and send an answer to it. + mifare_classic_halt(NULL, 0); cmd_send(CMD_ACK,isOK,0,0,0,0); }