hf fudan dump now supports the nosave flag

This commit is contained in:
iceman1001 2024-02-16 22:50:16 +01:00
parent f5e976afa6
commit c1156d24f2
2 changed files with 9 additions and 0 deletions

View file

@ -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)

View file

@ -243,6 +243,7 @@ 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);
@ -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");