mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 05:43:48 -07:00
hf mf mad - text
This commit is contained in:
parent
cdbd4d7d1e
commit
c3ea0c83ad
1 changed files with 8 additions and 9 deletions
|
@ -4884,16 +4884,20 @@ static int CmdHF14AMfMAD(const char *Cmd) {
|
||||||
uint8_t sector10[16 * 4] = {0};
|
uint8_t sector10[16 * 4] = {0};
|
||||||
|
|
||||||
bool got_first = true;
|
bool got_first = true;
|
||||||
if (mfReadSector(MF_MAD1_SECTOR, MF_KEY_A, (uint8_t *)g_mifare_mad_key, sector0)) {
|
if (mfReadSector(MF_MAD1_SECTOR, MF_KEY_A, (uint8_t *)g_mifare_mad_key, sector0) != PM3_SUCCESS) {
|
||||||
PrintAndLogEx(ERR, "error, read sector 0. card don't have MAD or don't have MAD on default keys");
|
PrintAndLogEx(WARNING, "error, read sector 0. card don't have MAD or don't have MAD on default keys");
|
||||||
got_first = false;
|
got_first = false;
|
||||||
|
} else {
|
||||||
|
PrintAndLogEx(INFO, "Authentication ( " _GREEN_("OK") " )");
|
||||||
}
|
}
|
||||||
|
|
||||||
// User supplied key
|
// User supplied key
|
||||||
if (got_first == false && keylen == 6) {
|
if (got_first == false && keylen == 6) {
|
||||||
if (mfReadSector(MF_MAD1_SECTOR, MF_KEY_A, userkey, sector0)) {
|
PrintAndLogEx(INFO, "Trying user specified key...");
|
||||||
PrintAndLogEx(ERR, "error, read sector 0. card don't have MAD or don't the custom key is wrong");
|
if (mfReadSector(MF_MAD1_SECTOR, MF_KEY_A, userkey, sector0) != PM3_SUCCESS) {
|
||||||
|
PrintAndLogEx(ERR, "error, read sector 0. card don't have MAD or don't the custom key is wrong");
|
||||||
} else {
|
} else {
|
||||||
|
PrintAndLogEx(INFO, "Authentication ( " _GREEN_("OK") " )");
|
||||||
got_first = true;
|
got_first = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4903,11 +4907,6 @@ static int CmdHF14AMfMAD(const char *Cmd) {
|
||||||
return PM3_ESOFT;
|
return PM3_ESOFT;
|
||||||
}
|
}
|
||||||
|
|
||||||
// if (aidlen != 2 && !decodeholder) {
|
|
||||||
// PrintAndLogEx(WARNING, "Using default MAD keys instead");
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
PrintAndLogEx(NORMAL, "");
|
PrintAndLogEx(NORMAL, "");
|
||||||
PrintAndLogEx(INFO, "--- " _CYAN_("MIFARE App Directory Information") " ----------------");
|
PrintAndLogEx(INFO, "--- " _CYAN_("MIFARE App Directory Information") " ----------------");
|
||||||
PrintAndLogEx(INFO, "-----------------------------------------------------");
|
PrintAndLogEx(INFO, "-----------------------------------------------------");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue