Change "hf mf ndefwrite" added option to fix bad ndef records by adding a correct block and a terminator block
This commit is contained in:
1 parent
ab567001a8
commit
a2c4682d18
3 files changed
+117
-20
No files matched your search
@@ -40,6 +40,7 @@
|
||||
#define NDEF_XVCARDTEXT "text/x-vcard"
|
||||
|
||||
|
||||
|
||||
static const char *TypeNameFormat_s[] = {
|
||||
"Empty Record",
|
||||
"Well Known Record",
|
||||
@@ -117,7 +118,7 @@ static int ndefDecodePayload(NDEFHeader_t *ndef);
|
||||
|
||||
static uint16_t ndefTLVGetLength(const uint8_t *data, size_t *indx) {
|
||||
uint16_t len = 0;
|
||||
if (data[0] == 0xff) {
|
||||
if (data[0] == 0xFF) {
|
||||
len = (data[1] << 8) + data[2];
|
||||
*indx += 3;
|
||||
} else {
|
||||
@@ -1117,3 +1118,4 @@ int NDEFDecodeAndPrint(uint8_t *ndef, size_t ndefLen, bool verbose) {
|
||||
}
|
||||
return PM3_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
#include <stdbool.h>
|
||||
#include "common.h"
|
||||
|
||||
#define NDEF_MFC_AID 0xE103
|
||||
|
||||
typedef enum {
|
||||
tnfEmptyRecord = 0x00,
|
||||
tnfWellKnownRecord = 0x01,
|
||||
|
||||
Reference in new issue
Block a user