diff --git a/CHANGELOG.md b/CHANGELOG.md index d6e416ae9..1ada99eba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ All notable changes to this project will be documented in this file. This project uses the changelog in accordance with [keepchangelog](http://keepachangelog.com/). Please use this to write notable changes, which is not the same as git commit log... ## [unreleased][unreleased] + - Changed ndef output to be more dense. Honors verbose now (@iceman1001) - Fixed `hf mf ndefwrite` - now skips not ndef formatted sectors (@iceman1001) - Fixed `hf mf ndefread` - now skips not ndef formatted sectors correctly (@iceman1001) - Fixed `lf hitag` - keep inside the arrays for key/password/nrar (@iceman1001) diff --git a/client/src/cmdhf14a.c b/client/src/cmdhf14a.c index 83b37dda4..4dad816af 100644 --- a/client/src/cmdhf14a.c +++ b/client/src/cmdhf14a.c @@ -2633,12 +2633,15 @@ int CmdHF14ANdefRead(const char *Cmd) { void *argtable[] = { arg_param_begin, arg_str0("f", "file", "", "save raw NDEF to file"), + arg_litn("v", "verbose", 0, 2, "show technical data"), arg_param_end }; CLIExecWithReturn(ctx, Cmd, argtable, true); int fnlen = 0; char filename[FILE_PATH_SIZE] = {0}; CLIParamStrToBuf(arg_get_str(ctx, 1), (uint8_t *)filename, FILE_PATH_SIZE, &fnlen); + + bool verbose = arg_get_lit(ctx, 2); CLIParserFree(ctx); bool activate_field = true; @@ -2828,7 +2831,7 @@ int CmdHF14ANdefRead(const char *Cmd) { saveFile(filename, ".bin", ndef_file, ndef_size); } - NDEFRecordsDecodeAndPrint(ndef_file, ndef_size); + NDEFRecordsDecodeAndPrint(ndef_file, ndef_size, verbose); free(ndef_file); return PM3_SUCCESS; } diff --git a/client/src/cmdhf14b.c b/client/src/cmdhf14b.c index 8bac70d15..cddf52365 100644 --- a/client/src/cmdhf14b.c +++ b/client/src/cmdhf14b.c @@ -2004,12 +2004,15 @@ int CmdHF14BNdefRead(const char *Cmd) { void *argtable[] = { arg_param_begin, arg_str0("f", "file", "", "save raw NDEF to file"), + arg_litn("v", "verbose", 0, 2, "show technical data"), arg_param_end }; CLIExecWithReturn(ctx, Cmd, argtable, true); int fnlen = 0; char filename[FILE_PATH_SIZE] = {0}; CLIParamStrToBuf(arg_get_str(ctx, 1), (uint8_t *)filename, FILE_PATH_SIZE, &fnlen); + + bool verbose = arg_get_lit(ctx, 2); CLIParserFree(ctx); bool activate_field = true; @@ -2096,7 +2099,7 @@ int CmdHF14BNdefRead(const char *Cmd) { if (fnlen != 0) { saveFile(filename, ".bin", response + 2, resplen - 4); } - res = NDEFRecordsDecodeAndPrint(response + 2, resplen - 4); + res = NDEFRecordsDecodeAndPrint(response + 2, resplen - 4, verbose); out: switch_off_field_14b(); diff --git a/client/src/cmdhfjooki.c b/client/src/cmdhfjooki.c index bc0cdf89a..93ca6a00a 100644 --- a/client/src/cmdhfjooki.c +++ b/client/src/cmdhfjooki.c @@ -215,7 +215,7 @@ static void jooki_printEx(uint8_t *b64, uint8_t *iv, uint8_t tid, uint8_t fid, u PrintAndLogEx(INFO, "NDEF raw..... %s", sprint_hex_inrow(ndefmsg, sizeof(ndefmsg))); if (verbose) { - int res = NDEFRecordsDecodeAndPrint(ndefmsg, sizeof(ndefmsg)); + int res = NDEFRecordsDecodeAndPrint(ndefmsg, sizeof(ndefmsg), verbose); if (res != PM3_SUCCESS) { NDEFDecodeAndPrint(ndefmsg, sizeof(ndefmsg), verbose); } @@ -273,7 +273,7 @@ static int jooki_selftest(void) { jooki_create_ndef(b64, ndefmsg); PrintAndLogEx(INFO, "NDEF raw .... %s", sprint_hex(ndefmsg, sizeof(ndefmsg))); - int status = NDEFRecordsDecodeAndPrint(ndefmsg, sizeof(ndefmsg)); + int status = NDEFRecordsDecodeAndPrint(ndefmsg, sizeof(ndefmsg), true); if (status != PM3_SUCCESS) { status = NDEFDecodeAndPrint(ndefmsg, sizeof(ndefmsg), true); } diff --git a/client/src/cmdhfmf.c b/client/src/cmdhfmf.c index 468922a53..6089b6514 100644 --- a/client/src/cmdhfmf.c +++ b/client/src/cmdhfmf.c @@ -5693,11 +5693,15 @@ int CmdHFMFNDEFRead(const char *Cmd) { res = NDEFDecodeAndPrint(data, datalen, verbose); if (res != PM3_SUCCESS) { PrintAndLogEx(INFO, "Trying to parse NDEF records w/o NDEF header"); - res = NDEFRecordsDecodeAndPrint(data, datalen); + res = NDEFRecordsDecodeAndPrint(data, datalen, verbose); } - if (verbose2 == false) { - PrintAndLogEx(HINT, "Try " _YELLOW_("`hf mf ndefread -vv`") " for more details"); + if (verbose == false) { + PrintAndLogEx(HINT, "Try " _YELLOW_("`hf mf ndefread -v`") " for more details"); + } else { + if (verbose2 == false) { + PrintAndLogEx(HINT, "Try " _YELLOW_("`hf mf ndefread -vv`") " for more details"); + } } return PM3_SUCCESS; } @@ -5925,7 +5929,7 @@ int CmdHFMFNDEFWrite(const char *Cmd) { ); void *argtable[] = { - arg_param_begin, + arg_param_begin, arg_str0("d", NULL, "", "raw NDEF hex bytes"), arg_str0("f", "file", "", "write raw NDEF file to tag"), arg_lit0("p", NULL, "fix NDEF record headers / terminator block if missing"), @@ -5933,7 +5937,7 @@ int CmdHFMFNDEFWrite(const char *Cmd) { arg_lit0(NULL, "1k", "MIFARE Classic 1k / S50 (def)"), arg_lit0(NULL, "2k", "MIFARE Classic/Plus 2k"), arg_lit0(NULL, "4k", "MIFARE Classic 4k / S70"), - arg_lit0("v", "verbose", "verbose output"), + arg_lit0("v", "verbose", "verbose output"), arg_param_end }; CLIExecWithReturn(ctx, Cmd, argtable, false); @@ -6021,8 +6025,8 @@ int CmdHFMFNDEFWrite(const char *Cmd) { free(dump); } - // Has raw bytes ndef message header? - switch(raw[0]) { + // Has raw bytes ndef message header?bytes + switch (raw[0]) { case 0x00: case 0x01: case 0x02: @@ -6042,11 +6046,11 @@ int CmdHFMFNDEFWrite(const char *Cmd) { memcpy(tmp_raw, raw, sizeof(tmp_raw)); raw[0] = 0x03; raw[1] = bytes; - memcpy(raw + 2, tmp_raw, sizeof(raw) - 2 ); + memcpy(raw + 2, tmp_raw, sizeof(raw) - 2); bytes += 2; PrintAndLogEx(SUCCESS, "Added generic message header (0x03)"); } - } + } } // Has raw bytes ndef a terminator block? @@ -6092,7 +6096,7 @@ int CmdHFMFNDEFWrite(const char *Cmd) { uint8_t block_no = 0; for (uint8_t i = 1; i < madlen; i++) { - freemem[i] = (mad[i] == NDEF_MFC_AID); + freemem[i] = (mad[i] == NDEF_MFC_AID); if (freemem[i]) { @@ -6100,8 +6104,10 @@ int CmdHFMFNDEFWrite(const char *Cmd) { block_no = mfFirstBlockOfSector(i); } - PrintAndLogEx(INFO, "Sector %u is NDEF formatted", i); - sum += (MFBLOCK_SIZE * 3 ); + if (verbose) { + PrintAndLogEx(INFO, "Sector %u is NDEF formatted", i); + } + sum += (MFBLOCK_SIZE * 3); } } @@ -6116,7 +6122,7 @@ int CmdHFMFNDEFWrite(const char *Cmd) { } // main loop - write blocks - uint8_t *ptr_raw = raw; + uint8_t *ptr_raw = raw; while (bytes > 0) { uint8_t block[MFBLOCK_SIZE] = { 0x00 }; @@ -6145,7 +6151,7 @@ int CmdHFMFNDEFWrite(const char *Cmd) { block_no++; // skip sectors which isn't ndef formatted - while ( freemem[mfSectorNum(block_no)] == 0 ) { + while (freemem[mfSectorNum(block_no)] == 0) { block_no++; } } diff --git a/client/src/cmdhfmfu.c b/client/src/cmdhfmfu.c index a1ee42306..05436d77f 100644 --- a/client/src/cmdhfmfu.c +++ b/client/src/cmdhfmfu.c @@ -3958,6 +3958,7 @@ int CmdHF14MfuNDEFRead(const char *Cmd) { arg_str0("k", "key", "Replace default key for NDEF", NULL), arg_lit0("l", NULL, "Swap entered key's endianness"), arg_str0("f", "file", "", "Save raw NDEF to file"), + arg_litn("v", "verbose", 0, 2, "show technical data"), arg_param_end }; CLIExecWithReturn(ctx, Cmd, argtable, true); @@ -3966,6 +3967,7 @@ int CmdHF14MfuNDEFRead(const char *Cmd) { int fnlen = 0; char filename[FILE_PATH_SIZE] = {0}; CLIParamStrToBuf(arg_get_str(ctx, 3), (uint8_t *)filename, FILE_PATH_SIZE, &fnlen); + bool verbose = arg_get_lit(ctx, 4); CLIParserFree(ctx); switch (keylen) { @@ -4052,9 +4054,9 @@ int CmdHF14MfuNDEFRead(const char *Cmd) { if (fnlen != 0) { saveFile(filename, ".bin", records, (size_t)maxsize); } - status = NDEFRecordsDecodeAndPrint(records, (size_t)maxsize); + status = NDEFRecordsDecodeAndPrint(records, (size_t)maxsize, verbose); if (status != PM3_SUCCESS) { - status = NDEFDecodeAndPrint(records, (size_t)maxsize, true); + status = NDEFDecodeAndPrint(records, (size_t)maxsize, verbose); } char *jooki = strstr((char *)records, "s.jooki.rocks/s/?s="); diff --git a/client/src/cmdhfst25ta.c b/client/src/cmdhfst25ta.c index d60a98f32..0ccccd5d6 100644 --- a/client/src/cmdhfst25ta.c +++ b/client/src/cmdhfst25ta.c @@ -287,6 +287,7 @@ int CmdHFST25TANdefRead(const char *Cmd) { arg_param_begin, arg_str0("p", "pwd", "", "16 byte read password"), arg_str0("f", "file", "", "save raw NDEF to file"), + arg_litn("v", "verbose", 0, 2, "show technical data"), arg_param_end }; CLIExecWithReturn(ctx, Cmd, argtable, true); @@ -294,6 +295,7 @@ int CmdHFST25TANdefRead(const char *Cmd) { int fnlen = 0; char filename[FILE_PATH_SIZE] = {0}; CLIParamStrToBuf(arg_get_str(ctx, 2), (uint8_t *)filename, FILE_PATH_SIZE, &fnlen); + bool verbose = arg_get_lit(ctx, 3); CLIParserFree(ctx); if (pwdlen == 0) { @@ -404,7 +406,7 @@ int CmdHFST25TANdefRead(const char *Cmd) { if (fnlen != 0) { saveFile(filename, ".bin", response + 2, resplen - 4); } - NDEFRecordsDecodeAndPrint(response + 2, resplen - 4); + NDEFRecordsDecodeAndPrint(response + 2, resplen - 4, verbose); return PM3_SUCCESS; } diff --git a/client/src/cmdnfc.c b/client/src/cmdnfc.c index 959c2d661..aed87f069 100644 --- a/client/src/cmdnfc.c +++ b/client/src/cmdnfc.c @@ -114,7 +114,7 @@ static int CmdNfcDecode(const char *Cmd) { res = NDEFDecodeAndPrint(dump, bytes_read, verbose); if (res != PM3_SUCCESS) { PrintAndLogEx(INFO, "Trying to parse NDEF records w/o NDEF header"); - res = NDEFRecordsDecodeAndPrint(dump, bytes_read); + res = NDEFRecordsDecodeAndPrint(dump, bytes_read, verbose); } free(dump); @@ -123,7 +123,7 @@ static int CmdNfcDecode(const char *Cmd) { res = NDEFDecodeAndPrint(data, datalen, verbose); if (res != PM3_SUCCESS) { PrintAndLogEx(INFO, "Trying to parse NDEF records w/o NDEF header"); - res = NDEFRecordsDecodeAndPrint(data, datalen); + res = NDEFRecordsDecodeAndPrint(data, datalen, verbose); } } return res; diff --git a/client/src/nfc/ndef.c b/client/src/nfc/ndef.c index 0b0fe8934..2fa05d4ad 100644 --- a/client/src/nfc/ndef.c +++ b/client/src/nfc/ndef.c @@ -113,8 +113,8 @@ static const char *URI_s[] = { "urn:nfc:" // 0x23 }; -static int ndefRecordDecodeAndPrint(uint8_t *ndefRecord, size_t ndefRecordLen); -static int ndefDecodePayload(NDEFHeader_t *ndef); +static int ndefRecordDecodeAndPrint(uint8_t *ndefRecord, size_t ndefRecordLen, bool verbose); +static int ndefDecodePayload(NDEFHeader_t *ndef, bool verbose); static uint16_t ndefTLVGetLength(const uint8_t *data, size_t *indx) { uint16_t len = 0; @@ -166,23 +166,25 @@ static int ndefDecodeHeader(uint8_t *data, size_t datalen, NDEFHeader_t *header) return PM3_SUCCESS; } -static int ndefPrintHeader(NDEFHeader_t *header) { - PrintAndLogEx(INFO, _CYAN_("Header info")); +static int ndefPrintHeader(NDEFHeader_t *header, bool verbose) { - PrintAndLogEx(SUCCESS, " %s ....... Message begin", STRBOOL(header->MessageBegin)); - PrintAndLogEx(SUCCESS, " %s ...... Message end", STRBOOL(header->MessageEnd)); - PrintAndLogEx(SUCCESS, " %s ..... Chunk flag", STRBOOL(header->ChunkFlag)); - PrintAndLogEx(SUCCESS, " %s .... Short record bit", STRBOOL(header->ShortRecordBit)); - PrintAndLogEx(SUCCESS, " %s ... ID Len present", STRBOOL(header->IDLenPresent)); - PrintAndLogEx(SUCCESS, ""); + if (verbose) { + PrintAndLogEx(INFO, _CYAN_("Header info")); + PrintAndLogEx(SUCCESS, " %s ....... Message begin", STRBOOL(header->MessageBegin)); + PrintAndLogEx(SUCCESS, " %s ...... Message end", STRBOOL(header->MessageEnd)); + PrintAndLogEx(SUCCESS, " %s ..... Chunk flag", STRBOOL(header->ChunkFlag)); + PrintAndLogEx(SUCCESS, " %s .... Short record bit", STRBOOL(header->ShortRecordBit)); + PrintAndLogEx(SUCCESS, " %s ... ID Len present", STRBOOL(header->IDLenPresent)); + PrintAndLogEx(SUCCESS, ""); - PrintAndLogEx(SUCCESS, " Header length...... %zu", header->len); - PrintAndLogEx(SUCCESS, " Type length........ %zu", header->TypeLen); - PrintAndLogEx(SUCCESS, " Payload length..... %zu", header->PayloadLen); - PrintAndLogEx(SUCCESS, " ID length.......... %zu", header->IDLen); - PrintAndLogEx(SUCCESS, " Record length...... %zu", header->RecLen); + PrintAndLogEx(SUCCESS, " Header length...... %zu", header->len); + PrintAndLogEx(SUCCESS, " Type length........ %zu", header->TypeLen); + PrintAndLogEx(SUCCESS, " Payload length..... %zu", header->PayloadLen); + PrintAndLogEx(SUCCESS, " ID length.......... %zu", header->IDLen); - PrintAndLogEx(SUCCESS, " Type name format... [ 0x%02x ] " _YELLOW_("%s"), header->TypeNameFormat, TypeNameFormat_s[header->TypeNameFormat]); + PrintAndLogEx(SUCCESS, " Type name format... [ 0x%02x ] " _YELLOW_("%s"), header->TypeNameFormat, TypeNameFormat_s[header->TypeNameFormat]); + PrintAndLogEx(SUCCESS, " Record length...... %zu", header->RecLen); + } return PM3_SUCCESS; } @@ -483,26 +485,27 @@ static int ndefDecodePayloadSmartPoster(uint8_t *ndef, size_t ndeflen, bool prin return res; } - if (verbose) { - ndefPrintHeader(&NDEFHeader); - } + ndefPrintHeader(&NDEFHeader, verbose); if (NDEFHeader.TypeLen && NDEFHeader.PayloadLen) { - ndefDecodePayload(&NDEFHeader); + ndefDecodePayload(&NDEFHeader, verbose); } - if (NDEFHeader.TypeLen) { - PrintAndLogEx(INFO, "Type data"); - print_buffer(NDEFHeader.Type, NDEFHeader.TypeLen, 1); - } - if (NDEFHeader.IDLen) { - PrintAndLogEx(INFO, "ID data"); - print_buffer(NDEFHeader.ID, NDEFHeader.IDLen, 1); - } - if (NDEFHeader.PayloadLen) { - PrintAndLogEx(INFO, "Payload data"); - print_buffer(NDEFHeader.Payload, NDEFHeader.PayloadLen, 1); + if (verbose) { + if (NDEFHeader.TypeLen) { + PrintAndLogEx(INFO, "Type data"); + print_buffer(NDEFHeader.Type, NDEFHeader.TypeLen, 1); + } + if (NDEFHeader.IDLen) { + PrintAndLogEx(INFO, "ID data"); + print_buffer(NDEFHeader.ID, NDEFHeader.IDLen, 1); + } + if (NDEFHeader.PayloadLen) { + PrintAndLogEx(INFO, "Payload data"); + print_buffer(NDEFHeader.Payload, NDEFHeader.PayloadLen, 1); + } } + // recursive if (NDEFHeader.MessageEnd == false) { ndefDecodePayloadSmartPoster(ndef + NDEFHeader.RecLen, ndeflen - NDEFHeader.RecLen, false, false); @@ -825,7 +828,7 @@ static int ndefDecodeMime_bt(NDEFHeader_t *ndef) { return PM3_SUCCESS; } -static int ndefDecodePayload(NDEFHeader_t *ndef) { +static int ndefDecodePayload(NDEFHeader_t *ndef, bool verbose) { PrintAndLogEx(INFO, ""); switch (ndef->TypeNameFormat) { @@ -868,7 +871,7 @@ static int ndefDecodePayload(NDEFHeader_t *ndef) { } if (!strncmp((char *)ndef->Type, "Sp", ndef->TypeLen)) { - ndefDecodePayloadSmartPoster(ndef->Payload, ndef->PayloadLen, true, false); + ndefDecodePayloadSmartPoster(ndef->Payload, ndef->PayloadLen, true, verbose); } if (!strncmp((char *)ndef->Type, "Di", ndef->TypeLen)) { @@ -947,36 +950,39 @@ static int ndefDecodePayload(NDEFHeader_t *ndef) { return PM3_SUCCESS; } -static int ndefRecordDecodeAndPrint(uint8_t *ndefRecord, size_t ndefRecordLen) { +static int ndefRecordDecodeAndPrint(uint8_t *ndefRecord, size_t ndefRecordLen, bool verbose) { NDEFHeader_t NDEFHeader = {0}; int res = ndefDecodeHeader(ndefRecord, ndefRecordLen, &NDEFHeader); if (res != PM3_SUCCESS) return res; - ndefPrintHeader(&NDEFHeader); + ndefPrintHeader(&NDEFHeader, verbose); PrintAndLogEx(INFO, ""); PrintAndLogEx(INFO, _CYAN_("Payload info")); - if (NDEFHeader.TypeLen) { - PrintAndLogEx(INFO, "Type data"); - print_buffer(NDEFHeader.Type, NDEFHeader.TypeLen, 1); - } - if (NDEFHeader.IDLen) { - PrintAndLogEx(INFO, "ID data"); - print_buffer(NDEFHeader.ID, NDEFHeader.IDLen, 1); - } - if (NDEFHeader.PayloadLen) { - PrintAndLogEx(INFO, "Payload data"); - print_buffer(NDEFHeader.Payload, NDEFHeader.PayloadLen, 1); + if (verbose) { + if (NDEFHeader.TypeLen) { + PrintAndLogEx(INFO, "Type data"); + print_buffer(NDEFHeader.Type, NDEFHeader.TypeLen, 1); + } + if (NDEFHeader.IDLen) { + PrintAndLogEx(INFO, "ID data"); + print_buffer(NDEFHeader.ID, NDEFHeader.IDLen, 1); + } + if (NDEFHeader.PayloadLen) { + PrintAndLogEx(INFO, "Payload data"); + print_buffer(NDEFHeader.Payload, NDEFHeader.PayloadLen, 1); + } } + if (NDEFHeader.TypeLen && NDEFHeader.PayloadLen) { - ndefDecodePayload(&NDEFHeader); + ndefDecodePayload(&NDEFHeader, verbose); } return PM3_SUCCESS; } -int NDEFRecordsDecodeAndPrint(uint8_t *ndefRecord, size_t ndefRecordLen) { +int NDEFRecordsDecodeAndPrint(uint8_t *ndefRecord, size_t ndefRecordLen, bool verbose) { bool firstRec = true; size_t len = 0; size_t counter = 0; @@ -1005,7 +1011,7 @@ int NDEFRecordsDecodeAndPrint(uint8_t *ndefRecord, size_t ndefRecordLen) { PrintAndLogEx(NORMAL, ""); PrintAndLogEx(SUCCESS, _CYAN_("Record") " " _YELLOW_("%zu"), counter); PrintAndLogEx(INFO, "-----------------------------------------------------"); - ndefRecordDecodeAndPrint(&ndefRecord[len], NDEFHeader.RecLen); + ndefRecordDecodeAndPrint(&ndefRecord[len], NDEFHeader.RecLen, verbose); len += NDEFHeader.RecLen; @@ -1085,9 +1091,9 @@ int NDEFDecodeAndPrint(uint8_t *ndef, size_t ndefLen, bool verbose) { if (len == 0) { PrintAndLogEx(SUCCESS, "Found NDEF message w zero length"); } else { - PrintAndLogEx(SUCCESS, "Found NDEF message (%d bytes)", len); + PrintAndLogEx(SUCCESS, "Found NDEF message ( " _YELLOW_("%d") " bytes )", len); - int res = NDEFRecordsDecodeAndPrint(&ndef[indx], len); + int res = NDEFRecordsDecodeAndPrint(&ndef[indx], len, verbose); if (res != PM3_SUCCESS) return res; } @@ -1118,4 +1124,3 @@ int NDEFDecodeAndPrint(uint8_t *ndef, size_t ndefLen, bool verbose) { } return PM3_SUCCESS; } - \ No newline at end of file diff --git a/client/src/nfc/ndef.h b/client/src/nfc/ndef.h index 2e3374491..478c28e0a 100644 --- a/client/src/nfc/ndef.h +++ b/client/src/nfc/ndef.h @@ -74,6 +74,6 @@ typedef struct { } NDEFHeader_t; int NDEFDecodeAndPrint(uint8_t *ndef, size_t ndefLen, bool verbose); -int NDEFRecordsDecodeAndPrint(uint8_t *ndefRecord, size_t ndefRecordLen); +int NDEFRecordsDecodeAndPrint(uint8_t *ndefRecord, size_t ndefRecordLen, bool verbose); #endif // _NDEF_H_ diff --git a/doc/commands.json b/doc/commands.json index 0bc8ae626..39064b73d 100644 --- a/doc/commands.json +++ b/doc/commands.json @@ -1162,9 +1162,10 @@ "offline": false, "options": [ "-h, --help This help", - "-f, --file save raw NDEF to file" + "-f, --file save raw NDEF to file", + "-v, --verbose show technical data" ], - "usage": "hf 14a ndefread [-h] [-f ]" + "usage": "hf 14a ndefread [-hv] [-f ]" }, "hf 14a raw": { "command": "hf 14a raw", @@ -1348,9 +1349,10 @@ "offline": false, "options": [ "-h, --help This help", - "-f, --file save raw NDEF to file" + "-f, --file save raw NDEF to file", + "-v, --verbose show technical data" ], - "usage": "hf 14b ndefread [-h] [-f ]" + "usage": "hf 14b ndefread [-hv] [-f ]" }, "hf 14b raw": { "command": "hf 14b raw", @@ -4394,20 +4396,23 @@ "command": "hf mf ndefwrite", "description": "Write raw NDEF hex bytes to tag. This commands assumes tag already been NFC/NDEF formatted.", "notes": [ - "hf mf ndefread -d 0300FE -> write empty record to tag", - "hf mf ndefread -f myfilename" + "hf mf ndefwrite -d 0300FE -> write empty record to tag", + "hf mf ndefwrite -f myfilename", + "hf mf ndefwrite -d 033fd1023a53709101195405656e2d55534963656d616e2054776974746572206c696e6b5101195502747769747465722e636f6d2f686572726d616e6e31303031" ], "offline": false, "options": [ "-h, --help This help", "-d raw NDEF hex bytes", "-f, --file write raw NDEF file to tag", + "-p fix NDEF record headers / terminator block if missing", "--mini MIFARE Classic Mini / S20", "--1k MIFARE Classic 1k / S50 (def)", "--2k MIFARE Classic/Plus 2k", - "--4k MIFARE Classic 4k / S70" + "--4k MIFARE Classic 4k / S70", + "-v, --verbose verbose output" ], - "usage": "hf mf ndefwrite [-h] [-d ] [-f ] [--mini] [--1k] [--2k] [--4k]" + "usage": "hf mf ndefwrite [-hpv] [-d ] [-f ] [--mini] [--1k] [--2k] [--4k]" }, "hf mf nested": { "command": "hf mf nested", @@ -6112,9 +6117,10 @@ "options": [ "-h, --help This help", "-l Swap entered key's endianness", - "-f, --file Save raw NDEF to file" + "-f, --file Save raw NDEF to file", + "-v, --verbose show technical data" ], - "usage": "hf mfu ndefread [-hl] [-k Replace default key for NDEF] [-f ]" + "usage": "hf mfu ndefread [-hlv] [-k Replace default key for NDEF] [-f ]" }, "hf mfu otptear": { "command": "hf mfu otptear", @@ -6454,9 +6460,10 @@ "options": [ "-h, --help This help", "-p, --pwd 16 byte read password", - "-f, --file save raw NDEF to file" + "-f, --file save raw NDEF to file", + "-v, --verbose show technical data" ], - "usage": "hf st25ta ndefread [-h] [-p ] [-f ]" + "usage": "hf st25ta ndefread [-hv] [-p ] [-f ]" }, "hf st25ta protect": { "command": "hf st25ta protect", @@ -10632,9 +10639,10 @@ "options": [ "-h, --help This help", "-l Swap entered key's endianness", - "-f, --file Save raw NDEF to file" + "-f, --file Save raw NDEF to file", + "-v, --verbose show technical data" ], - "usage": "hf mfu ndefread [-hl] [-k Replace default key for NDEF] [-f ]" + "usage": "hf mfu ndefread [-hlv] [-k Replace default key for NDEF] [-f ]" }, "nfc type4a help": { "command": "nfc type4a help", @@ -10654,9 +10662,10 @@ "offline": false, "options": [ "-h, --help This help", - "-f, --file save raw NDEF to file" + "-f, --file save raw NDEF to file", + "-v, --verbose show technical data" ], - "usage": "hf 14a ndefread [-h] [-f ]" + "usage": "hf 14a ndefread [-hv] [-f ]" }, "nfc type4a st25taread": { "command": "nfc type4a st25taread", @@ -10669,9 +10678,10 @@ "options": [ "-h, --help This help", "-p, --pwd 16 byte read password", - "-f, --file save raw NDEF to file" + "-f, --file save raw NDEF to file", + "-v, --verbose show technical data" ], - "usage": "hf st25ta ndefread [-h] [-p ] [-f ]" + "usage": "hf st25ta ndefread [-hv] [-p ] [-f ]" }, "nfc type4b help": { "command": "nfc type4b help", @@ -10691,9 +10701,10 @@ "offline": false, "options": [ "-h, --help This help", - "-f, --file save raw NDEF to file" + "-f, --file save raw NDEF to file", + "-v, --verbose show technical data" ], - "usage": "hf 14b ndefread [-h] [-f ]" + "usage": "hf 14b ndefread [-hv] [-f ]" }, "prefs get barmode": { "command": "prefs get barmode", @@ -11389,6 +11400,6 @@ "metadata": { "commands_extracted": 721, "extracted_by": "PM3Help2JSON v1.00", - "extracted_on": "2022-10-20T15:33:35" + "extracted_on": "2022-10-23T00:39:16" } } \ No newline at end of file