]> git.zerfleddert.de Git - proxmark3-svn/commitdiff
Merge branch 'master' of https://github.com/Proxmark/proxmark3
authoriceman1001 <iceman@iuse.se>
Mon, 16 Feb 2015 17:59:44 +0000 (18:59 +0100)
committericeman1001 <iceman@iuse.se>
Mon, 16 Feb 2015 17:59:44 +0000 (18:59 +0100)
Conflicts:
armsrc/iclass.c

1  2 
armsrc/appmain.c
armsrc/iclass.c
armsrc/lfops.c
include/usb_cmd.h

index f19840b8e13edfd9b6df80ceaa06cff2023b803d,3da34777e441cea54f7aa1f6bf187b61909a6f55..f1edc3aa2dec2ab2420e81c38776d098e958d070
@@@ -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 67130804910a13428772e31189182d3874d1c7af,2a0ba0d2f8d7559017991132ff5e808090bd656d..816cb904108adb8eab227155d63bb78b1abf4f41
@@@ -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 fabede413db7e891cd01f37562c70cb39ec34b02,e34eab35f5bc813f8201b699967db819ed9da556..16e46c8b49abd751ada81f296b6921a590c60eef
@@@ -1286,9 -1297,9 +1286,10 @@@ void CopyIndala224toT55x7(int uid1, in
  #define max(x,y) ( x<y ? y:x)
  
  int DemodPCF7931(uint8_t **outBlocks) {
--    uint8_t BitStream[256];
--    uint8_t Blocks[8][16];
--    uint8_t *GraphBuffer = BigBuf_get_addr();
++
++    uint8_t BitStream[256] = {0x00};
++      uint8_t Blocks[8][16] = [0x00};
++    uint8_t *dest = BigBuf_get_addr();
      int GraphTraceLen = BigBuf_max_traceLen();
      int i, j, lastval, bitidx, half_switch;
      int clock = 64;
      uint8_t dir;
  
        LFSetupFPGAForADC(95, true);
--      DoAcquisition_default(0, 0);
--
++      DoAcquisition_default(0, true);
  
      lmin = 64;
      lmax = 192;
      i = 2;
  
      /* Find first local max/min */
--    if(GraphBuffer[1] > 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++;
          }
      }
      else {
          while(i < GraphTraceLen) {
--            if( !(GraphBuffer[i] < GraphBuffer[i-1]) && GraphBuffer[i] < lmin)
++            if( !(dest[i] < dest[i-1]) && v[i] < lmin)
                  break;
              i++;
          }
  
      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;
              }
              if(i < GraphTraceLen)
              {
--                if (GraphBuffer[i-1] > GraphBuffer[i]) dir=0;
++                if (dest[i-1] > dest[i]) dir=0;
                  else dir = 1;
              }
          }
index 295f0ebf1da7f0fef4dcb8954a0f207deafa66bf,d9a950aefe8a9533f10355bb79cd5990bcf0077e..ec162b4e907c6935384da1b04151cd09b9344620
@@@ -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
Impressum, Datenschutz