add: detect unfused / write once magic tags, from https://github.com/nfc-tools/libnfc/pull/554

This commit is contained in:
Iceman 2019-08-20 14:53:52 +02:00
parent 3c1a732278
commit fea5d88278
2 changed files with 10 additions and 0 deletions

View file

@ -1955,6 +1955,8 @@ void MifareCIdent() {
#define GEN_1A 1
#define GEN_1B 2
#define GEN_2 4
#define GEN_UNFUSED 5
// variables
uint8_t isGen = 0;
uint8_t rec[1] = {0x00};
@ -1990,6 +1992,11 @@ TEST2:
int res = iso14443a_select_card(uid, NULL, &cuid, true, 0, true);
if (res == 2) {
if (cuid == 0xAA55C396 ) {
isGen = GEN_UNFUSED;
goto OUT;
}
ReaderTransmit(rats, sizeof(rats), NULL);
res = ReaderReceive(buf, par);
if (memcmp(buf, "\x09\x78\x00\x91\x02\xDA\xBC\x19\x10\xF0\x05", 11) == 0) {

View file

@ -1041,6 +1041,9 @@ void detect_classic_magic(void) {
case 4:
PrintAndLogEx(SUCCESS, "Answers to magic commands (GEN 2 / CUID): " _GREEN_("YES"));
break;
case 5:
PrintAndLogEx(SUCCESS, "Answers to magic commands (Write Once / FUID): " _GREEN_("YES"));
break;
default:
PrintAndLogEx(INFO, "Answers to magic commands: " _YELLOW_("NO"));
break;