Replace ukbhit by kbd_enter_pressed, not requiring tcgetattr:
Note that it behaves differently now * it looks for Enter key only, not any key * it "eats" the input, no need for (void)getchar() after it * it works the same no matter the value of ICANON * the mingw version has been adapted to act the similarly This should fix its usage on Android where tcgetattr always returns -1
This commit is contained in:
@@ -914,9 +914,7 @@ static int smart_brute_sfi(bool decodeTLV) {
|
||||
|
||||
for (uint16_t rec = 1; rec <= 255; rec++) {
|
||||
|
||||
if (ukbhit()) {
|
||||
int gc = getchar();
|
||||
(void)gc;
|
||||
if (kbd_enter_pressed()) {
|
||||
PrintAndLogEx(WARNING, "\naborted via keyboard!\n");
|
||||
free(buf);
|
||||
return 1;
|
||||
|
||||
Reference in New Issue
Block a user