mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-14 10:37:23 -07:00
hf mf rdsc - if a successful read was made , add the used key to the sector trailer output.\nhf mf info - after getting annoyed over command running tests on non mifare classic card, this fixes it.
This commit is contained in:
parent
387009ab6a
commit
27aa9a2085
2 changed files with 17 additions and 0 deletions
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue