From 606c4a2ecdcfbd1f731b04cf75461a01eb64b08d Mon Sep 17 00:00:00 2001 From: merlokk <807634+merlokk@users.noreply.github.com> Date: Fri, 23 Jul 2021 13:35:30 +0300 Subject: [PATCH] more rights refactoring --- client/src/cmdhfmfdes.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/src/cmdhfmfdes.c b/client/src/cmdhfmfdes.c index db26632d0..b9a7d175f 100644 --- a/client/src/cmdhfmfdes.c +++ b/client/src/cmdhfmfdes.c @@ -6266,7 +6266,8 @@ static int CmdHF14ADesChFileSettings(const char *Cmd) { DesfireSetCommMode(&dctx, DCMPlain); res = DesfireGetFileSettings(&dctx, fileid, buf, &buflen); if (res == PM3_SUCCESS && buflen > 5) { - uint8_t chright = buf[2] & 0x0f; + uint8_t chright = 0; + DesfireDecodeFileAcessMode(&buf[2], NULL, NULL, NULL, &chright) ; if (verbose) PrintAndLogEx(INFO, "Current access right for change file settings: %s", GetDesfireAccessRightStr(chright));