From a1d93567d2330286a1d6238f076f5b256eec1eca Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Sun, 5 Jan 2020 23:14:24 +0100 Subject: [PATCH] shadowing --- client/cmdhfmf.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/client/cmdhfmf.c b/client/cmdhfmf.c index a8960d5d0..4fe5370fc 100644 --- a/client/cmdhfmf.c +++ b/client/cmdhfmf.c @@ -1750,7 +1750,6 @@ static int CmdHF14AMfAutoPWN(const char *Cmd) { if (param_gethex(Cmd, cmdp + 3, key, 12)) { PrintAndLogEx(WARNING, "Key must include 12 HEX symbols"); errors = true; - return PM3_EINVARG; } know_target_key = true; cmdp += 3; @@ -1896,7 +1895,7 @@ static int CmdHF14AMfAutoPWN(const char *Cmd) { bool load_success = true; // Load the dictionary if (has_filename) { - int res = loadFileDICTIONARY_safe(filename, (void **) &keyBlock, 6, &key_cnt); + res = loadFileDICTIONARY_safe(filename, (void **) &keyBlock, 6, &key_cnt); if (res != PM3_SUCCESS || key_cnt == 0 || keyBlock == NULL) { PrintAndLogEx(FAILED, "An error occurred while loading the dictionary! (we will use the default keys now)"); if (keyBlock != NULL) @@ -1965,7 +1964,7 @@ static int CmdHF14AMfAutoPWN(const char *Cmd) { if (size == key_cnt - i) lastChunk = true; - int res = mfCheckKeys_fast(sectors_cnt, firstChunk, lastChunk, strategy, size, keyBlock + (i * 6), e_sector, false); + res = mfCheckKeys_fast(sectors_cnt, firstChunk, lastChunk, strategy, size, keyBlock + (i * 6), e_sector, false); if (firstChunk) firstChunk = false; // all keys, aborted @@ -2016,7 +2015,7 @@ static int CmdHF14AMfAutoPWN(const char *Cmd) { // Check if the darkside attack can be used if (prng_type) { if (verbose) PrintAndLogEx(INFO, _YELLOW_("======================= START DARKSIDE ATTACK =======================")); - int isOK = mfDarkside(FirstBlockOfSector(blockNo), keyType, &key64); + isOK = mfDarkside(FirstBlockOfSector(blockNo), keyType, &key64); if (verbose) PrintAndLogEx(INFO, _YELLOW_("======================= STOP DARKSIDE ATTACK =======================")); switch (isOK) { case -1 : @@ -2508,7 +2507,7 @@ static int CmdHF14AMfChk_fast(const char *Cmd) { if (size == keycnt - i) lastChunk = true; - int res = mfCheckKeys_fast(sectorsCnt, firstChunk, lastChunk, strategy, size, keyBlock + (i * 6), e_sector, false); + res = mfCheckKeys_fast(sectorsCnt, firstChunk, lastChunk, strategy, size, keyBlock + (i * 6), e_sector, false); if (firstChunk) firstChunk = false; @@ -4310,10 +4309,8 @@ static int CmdHF14AMfice(const char *Cmd) { if (resp.oldarg[0]) goto out; uint32_t items = resp.oldarg[2]; - if (fnonces) { - fwrite(resp.data.asBytes, 1, items * 4, fnonces); - fflush(fnonces); - } + fwrite(resp.data.asBytes, 1, items * 4, fnonces); + fflush(fnonces); total_num_nonces += items; if (total_num_nonces > part_limit) {