X-Git-Url: http://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/a0bf7ba787ea7b309d034e1d5412a7d63b1c2fa3..bd5d0f07e9330f18088f626bc1d18857aeaeaa8e:/client/cmdhfmf.c diff --git a/client/cmdhfmf.c b/client/cmdhfmf.c index 10c56cdc..35bf2a00 100644 --- a/client/cmdhfmf.c +++ b/client/cmdhfmf.c @@ -1596,10 +1596,10 @@ int CmdHF14AMfEKeyPrn(const char *Cmd) uint8_t data[16]; uint64_t keyA, keyB; - if (param_getchar(Cmd, 0) == 'h' || param_getchar(Cmd, 0)== 0x00) { + if (param_getchar(Cmd, 0) == 'h') { PrintAndLog("It prints the keys loaded in the emulator memory"); PrintAndLog("Usage: hf mf ekeyprn [card memory]"); - PrintAndLog(" [card memory]: 1 = 1K (default), 4 = 4K"); + PrintAndLog(" [card memory]: 0 = 320 bytes (Mifare Mini), 1 = 1K (default), 2 = 2K, 4 = 4K"); PrintAndLog(""); PrintAndLog(" sample: hf mf ekeyprn 1"); return 0; @@ -1608,11 +1608,13 @@ int CmdHF14AMfEKeyPrn(const char *Cmd) char cmdp = param_getchar(Cmd, 0); switch (cmdp) { + case '0' : numSectors = 5; break; case '1' : case '\0': numSectors = 16; break; + case '2' : numSectors = 32; break; case '4' : numSectors = 40; break; default: numSectors = 16; - } + } PrintAndLog("|---|----------------|----------------|"); PrintAndLog("|sec|key A |key B |"); @@ -1621,6 +1623,7 @@ int CmdHF14AMfEKeyPrn(const char *Cmd) if (mfEmlGetMem(data, FirstBlockOfSector(i) + NumBlocksPerSector(i) - 1, 1)) { PrintAndLog("error get block %d", FirstBlockOfSector(i) + NumBlocksPerSector(i) - 1); break; + break; } keyA = bytes_to_num(data, 6); keyB = bytes_to_num(data + 10, 6);