Skip to content

Commit

Permalink
hf fudan dump now supports the nosave flag
Browse files Browse the repository at this point in the history
  • Loading branch information
iceman1001 committed Feb 16, 2024
1 parent f5e976a commit c1156d2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
8 changes: 8 additions & 0 deletions client/src/cmdhffudan.c
Original file line number Diff line number Diff line change
Expand Up @@ -243,13 +243,15 @@ static int CmdHFFudanDump(const char *Cmd) {
void *argtable[] = {
arg_param_begin,
arg_str0("f", "file", "<fn>", "Specify a filename for dump file"),
arg_lit0(NULL, "ns", "no save to file"),
arg_param_end
};
CLIExecWithReturn(ctx, Cmd, argtable, true);

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
Expand Down Expand Up @@ -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");
Expand Down

0 comments on commit c1156d2

Please sign in to comment.