hf mf sniff added CRC_14443_A check
This commit is contained in:
@@ -419,7 +419,13 @@ int mfTraceDecode(uint8_t *data_src, int len, bool wantSaveToEmlFile) {
|
||||
|
||||
switch (traceState) {
|
||||
case TRACE_IDLE:
|
||||
// TODO: check packet crc16!
|
||||
// check packet crc16!
|
||||
if ((len >= 4) && (!CheckCrc14443(CRC_14443_A, data, len))) {
|
||||
PrintAndLog("dec> CRC ERROR!!!");
|
||||
AddLogLine(logHexFileName, "dec> ", "CRC ERROR!!!");
|
||||
traceState = TRACE_ERROR; // do not decrypt the next commands
|
||||
return 1;
|
||||
}
|
||||
|
||||
// AUTHENTICATION
|
||||
if ((len ==4) && ((data[0] == 0x60) || (data[0] == 0x61))) {
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include "util.h"
|
||||
#include "nonce2key/nonce2key.h"
|
||||
#include "nonce2key/crapto1.h"
|
||||
#include "iso14443crc.h"
|
||||
|
||||
#define MEM_CHUNK 1000000
|
||||
#define NESTED_SECTOR_RETRY 10
|
||||
|
||||
Reference in New Issue
Block a user