From fd9c8f4f7eb61184bc56e76c98f2ac5de3fc4f10 Mon Sep 17 00:00:00 2001 From: team-orangeBlue <63470411+team-orangeBlue@users.noreply.github.com> Date: Sun, 9 Apr 2023 08:52:52 +0300 Subject: [PATCH] Small corrections to MF+ commands Add -k argument to rdbl, fix chk command Signed-off-by: team-orangeBlue <63470411+team-orangeBlue@users.noreply.github.com> --- client/src/cmdhfmfp.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/client/src/cmdhfmfp.c b/client/src/cmdhfmfp.c index 7c729cdc0..6b9c3230d 100644 --- a/client/src/cmdhfmfp.c +++ b/client/src/cmdhfmfp.c @@ -597,6 +597,7 @@ static int CmdHFMFPCommitPerso(const char *Cmd) { CLIParserContext *ctx; CLIParserInit(&ctx, "hf mfp commitp", "Executes Commit Perso command. Can be used in SL0 mode only.", + "OBS! This command will not be executed if CardConfigKey, CardMasterKey and L3SwitchKey AES keys are not written.", "hf mfp commitp\n" // "hf mfp commitp --sl 1" ); @@ -689,7 +690,7 @@ static int CmdHFMFPRdbl(const char *Cmd) { arg_lit0("b", "keyb", "Use key B (def: keyA)"), arg_lit0("p", "plain", "Plain communication mode between reader and card"), arg_int1(NULL, "blk", "<0..255>", "Block number"), - arg_str0(NULL, "key", "", "Key, 16 hex bytes"), + arg_str0("k", "key", "", "Key, 16 hex bytes"), arg_param_end }; CLIExecWithReturn(ctx, Cmd, argtable, false); @@ -1056,7 +1057,8 @@ static int MFPKeyCheck(uint8_t startSector, uint8_t endSector, uint8_t startKeyA } // 5 - auth error (rnd not equal) - if (res != 5) { + // PM3 client says that RND not equal is -16. Corrected. Seems to work. + if (res != -16) { if (verbose) PrintAndLogEx(ERR, "\nExchange error. Aborted."); else