mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-24 07:05:40 -07:00
fix #1286 - wrong pwd/key length checks
This commit is contained in:
parent
d9f1b97752
commit
59b86af1a8
2 changed files with 5 additions and 4 deletions
|
@ -559,13 +559,13 @@ static int CmdLFHitagReader(const char *Cmd) {
|
|||
}
|
||||
|
||||
// sanity checks
|
||||
if (keylen != 0 && keylen != 6) {
|
||||
PrintAndLogEx(WARNING, "Wrong KEY len expected 0 or 6, got %d", keylen);
|
||||
if (keylen != 0 && keylen != 4) {
|
||||
PrintAndLogEx(WARNING, "Wrong KEY len expected 0 or 4, got %d", keylen);
|
||||
return PM3_EINVARG;
|
||||
}
|
||||
|
||||
if (nalen != 0 && nalen != 8) {
|
||||
PrintAndLogEx(WARNING, "Wrong NR/AR len expected 0 or 8, got %d", nalen);
|
||||
if (nalen != 0 && nalen != 6) {
|
||||
PrintAndLogEx(WARNING, "Wrong NR/AR len expected 0 or 6, got %d", nalen);
|
||||
return PM3_EINVARG;
|
||||
}
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#ifndef _NDEF_H_
|
||||
#define _NDEF_H_
|
||||
|
||||
#include <stdbool.h>
|
||||
#include "common.h"
|
||||
|
||||
typedef enum {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue