diff --git a/client/src/cmdhfmfdes.c b/client/src/cmdhfmfdes.c index f646811f4..e2ab0d11e 100644 --- a/client/src/cmdhfmfdes.c +++ b/client/src/cmdhfmfdes.c @@ -5663,6 +5663,12 @@ static int DesfileReadFileAndPrint(DesfireContext *dctx, uint8_t fnum, int filet if (fsettings.fileCommMode != 0 && noauth) PrintAndLogEx(WARNING, "File needs communication mode `%s` but there is no authentication", CLIGetOptionListStr(DesfireCommunicationModeOpts, fsettings.commMode)); + if ((fsettings.rAccess < 0x0e && fsettings.rAccess != dctx->keyNum) || (fsettings.rwAccess < 0x0e && fsettings.rwAccess != dctx->keyNum)) + PrintAndLogEx(WARNING, "File needs to be authenticated with key 0x%02x or 0x%02x but current authentication key is 0x%02x", fsettings.rAccess, fsettings.rwAccess, dctx->keyNum); + + if (fsettings.rAccess == 0x0f && fsettings.rwAccess == 0x0f) + PrintAndLogEx(WARNING, "File access denied. All read access rights is 0x0f."); + if (verbose) PrintAndLogEx(INFO, "Got file type: %s. Option: %s. comm mode: %s", GetDesfireFileType(fsettings.fileType),