mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2026-05-12 11:18:11 -07:00
fix #1286 - wrong pwd/key length checks
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user