From 26fe583a802a16095fd959b03fc840ad62001210 Mon Sep 17 00:00:00 2001 From: Anton Todorov Date: Mon, 30 Sep 2024 16:56:14 +0300 Subject: [PATCH] hf mfu pwdgen with 4byte uid should adapt to 7 byte Signed-off-by: Anton Todorov --- client/src/cmdhfmfu.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/client/src/cmdhfmfu.c b/client/src/cmdhfmfu.c index d56ae5123..1586d8bda 100644 --- a/client/src/cmdhfmfu.c +++ b/client/src/cmdhfmfu.c @@ -4392,6 +4392,10 @@ static int CmdHF14AMfUPwdGen(const char *Cmd) { if (u_len != 7 && u_len != 4) { PrintAndLogEx(WARNING, "Key must be 7 hex bytes"); return PM3_EINVARG; + } else if (u_len == 4) { + // adapt to 7 bytes :) + memset(uid + 4, 0x00, 3); + u_len = 7; } }