Merge branch 'master' of github.com:merlokk/proxmark3 into 14a_rework3
authormerlokk <olegmsn@gmail.com>
Wed, 1 Nov 2017 15:13:27 +0000 (17:13 +0200)
committermerlokk <olegmsn@gmail.com>
Wed, 1 Nov 2017 15:13:27 +0000 (17:13 +0200)
1  2 
armsrc/iso14443a.c
client/cmdhf14a.c
client/cmdhf14a.h

index 860af2382b1e39a54efc8eae9d666fc438b20c01,06a83feb72693d4b252556059f708f3416083065..7d4840154d3d33ffdc223b7bce341a881a43851a
@@@ -1909,9 -1912,8 +1913,9 @@@ void ReaderIso14443a(UsbCommand *c
        size_t lenbits = c->arg[1] >> 16;
        uint32_t timeout = c->arg[2];
        uint32_t arg0 = 0;
-       byte_t buf[USB_CMD_DATA_SIZE];
+       byte_t buf[USB_CMD_DATA_SIZE] = {0};
        uint8_t par[MAX_PARITY_SIZE];
 +      bool cantSELECT = false;
    
        if(param & ISO14A_CONNECT) {
                clear_trace();
index 1a7f6970db214a2c39b5a640fa15e2de934532c1,3f103f5f0cb3d3f50e7d23ab4163b98a1a614926..f3189c108bd45ef06cd7a9be200f77b1fad3eefe
@@@ -872,10 -805,19 +945,19 @@@ static int waitCmd(uint8_t iSelect) 
  
      if (WaitForResponseTimeout(CMD_ACK,&resp,1500)) {
          recv = resp.d.asBytes;
-         uint8_t iLen = iSelect ? resp.arg[1] : resp.arg[0];
-         PrintAndLog("received %i octets", iLen);
+         uint8_t iLen = resp.arg[0];
+               if (iSelect){
+                       iLen = resp.arg[1];
+                       if (iLen){
+                               PrintAndLog("Card selected. UID[%i]:", iLen);
+                       } else {
+                               PrintAndLog("Can't select card.");
+                       }
+               } else {
+                       PrintAndLog("received %i bytes:", iLen);
+               }
          if(!iLen)
 -            return;
 +            return 1;
          hexout = (char *)malloc(iLen * 3 + 1);
          if (hexout != NULL) {
              for (int i = 0; i < iLen; i++) { // data in hex
Simple merge
Impressum, Datenschutz