From: iceman1001 Date: Mon, 16 Feb 2015 17:59:44 +0000 (+0100) Subject: Merge branch 'master' of https://github.com/Proxmark/proxmark3 X-Git-Url: http://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/commitdiff_plain/d716ca2fc1062c3c7f67cb52b0799df32adf6b0d Merge branch 'master' of https://github.com/Proxmark/proxmark3 Conflicts: armsrc/iclass.c --- d716ca2fc1062c3c7f67cb52b0799df32adf6b0d diff --cc armsrc/appmain.c index f19840b8,3da34777..f1edc3aa --- a/armsrc/appmain.c +++ b/armsrc/appmain.c @@@ -900,8 -898,11 +900,11 @@@ void UsbPacketReceived(uint8_t *packet ReaderIClass(c->arg[0]); break; case CMD_READER_ICLASS_REPLAY: - ReaderIClass_Replay(c->arg[0], c->d.asBytes); + ReaderIClass_Replay(c->arg[0], c->d.asBytes); break; + case CMD_ICLASS_EML_MEMSET: + emlSet(c->d.asBytes,c->arg[0], c->arg[1]); + break; #endif case CMD_SIMULATE_TAG_HF_LISTEN: diff --cc armsrc/iclass.c index 67130804,2a0ba0d2..816cb904 --- a/armsrc/iclass.c +++ b/armsrc/iclass.c @@@ -1706,8 -1704,8 +1706,8 @@@ void ReaderIClass_Replay(uint8_t arg0, //Set card_data to all zeroes, we'll fill it with data memset(card_data,0x0,USB_CMD_DATA_SIZE); uint8_t failedRead =0; - uint8_t stored_data_length =0; + uint32_t stored_data_length =0; - //then loop around remaining blocks + //then loop around remaining blocks for(int block=0; block < cardsize; block++){ read[1]= block; diff --cc armsrc/lfops.c index fabede41,e34eab35..16e46c8b --- a/armsrc/lfops.c +++ b/armsrc/lfops.c @@@ -1286,9 -1297,9 +1286,10 @@@ void CopyIndala224toT55x7(int uid1, in #define max(x,y) ( x GraphBuffer[0]) { ++ if(dest[1] > dest[0]) { while(i < GraphTraceLen) { -- if( !(GraphBuffer[i] > GraphBuffer[i-1]) && GraphBuffer[i] > lmax) ++ if( !(dest[i] > dest[i-1]) && dest[i] > lmax) break; i++; } @@@ -1319,7 -1330,7 +1319,7 @@@ } else { while(i < GraphTraceLen) { -- if( !(GraphBuffer[i] < GraphBuffer[i-1]) && GraphBuffer[i] < lmin) ++ if( !(dest[i] < dest[i-1]) && v[i] < lmin) break; i++; } @@@ -1333,7 -1344,7 +1333,7 @@@ for (bitidx = 0; i < GraphTraceLen; i++) { -- if ( (GraphBuffer[i-1] > GraphBuffer[i] && dir == 1 && GraphBuffer[i] > lmax) || (GraphBuffer[i-1] < GraphBuffer[i] && dir == 0 && GraphBuffer[i] < lmin)) ++ if ( (dest[i-1] > dest[i] && dir == 1 && dest[i] > lmax) || (dest[i-1] < dest[i] && dir == 0 && dest[i] < lmin)) { lc = i - lastval; lastval = i; @@@ -1400,7 -1411,7 +1400,7 @@@ } if(i < GraphTraceLen) { -- if (GraphBuffer[i-1] > GraphBuffer[i]) dir=0; ++ if (dest[i-1] > dest[i]) dir=0; else dir = 1; } } diff --cc include/usb_cmd.h index 295f0ebf,d9a950ae..ec162b4e --- a/include/usb_cmd.h +++ b/include/usb_cmd.h @@@ -130,8 -129,9 +130,9 @@@ typedef struct #define CMD_SNOOP_ICLASS 0x0392 #define CMD_SIMULATE_TAG_ICLASS 0x0393 #define CMD_READER_ICLASS 0x0394 -#define CMD_READER_ICLASS_REPLAY 0x0395 +#define CMD_READER_ICLASS_REPLAY 0x0395 #define CMD_ICLASS_ISO14443A_WRITE 0x0397 + #define CMD_ICLASS_EML_MEMSET 0x0398 // For measurements of the antenna tuning #define CMD_MEASURE_ANTENNA_TUNING 0x0400