chg: 'hf mf nack' - trying a different output

This commit is contained in:
iceman1001 2017-12-10 20:29:59 +01:00
commit b0f84f1391

View file

@ -813,11 +813,17 @@ int detect_classic_nackbug(bool verbose){
printf("Press pm3-button on the proxmark3 device to abort both proxmark3 and client.\n"); printf("Press pm3-button on the proxmark3 device to abort both proxmark3 and client.\n");
// for nice animation // for nice animation
//bool stdinOnPipe = !isatty(STDIN_FILENO) bool term = !isatty(STDIN_FILENO);
char star[] = {'-', '\\', '|', '/'};
uint8_t staridx = 0;
while (true) { while (true) {
if (term) {
printf("."); printf(".");
} else {
printf("\e[s%c\e[u", star[ (staridx++ % 4) ]);
}
fflush(stdout); fflush(stdout);
if (ukbhit()) { if (ukbhit()) {
int gc = getchar(); (void)gc; int gc = getchar(); (void)gc;
@ -825,7 +831,7 @@ int detect_classic_nackbug(bool verbose){
break; break;
} }
if (WaitForResponseTimeout(CMD_ACK, &resp, 2000)) { if (WaitForResponseTimeout(CMD_ACK, &resp, 500)) {
int32_t ok = resp.arg[0]; int32_t ok = resp.arg[0];
uint32_t nacks = resp.arg[1]; uint32_t nacks = resp.arg[1];
uint32_t auths = resp.arg[2]; uint32_t auths = resp.arg[2];