mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 13:53:55 -07:00
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:
parent
fd5c30f555
commit
844d732297
27 changed files with 90 additions and 126 deletions
|
@ -28,9 +28,7 @@ int mfDarkside(uint8_t blockno, uint8_t key_type, uint64_t *key) {
|
|||
SendCommandMIX(CMD_READER_MIFARE, arg0, blockno, key_type, NULL, 0);
|
||||
|
||||
//flush queue
|
||||
while (ukbhit()) {
|
||||
int gc = getchar();
|
||||
(void)gc;
|
||||
while (kbd_enter_pressed()) {
|
||||
return PM3_EOPABORTED;
|
||||
}
|
||||
|
||||
|
@ -38,9 +36,7 @@ int mfDarkside(uint8_t blockno, uint8_t key_type, uint64_t *key) {
|
|||
while (true) {
|
||||
printf(".");
|
||||
fflush(stdout);
|
||||
if (ukbhit()) {
|
||||
int gc = getchar();
|
||||
(void)gc;
|
||||
if (kbd_enter_pressed()) {
|
||||
return PM3_EOPABORTED;
|
||||
}
|
||||
|
||||
|
@ -955,9 +951,7 @@ int detect_classic_nackbug(bool verbose) {
|
|||
while (true) {
|
||||
printf(".");
|
||||
fflush(stdout);
|
||||
if (ukbhit()) {
|
||||
int gc = getchar();
|
||||
(void)gc;
|
||||
if (kbd_enter_pressed()) {
|
||||
return PM3_EOPABORTED;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue