mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-24 23:25: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
|
// sanity checks
|
||||||
if (keylen != 0 && keylen != 6) {
|
if (keylen != 0 && keylen != 4) {
|
||||||
PrintAndLogEx(WARNING, "Wrong KEY len expected 0 or 6, got %d", keylen);
|
PrintAndLogEx(WARNING, "Wrong KEY len expected 0 or 4, got %d", keylen);
|
||||||
return PM3_EINVARG;
|
return PM3_EINVARG;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nalen != 0 && nalen != 8) {
|
if (nalen != 0 && nalen != 6) {
|
||||||
PrintAndLogEx(WARNING, "Wrong NR/AR len expected 0 or 8, got %d", nalen);
|
PrintAndLogEx(WARNING, "Wrong NR/AR len expected 0 or 6, got %d", nalen);
|
||||||
return PM3_EINVARG;
|
return PM3_EINVARG;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
#ifndef _NDEF_H_
|
#ifndef _NDEF_H_
|
||||||
#define _NDEF_H_
|
#define _NDEF_H_
|
||||||
|
|
||||||
|
#include <stdbool.h>
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue