fix appearance
authorOleg Moiseenko <olegmsn@gmail.com>
Sat, 10 Feb 2018 18:41:56 +0000 (20:41 +0200)
committerOleg Moiseenko <olegmsn@gmail.com>
Sat, 10 Feb 2018 18:41:56 +0000 (20:41 +0200)
client/cmdhf.c
client/cmdhflist.c

index 9f3ff4e4c44f3d937943aed355051b23f4da4aa4..00b1aa8d6824215c5bda462ba218062e17ae8ec6 100644 (file)
@@ -434,10 +434,12 @@ uint16_t printTraceLine(uint16_t tracepos, uint16_t traceLen, uint8_t *trace, ui
        }
        
        if (DecodeMifareData(frame, data_len, isResponse, mfData, &mfDataLen)) {
        }
        
        if (DecodeMifareData(frame, data_len, isResponse, mfData, &mfDataLen)) {
-               PrintAndLog("            |            |     |%-64s | %s| %s",
+               annotateIso14443a(explanation, sizeof(explanation), mfData, mfDataLen);
+               
+               PrintAndLog("            |          * | dec |%-64s | %-4s| %s",
                        sprint_hex(mfData, mfDataLen),
                        "",
                        sprint_hex(mfData, mfDataLen),
                        "",
-                       (false) ? explanation : "");
+                       (true) ? explanation : "");
        };
 
        if (is_last_record(tracepos, trace, traceLen)) return traceLen;
        };
 
        if (is_last_record(tracepos, trace, traceLen)) return traceLen;
index 0eaafa68e6e377db5bfa0d1a023cdd6699ace365..3dd0397080079730110a838107706522758c04a0 100644 (file)
@@ -268,15 +268,15 @@ bool DecodeMifareData(uint8_t *cmd, uint8_t cmdsize, bool isResponse, uint8_t *m
                        crypto1_get_lfsr(revstate, &lfsr);
                        crypto1_destroy(revstate);
 //                     LastKey = lfsr;
                        crypto1_get_lfsr(revstate, &lfsr);
                        crypto1_destroy(revstate);
 //                     LastKey = lfsr;
-                       printf("uid:%x nt:%x ar_enc:%x at_enc:%x\n", AuthData.uid, AuthData.nt, AuthData.ar_enc, AuthData.at_enc);
-                       printf("AUTH: probable key:%x%x Prng:%s ks2:%08x ks3:%08x\n", 
+                       PrintAndLog("            |          * | key | probable key:%x%x Prng:%s   ks2:%08x ks3:%08x |     |", 
                                (unsigned int)((lfsr & 0xFFFFFFFF00000000) >> 32), (unsigned int)(lfsr & 0xFFFFFFFF), 
                                (unsigned int)((lfsr & 0xFFFFFFFF00000000) >> 32), (unsigned int)(lfsr & 0xFFFFFFFF), 
-                               validate_prng_nonce(AuthData.nt) ? "WEAK": "HARDEND",
+                               validate_prng_nonce(AuthData.nt) ? "WEAK": "HARD",
                                ks2,
                                ks3);
                        
                        AuthData.first_auth = false;
                } else {
                                ks2,
                                ks3);
                        
                        AuthData.first_auth = false;
                } else {
+                       printf("uid:%x nt:%x ar_enc:%x at_enc:%x\n", AuthData.uid, AuthData.nt, AuthData.ar_enc, AuthData.at_enc);
                }
                
                
                }
                
                
Impressum, Datenschutz