]> cvs.zerfleddert.de Git - proxmark3-svn/blobdiff - client/cmdhf14a.c
ADD: T55XX_WRITE_TIMEOUT to make sure all WaitForResponseTimeout for t55xx behaves...
[proxmark3-svn] / client / cmdhf14a.c
index 41528b8eee9190763d5ed19a02eedeac0032cb75..6411a919fe684f7632783e45374a20357296a56c 100644 (file)
@@ -143,7 +143,7 @@ int usage_hf_14a_sim(void) {
 //     PrintAndLog("    u     : 4, 7 or 10 byte UID");
        PrintAndLog("    u     : 4, 7 byte UID");
        PrintAndLog("    x     : (Optional) performs the 'reader attack', nr/ar attack against a legitimate reader");
-       PrintAndLog("    m     : (Optional) Show maths used for cracking reader. Useful for debugging.");
+       PrintAndLog("    v     : (Optional) show maths used for cracking reader. Useful for debugging.");
        PrintAndLog("\n   sample : hf 14a sim t 1 u 11223344 x");
        PrintAndLog("          : hf 14a sim t 1 u 11223344");
        PrintAndLog("          : hf 14a sim t 1 u 11223344556677");
@@ -216,16 +216,15 @@ int CmdHF14AReader(const char *Cmd) {
                        ul_switch_off_field();
                        
                        uint32_t tagT = GetHF14AMfU_Type();
-                       ul_print_type(tagT, 0);
+                       if (tagT != UL_ERROR)
+                               ul_print_type(tagT, 0);
 
                        // reconnect for further tests
                        c.arg[0] = ISO14A_CONNECT | ISO14A_NO_DISCONNECT;
                        c.arg[1] = 0;
                        c.arg[2] = 0;
-
                        clearCommandBuffer();
                        SendCommand(&c);
-
                        UsbCommand resp;
                        WaitForResponse(CMD_ACK, &resp);
                        
@@ -448,18 +447,13 @@ int CmdHF14ASim(const char *Cmd) {
        uint8_t uid[10] = {0,0,0,0,0,0,0,0,0,0};
        int uidlen = 0;
        bool useUIDfromEML = TRUE;
-       bool showMaths = false;
+       bool verbose = false;
 
        while(param_getchar(Cmd, cmdp) != 0x00) {
                switch(param_getchar(Cmd, cmdp)) {
                        case 'h':
                        case 'H':
                                return usage_hf_14a_sim();
-                       case 'm':
-                       case 'M':
-                               showMaths = true;
-                               cmdp++;
-                               break;
                        case 't':
                        case 'T':
                                // Retrieve the tag type
@@ -484,6 +478,11 @@ int CmdHF14ASim(const char *Cmd) {
                                }
                                cmdp += 2;
                                break;
+                       case 'v':
+                       case 'V':
+                               verbose = true;
+                               cmdp++;
+                               break;
                        case 'x':
                        case 'X':
                                flags |= FLAG_NR_AR_ATTACK;
@@ -520,7 +519,7 @@ int CmdHF14ASim(const char *Cmd) {
                if ( (resp.arg[0] & 0xffff) != CMD_SIMULATE_MIFARE_CARD ) break;
                        
                memcpy( data, resp.d.asBytes, sizeof(data) );
-               readerAttack(data, TRUE, showMaths);
+               readerAttack(data, TRUE, verbose);
        }
        return 0;
 }
Impressum, Datenschutz