mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-08-20 21:33:19 -07:00
hf mf sniff
transfered parity from arm to decoding procedure
This commit is contained in:
parent
8b6a93df91
commit
71d90e54cd
6 changed files with 20 additions and 11 deletions
|
@ -2455,7 +2455,7 @@ void RAMFUNC SniffMifare(uint8_t param) {
|
|||
if(MillerDecoding((data[0] & 0xF0) >> 4)) {
|
||||
LED_C_INV();
|
||||
// check - if there is a short 7bit request from reader
|
||||
if (MfSniffLogic(receivedCmd, Uart.byteCnt, Uart.bitCnt, TRUE)) break;
|
||||
if (MfSniffLogic(receivedCmd, Uart.byteCnt, Uart.parityBits, Uart.bitCnt, TRUE)) break;
|
||||
|
||||
/* And ready to receive another command. */
|
||||
Uart.state = STATE_UNSYNCD;
|
||||
|
@ -2467,7 +2467,7 @@ void RAMFUNC SniffMifare(uint8_t param) {
|
|||
if(ManchesterDecoding(data[0] & 0x0F)) {
|
||||
LED_C_INV();
|
||||
|
||||
if (MfSniffLogic(receivedResponse, Demod.len, Uart.bitCnt, FALSE)) break;
|
||||
if (MfSniffLogic(receivedResponse, Demod.len, Demod.parityBits, Demod.bitCount, FALSE)) break;
|
||||
|
||||
// And ready to receive another response.
|
||||
memset(&Demod, 0, sizeof(Demod));
|
||||
|
|
|
@ -40,7 +40,7 @@ int MfSniffEnd(void){
|
|||
return 0;
|
||||
}
|
||||
|
||||
int RAMFUNC MfSniffLogic(const uint8_t * data, int len, int bitCnt, int reader) {
|
||||
int RAMFUNC MfSniffLogic(const uint8_t * data, int len, uint32_t parity, int bitCnt, int reader) {
|
||||
|
||||
if ((len == 1) && (bitCnt = 9) && (data[0] > 0x0F)) {
|
||||
sniffState = SNF_INIT;
|
||||
|
@ -121,18 +121,18 @@ int RAMFUNC MfSniffLogic(const uint8_t * data, int len, int bitCnt, int reader)
|
|||
sniffBuf[11] = sniffSAK;
|
||||
sniffBuf[12] = 0xFF;
|
||||
sniffBuf[13] = 0xFF;
|
||||
LogTrace(sniffBuf, 14, 0, 0, true);
|
||||
LogTrace(sniffBuf, 14, 0, parity, true);
|
||||
timerData = GetTickCount();
|
||||
}
|
||||
case SNF_CARD_CMD:{
|
||||
LogTrace(data, len, 0, 0, true);
|
||||
LogTrace(data, len, 0, parity, true);
|
||||
|
||||
sniffState = SNF_CARD_RESP;
|
||||
timerData = GetTickCount();
|
||||
break;
|
||||
}
|
||||
case SNF_CARD_RESP:{
|
||||
LogTrace(data, len, 0, 0, false);
|
||||
LogTrace(data, len, 0, parity, false);
|
||||
|
||||
sniffState = SNF_CARD_CMD;
|
||||
timerData = GetTickCount();
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
#define SNF_UID_7 0
|
||||
|
||||
int MfSniffInit(void);
|
||||
int RAMFUNC MfSniffLogic(const uint8_t * data, int len, int bitCnt, int reader);
|
||||
int RAMFUNC MfSniffLogic(const uint8_t * data, int len, uint32_t parity, int bitCnt, int reader);
|
||||
int RAMFUNC MfSniffSend(int maxTimeoutMs);
|
||||
int intMfSniffSend();
|
||||
int MfSniffEnd(void);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue