From f04723d3f518f65afba930ae7a834925715ade57 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Wed, 11 Oct 2017 13:20:39 +0200 Subject: [PATCH] fix: 'hf mf fchk' - some strange output when only using the default keys (no dictionary file) fix: 'hf mf fchk' - helptext corrected fix: 'hf mf fchk' - allow to call with just 1 argument --- client/cmdhfmf.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/client/cmdhfmf.c b/client/cmdhfmf.c index d5910ca5d..619104cab 100644 --- a/client/cmdhfmf.c +++ b/client/cmdhfmf.c @@ -129,7 +129,8 @@ int usage_hf14_chk(void){ return 0; } int usage_hf14_chk_fast(void){ - PrintAndLog("Usage: hf mf fastchk [t|d] [] []"); + PrintAndLog("Usage: hf mf fchk [t|d] [] []"); + PrintAndLog("(iceman) This is a improved checkkeys method speedwise "); PrintAndLog("options:"); PrintAndLog(" h this help"); PrintAndLog(" all sectors based on card memory, other values then below defaults to 1k"); @@ -141,9 +142,9 @@ int usage_hf14_chk_fast(void){ PrintAndLog(" t write keys to emulator memory\n"); PrintAndLog(" "); PrintAndLog("samples:"); - PrintAndLog(" hf mf chk 1 1234567890ab keys.dic -- target 1K using key 1234567890ab, using dictionary file"); - PrintAndLog(" hf mf chk 1 t -- target 1K, write to emulator mem"); - PrintAndLog(" hf mf chk 1 d -- target 1K, write to file"); + PrintAndLog(" hf mf fchk 1 1234567890ab keys.dic -- target 1K using key 1234567890ab, using dictionary file"); + PrintAndLog(" hf mf fchk 1 t -- target 1K, write to emulator mem"); + PrintAndLog(" hf mf fchk 1 d -- target 1K, write to file"); return 0; } int usage_hf14_keybrute(void){ @@ -1188,7 +1189,7 @@ void shuffle( uint8_t *array, uint16_t len) { int CmdHF14AMfChk_fast(const char *Cmd) { - if (strlen(Cmd)<2) return usage_hf14_chk_fast(); + if (strlen(Cmd)<1) return usage_hf14_chk_fast(); FILE * f; char filename[FILE_PATH_SIZE]={0}; @@ -1375,7 +1376,7 @@ int CmdHF14AMfChk_fast(const char *Cmd) { timeout = 0; t2 = msclock() - t2; - PrintAndLog("\n[-] Chunk: %.1fs | found %d/%d keys", t2, (float)(t2/1000.0), curr_keys, (SectorsCnt<<1)); + PrintAndLog("\n[-] Chunk: %.1fs | found %u/%u keys", t2, (float)(t2/1000.0), curr_keys, (SectorsCnt<<1)); // all keys? if ( curr_keys == SectorsCnt*2 || lastChunk ) {