]> git.zerfleddert.de Git - proxmark3-svn/commitdiff
FIX: "hf legic write" - removed a warning message and made the overwrite question...
authoriceman1001 <iceman@iuse.se>
Fri, 14 Oct 2016 14:39:38 +0000 (16:39 +0200)
committericeman1001 <iceman@iuse.se>
Fri, 14 Oct 2016 14:39:38 +0000 (16:39 +0200)
client/cmdhflegic.c
client/cmdhflegic.h

index 0ddc7466cf0aeecce567f3305974ca311d142327..3cc6c4064487b40f56e51f9383c97876dec96511 100644 (file)
@@ -636,14 +636,13 @@ int CmdLegicRfWrite(const char *Cmd) {
                PrintAndLog("############# DANGER ################");
                PrintAndLog("# changing the DCF is irreversible  #");
                PrintAndLog("#####################################");
-               PrintAndLog("do you really want to continue? y(es) n(o)");              
-               char answer;
-               sscanf(" %c", &answer);
-               bool exit = !(answer == 'n' || answer == 'N');
-               if (exit)
+               char *answer = NULL;
+               answer = readline("do you really want to continue? y(es) n(o) : ");
+               bool overwrite = (answer[0] == 'y' || answer[0] == 'Y');
+               if (!overwrite){
+                       PrintAndLog("command cancelled");
                        return 0;
-               printf("ICE DCF:  %c answer, %d\n", answer, exit);
-               return 0;
+               }
        }
        
        legic_chk_iv(&IV);
index 62aee740ba2190ec12b36f8af977ebfa3ef7dd5d..db38b723d7076e9737b82299fb53e4852c7fb0fa 100644 (file)
@@ -38,6 +38,7 @@ int CmdLegicReader(const char *Cmd);
 int CmdLegicELoad(const char *Cmd);
 int CmdLegicESave(const char *Cmd);
 int CmdLegicList(const char *Cmd);
+int CmdLegicWipe(const char *Cmd);
 
 int HFLegicReader(const char *Cmd, bool verbose);
 int legic_print_type(uint32_t tagtype, uint8_t spaces);
Impressum, Datenschutz