X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/1f247f6ac63295c54f5e8a95b2c39c6077d2d5ec..e585a58ed1ec3ed10b264e736e5e20eb7285a668:/client/cmdhflegic.c diff --git a/client/cmdhflegic.c b/client/cmdhflegic.c index 0ddc7466..3cc6c406 100644 --- a/client/cmdhflegic.c +++ b/client/cmdhflegic.c @@ -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);