mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 05:13:46 -07:00
added ndef record parse sketch
This commit is contained in:
parent
a2f8f0628c
commit
64a5b355b5
1 changed files with 11 additions and 3 deletions
|
@ -24,6 +24,14 @@ uint16_t ndefTLVGetLength(uint8_t *data, size_t *indx) {
|
||||||
return len;
|
return len;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int ndefRecordDecodeAndPrint(uint8_t *ndefRecord, size_t ndefRecordLen) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
int NDEFDecodeAndPrint(uint8_t *ndef, size_t ndefLen, bool verbose) {
|
int NDEFDecodeAndPrint(uint8_t *ndef, size_t ndefLen, bool verbose) {
|
||||||
|
|
||||||
size_t indx = 0;
|
size_t indx = 0;
|
||||||
|
@ -44,9 +52,9 @@ int NDEFDecodeAndPrint(uint8_t *ndef, size_t ndefLen, bool verbose) {
|
||||||
uint16_t len = ndefTLVGetLength(&ndef[indx], &indx);
|
uint16_t len = ndefTLVGetLength(&ndef[indx], &indx);
|
||||||
PrintAndLogEx(INFO, "NDEF message. len: %d", len);
|
PrintAndLogEx(INFO, "NDEF message. len: %d", len);
|
||||||
|
|
||||||
// ndef decode
|
int res = ndefRecordDecodeAndPrint(&ndef[indx], len);
|
||||||
|
if (res)
|
||||||
|
return res;
|
||||||
|
|
||||||
indx += len;
|
indx += len;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue