FIX: "hf legic write" - removed a warning message and made the overwrite question working.

This commit is contained in:
iceman1001 2016-10-14 16:39:38 +02:00
commit 2a1a6aa382
2 changed files with 7 additions and 7 deletions

View 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);