From 73a5e3b23d4387a9570e29d09ac197d171920fd2 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Sun, 3 Dec 2017 15:23:24 +0100 Subject: [PATCH] chg: 'hf mfu eload' - instead of showing a error, it now tells a warning that we only loaded N blocks of data to emulator memory. It always loads the existing blocks into emulator memory. The previous message made users belive a error had occured when it actually did load. --- client/cmdhfmf.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/client/cmdhfmf.c b/client/cmdhfmf.c index 9c6f86e87..65838c09b 100644 --- a/client/cmdhfmf.c +++ b/client/cmdhfmf.c @@ -2236,10 +2236,18 @@ int CmdHF14AMfELoad(const char *Cmd) { } fclose(f); printf("\n"); - - if ((blockNum != numBlocks)) { - PrintAndLog("File content error. Got %d must be %d blocks.",blockNum, numBlocks); - return 4; + + // Ultralight /Ntag + if ( blockWidth == 8 ) { + if ((blockNum != numBlocks)) { + PrintAndLog("Warning, Ultralight/Ntag file content, Loaded %d blocks into emulator memory", blockNum); + return 0; + } + } else { + if ((blockNum != numBlocks)) { + PrintAndLog("Error, file content, Only loaded %d blocks, must be %d blocks into emulator memory", blockNum, numBlocks); + return 4; + } } PrintAndLog("Loaded %d blocks from file: %s", blockNum, filename); return 0;