diff --git a/client/mifare/ndef.c b/client/mifare/ndef.c index 8f5e93a2e..b7c4a8108 100644 --- a/client/mifare/ndef.c +++ b/client/mifare/ndef.c @@ -422,6 +422,7 @@ int NDEFRecordsDecodeAndPrint(uint8_t *ndefRecord, size_t ndefRecordLen) { return PM3_SUCCESS; } +// http://apps4android.org/nfc-specifications/NFCForum-TS-Type-2-Tag_1.1.pdf int NDEFDecodeAndPrint(uint8_t *ndef, size_t ndefLen, bool verbose) { size_t indx = 0; @@ -442,6 +443,24 @@ int NDEFDecodeAndPrint(uint8_t *ndef, size_t ndefLen, bool verbose) { indx += len; break; } + case 0x01: { + indx++; + uint16_t len = ndefTLVGetLength(&ndef[indx], &indx); + PrintAndLogEx(INFO, "-- NDEF Lock Control."); + if (len != 3) + PrintAndLogEx(WARNING, "NDEF Lock Control block size must be 3 instead of %d.", len); + indx += len; + break; + } + case 0x02: { + indx++; + uint16_t len = ndefTLVGetLength(&ndef[indx], &indx); + PrintAndLogEx(INFO, "-- NDEF Memory Control."); + if (len != 3) + PrintAndLogEx(WARNING, "NDEF Memory Control block size must be 3 instead of %d.", len); + indx += len; + break; + } case 0x03: { indx++; uint16_t len = ndefTLVGetLength(&ndef[indx], &indx);