mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-08-19 21:03:23 -07:00
hf mf sniff
added CRC_14443_A check
This commit is contained in:
parent
c948cbde8c
commit
8b6a93df91
2 changed files with 8 additions and 1 deletions
|
@ -419,7 +419,13 @@ int mfTraceDecode(uint8_t *data_src, int len, bool wantSaveToEmlFile) {
|
||||||
|
|
||||||
switch (traceState) {
|
switch (traceState) {
|
||||||
case TRACE_IDLE:
|
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
|
// AUTHENTICATION
|
||||||
if ((len ==4) && ((data[0] == 0x60) || (data[0] == 0x61))) {
|
if ((len ==4) && ((data[0] == 0x60) || (data[0] == 0x61))) {
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
#include "nonce2key/nonce2key.h"
|
#include "nonce2key/nonce2key.h"
|
||||||
#include "nonce2key/crapto1.h"
|
#include "nonce2key/crapto1.h"
|
||||||
|
#include "iso14443crc.h"
|
||||||
|
|
||||||
#define MEM_CHUNK 1000000
|
#define MEM_CHUNK 1000000
|
||||||
#define NESTED_SECTOR_RETRY 10
|
#define NESTED_SECTOR_RETRY 10
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue