diff --git a/CHANGELOG.md b/CHANGELOG.md index 2e0d6debc..3652b7abd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ 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 mf info` - skip checking if it detects a MIFARE Ultralight family card (@iceman1001) +- Changed `hf mf rdsc` - it now addeds the used key to the output in the sector trailer (@iceman1001) - Added the `PM3ULTIMATE` platform in the build / docs. *untested* (@iceman1001) - Added fpga compilation for PM3ULTIMATE device (@n-hutton) - Updated the ATR list (@iceman1001) diff --git a/client/src/cmdhfmf.c b/client/src/cmdhfmf.c index 09614fc82..588d219fc 100644 --- a/client/src/cmdhfmf.c +++ b/client/src/cmdhfmf.c @@ -1461,6 +1461,13 @@ static int CmdHF14AMfRdSc(const char *Cmd) { uint8_t blocks = mfNumBlocksPerSector(sector); uint8_t start = mfFirstBlockOfSector(sector); + // since this was a successful read, add our known key to the output + if (keytype == MF_KEY_A) { + memcpy(data + ((blocks - 1) * MFBLOCK_SIZE), key, MIFARE_KEY_SIZE); + } else { + memcpy(data + ((blocks - 1) * MFBLOCK_SIZE) + 10, key, MIFARE_KEY_SIZE); + } + mf_print_sector_hdr(sector); for (int i = 0; i < blocks; i++) { mf_print_block_one(start + i, data + (i * MFBLOCK_SIZE), verbose); @@ -10029,6 +10036,13 @@ static int CmdHF14AMfInfo(const char *Cmd) { return PM3_EFAILED; } + uint64_t tagtype = GetHF14AMfU_Type(); + if (tagtype != MFU_TT_UL_ERROR) { + PrintAndLogEx(INFO, "This is not MIFARE Classic based card"); + PrintAndLogEx(HINT, "Hint: try `" _YELLOW_("hf mfu info") "`"); + goto out; + } + uint8_t signature[32] = {0}; int res = read_mfc_ev1_signature(signature); if (res == PM3_SUCCESS) { @@ -10260,6 +10274,7 @@ static int CmdHF14AMfInfo(const char *Cmd) { PrintAndLogEx(HINT, "Hint: Try `" _YELLOW_("script run fm11rf08s_recovery.py") "`"); } +out: if (setDeviceDebugLevel(dbg_curr, false) != PM3_SUCCESS) { return PM3_EFAILED; }