hf mfu pwdgen with 4byte uid should adapt to 7 byte

Signed-off-by: Anton Todorov <ANTodorov@users.noreply.github.com>
This commit is contained in:
Anton Todorov 2024-09-30 16:56:14 +03:00 committed by GitHub
commit 26fe583a80
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -4392,6 +4392,10 @@ static int CmdHF14AMfUPwdGen(const char *Cmd) {
if (u_len != 7 && u_len != 4) { if (u_len != 7 && u_len != 4) {
PrintAndLogEx(WARNING, "Key must be 7 hex bytes"); PrintAndLogEx(WARNING, "Key must be 7 hex bytes");
return PM3_EINVARG; return PM3_EINVARG;
} else if (u_len == 4) {
// adapt to 7 bytes :)
memset(uid + 4, 0x00, 3);
u_len = 7;
} }
} }