diff --git a/CHANGELOG.md b/CHANGELOG.md index fb6104349..20ec6869f 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 `hf fudan dump --ns` - now supports nosave flag (@iceman1001) - Added `lf em 410x --electra` - adds two extra blocks. Thanks jareckib (@iceman1001) - Changed `hf mfu info` - now identifies UL-AES correct (@iceman1001) - Changed `hw detectreader` - Detect both LF and HF at the same time (@wh201906) diff --git a/client/src/cmdhffudan.c b/client/src/cmdhffudan.c index b0dc8b08d..7a1091395 100644 --- a/client/src/cmdhffudan.c +++ b/client/src/cmdhffudan.c @@ -243,6 +243,7 @@ static int CmdHFFudanDump(const char *Cmd) { void *argtable[] = { arg_param_begin, arg_str0("f", "file", "", "Specify a filename for dump file"), + arg_lit0(NULL, "ns", "no save to file"), arg_param_end }; CLIExecWithReturn(ctx, Cmd, argtable, true); @@ -250,6 +251,7 @@ static int CmdHFFudanDump(const char *Cmd) { int datafnlen = 0; char dataFilename[FILE_PATH_SIZE] = {0}; CLIParamStrToBuf(arg_get_str(ctx, 1), (uint8_t *)dataFilename, FILE_PATH_SIZE, &datafnlen); + bool nosave = arg_get_lit(ctx, 2); CLIParserFree(ctx); // Select card to get UID/UIDLEN/ATQA/SAK information @@ -329,6 +331,12 @@ static int CmdHFFudanDump(const char *Cmd) { fudan_print_blocks(num_blocks, carddata); + if (nosave) { + PrintAndLogEx(INFO, "Called with no save option"); + PrintAndLogEx(NORMAL, ""); + return PM3_SUCCESS; + } + // create filename if none was given if (strlen(dataFilename) < 1) { char *fptr = GenerateFilename(&card, "hf-fudan-", "-dump");