]> git.zerfleddert.de Git - proxmark3-svn/commitdiff
CHG: "hf mfu info" now always tries to read the NDEF CC. (was restricted to only...
authoriceman1001 <iceman@iuse.se>
Wed, 20 May 2015 08:36:55 +0000 (10:36 +0200)
committericeman1001 <iceman@iuse.se>
Wed, 20 May 2015 08:36:55 +0000 (10:36 +0200)
client/cmdhfmfu.c

index 69f2fe44c7c739dba37ee23a9a3c1d8b9080fcce..35e0d102d6c0454167ea50c65dd517e456d00fa3 100644 (file)
@@ -292,9 +292,9 @@ static int ul_print_default( uint8_t *data){
        return 0;
 }
 
-static int ntag_print_CC(uint8_t *data) {
+static int ndef_print_CC(uint8_t *data) {
 
-       PrintAndLog("\n--- NTAG NDEF Message");
+       PrintAndLog("\n--- NDEF Message");
        
        if(data[0] != 0xe1) {
                PrintAndLog("no NDEF message");
@@ -760,16 +760,12 @@ int CmdHF14AMfUInfo(const char *Cmd){
                }
                ulev1_print_version(version);
 
-               // if we called info with key, just return 
-               if ( hasAuthKey ) {
-                       ul_switch_off_field();
-                       return 1;
-               }
-               
+       
                // AUTHLIMIT, (number of failed authentications)
                // 0 = limitless.
-               // 1-7 = ...  should we even try then?          
-               if ( authlim == 0 ){
+               // 1-7 = limit. No automatic tries then.
+               // hasAuthKey,  if we was called with key, skip test.
+               if ( authlim == 0 && !hasAuthKey ){
                        PrintAndLog("\n--- Known EV1/NTAG passwords.");
                        len = 0;
                        for (uint8_t i = 0; i < KEYS_PWD_COUNT; ++i ){
@@ -790,17 +786,16 @@ int CmdHF14AMfUInfo(const char *Cmd){
                }
        }
        
-       if ((tagtype & (NTAG_213 | NTAG_215 | NTAG_216))){
-
-               uint8_t cc[16] = {0x00};
-               status = ul_read(3, cc, sizeof(cc));
-               if ( status == -1 ){
-                       PrintAndLog("Error: tag didn't answer to READ ntag");
-                       ul_switch_off_field();
-                       return status;
-               }
-               ntag_print_CC(cc);      
+       // NDEF Message
+       uint8_t cc[16] = {0x00};
+       status = ul_read(3, cc, sizeof(cc));
+       if ( status == -1 ){
+               PrintAndLog("Error: tag didn't answer to READ NDEF");
+               ul_switch_off_field();
+               return status;
        }
+       ndef_print_CC(cc);
+
        
        ul_switch_off_field();
        PrintAndLog("");
Impressum, Datenschutz