add: detect unfused / write once magic tags, from https://github.com/nfc-tools/libnfc/pull/554
This commit is contained in:
@@ -1955,6 +1955,8 @@ void MifareCIdent() {
|
|||||||
#define GEN_1A 1
|
#define GEN_1A 1
|
||||||
#define GEN_1B 2
|
#define GEN_1B 2
|
||||||
#define GEN_2 4
|
#define GEN_2 4
|
||||||
|
#define GEN_UNFUSED 5
|
||||||
|
|
||||||
// variables
|
// variables
|
||||||
uint8_t isGen = 0;
|
uint8_t isGen = 0;
|
||||||
uint8_t rec[1] = {0x00};
|
uint8_t rec[1] = {0x00};
|
||||||
@@ -1990,6 +1992,11 @@ TEST2:
|
|||||||
|
|
||||||
int res = iso14443a_select_card(uid, NULL, &cuid, true, 0, true);
|
int res = iso14443a_select_card(uid, NULL, &cuid, true, 0, true);
|
||||||
if (res == 2) {
|
if (res == 2) {
|
||||||
|
if (cuid == 0xAA55C396 ) {
|
||||||
|
isGen = GEN_UNFUSED;
|
||||||
|
goto OUT;
|
||||||
|
}
|
||||||
|
|
||||||
ReaderTransmit(rats, sizeof(rats), NULL);
|
ReaderTransmit(rats, sizeof(rats), NULL);
|
||||||
res = ReaderReceive(buf, par);
|
res = ReaderReceive(buf, par);
|
||||||
if (memcmp(buf, "\x09\x78\x00\x91\x02\xDA\xBC\x19\x10\xF0\x05", 11) == 0) {
|
if (memcmp(buf, "\x09\x78\x00\x91\x02\xDA\xBC\x19\x10\xF0\x05", 11) == 0) {
|
||||||
|
|||||||
@@ -1041,6 +1041,9 @@ void detect_classic_magic(void) {
|
|||||||
case 4:
|
case 4:
|
||||||
PrintAndLogEx(SUCCESS, "Answers to magic commands (GEN 2 / CUID): " _GREEN_("YES"));
|
PrintAndLogEx(SUCCESS, "Answers to magic commands (GEN 2 / CUID): " _GREEN_("YES"));
|
||||||
break;
|
break;
|
||||||
|
case 5:
|
||||||
|
PrintAndLogEx(SUCCESS, "Answers to magic commands (Write Once / FUID): " _GREEN_("YES"));
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
PrintAndLogEx(INFO, "Answers to magic commands: " _YELLOW_("NO"));
|
PrintAndLogEx(INFO, "Answers to magic commands: " _YELLOW_("NO"));
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user