Android platform adaptation(dxl)

This commit is contained in:
dxl 2020-05-06 12:48:46 +02:00 committed by Philippe Teuwen
commit 4b41e36d49

View file

@ -11,7 +11,10 @@
#include <stdio.h> // for Mingw readline #include <stdio.h> // for Mingw readline
#include <ctype.h> // tolower #include <ctype.h> // tolower
#ifndef ANDROID
#include <readline/readline.h> #include <readline/readline.h>
#endif
#include "cmdparser.h" // command_t #include "cmdparser.h" // command_t
#include "comms.h" // clearCommandBuffer #include "comms.h" // clearCommandBuffer
@ -694,12 +697,19 @@ static int CmdLegicWrbl(const char *Cmd) {
PrintAndLogEx(NORMAL, "############# DANGER ################"); PrintAndLogEx(NORMAL, "############# DANGER ################");
PrintAndLogEx(NORMAL, "# changing the DCF is irreversible #"); PrintAndLogEx(NORMAL, "# changing the DCF is irreversible #");
PrintAndLogEx(NORMAL, "#####################################"); PrintAndLogEx(NORMAL, "#####################################");
#ifndef ANDROID
char *answer = readline("do you really want to continue? y(es) n(o) : "); char *answer = readline("do you really want to continue? y(es) n(o) : ");
bool overwrite = (answer[0] == 'y' || answer[0] == 'Y'); bool overwrite = (answer[0] == 'y' || answer[0] == 'Y');
if (!overwrite) { if (!overwrite) {
PrintAndLogEx(NORMAL, "command cancelled"); PrintAndLogEx(NORMAL, "command cancelled");
return PM3_EOPABORTED; return PM3_EOPABORTED;
} }
#else
PrintAndLogEx(NORMAL, "\n No interactive support on Android. ");
PrintAndLogEx(NORMAL, " So no confirmation asked, beware! ");
#endif
} }
legic_chk_iv(&IV); legic_chk_iv(&IV);