FIX: dumptoemul.lua removed the extra linebreak in the end, making some load commands complain.

MOV: moved the try32/try64 attacks (mfkey32/mfkey64) into the nonce2key.c file
CHG: added @marshmellow42 changes to hf mfu dump layout.
ADD: an extra call to BigBuf_free in readcard..  just to make sure that it doesn't leak memory.
ADD: expermimental call to "try32" for "hf mf sim x".
This commit is contained in:
iceman1001
2015-05-25 13:10:55 +02:00
parent 7444d916c6
commit 46cd801c5a
9 changed files with 160 additions and 148 deletions

View File

@@ -1186,7 +1186,6 @@ void SimulateIso14443aTag(int tagType, int flags, int uid_2nd, byte_t* data)
cmd_send(CMD_ACK,CMD_SIMULATE_MIFARE_CARD,len,0,&ar_nr_responses,len);
ar_nr_collected = 0;
memset(ar_nr_responses, 0x00, len);
Dbprintf("ICE");
}
}
} else {
@@ -2490,7 +2489,8 @@ void Mifare1ksim(uint8_t flags, uint8_t exitAfterNReads, uint8_t arg2, uint8_t *
uint32_t nr = bytes_to_num(&receivedCmd[4], 4);
//Collect AR/NR
if(ar_nr_collected < 2 && cardAUTHSC == 2){
//if(ar_nr_collected < 2 && cardAUTHSC == 2){
if(ar_nr_collected < 2){
if(ar_nr_responses[2] != ar)
{// Avoid duplicates... probably not necessary, ar should vary.
ar_nr_responses[ar_nr_collected*4] = cuid;
@@ -2503,7 +2503,7 @@ void Mifare1ksim(uint8_t flags, uint8_t exitAfterNReads, uint8_t arg2, uint8_t *
if(flags & FLAG_INTERACTIVE && ar_nr_collected == 2)
{
finished = true;
}
}
}
// --- crypto

View File

@@ -335,7 +335,8 @@ void MifareUReadCard(uint8_t arg0, uint16_t arg1, uint8_t arg2, uint8_t *datain)
cmd_send(CMD_ACK, 1, countblocks, BigBuf_max_traceLen(),0 , 0);
FpgaWriteConfWord(FPGA_MAJOR_MODE_OFF);
LEDsoff();
BigBuf_free();
}
//-----------------------------------------------------------------------------