This commit is contained in:
iceman1001 2024-11-02 15:14:55 +01:00
commit 3317175a82
2 changed files with 11 additions and 4 deletions

View file

@ -125,7 +125,7 @@ int infoThinFilm(bool verbose) {
SendCommandNG(CMD_HF_THINFILM_READ, NULL, 0); SendCommandNG(CMD_HF_THINFILM_READ, NULL, 0);
PacketResponseNG resp; PacketResponseNG resp;
if (!WaitForResponseTimeout(CMD_HF_THINFILM_READ, &resp, 1500)) { if (WaitForResponseTimeout(CMD_HF_THINFILM_READ, &resp, 1500) == false) {
PrintAndLogEx(WARNING, "timeout while waiting for reply."); PrintAndLogEx(WARNING, "timeout while waiting for reply.");
return PM3_ETIMEOUT; return PM3_ETIMEOUT;
} }
@ -186,9 +186,16 @@ int CmdHfThinFilmSim(const char *Cmd) {
int ret; int ret;
while (!(ret = kbd_enter_pressed())) { while (!(ret = kbd_enter_pressed())) {
if (WaitForResponseTimeout(CMD_HF_THINFILM_SIMULATE, &resp, 500) == 0) continue;
if (resp.status != PM3_SUCCESS) break; if (WaitForResponseTimeout(CMD_HF_THINFILM_SIMULATE, &resp, 500) == 0) {
continue;
} }
if (resp.status != PM3_SUCCESS) {
break;
}
}
if (ret) { if (ret) {
PrintAndLogEx(INFO, "Client side interrupted"); PrintAndLogEx(INFO, "Client side interrupted");
PrintAndLogEx(WARNING, "Simulation still running on Proxmark3 till next command or button press"); PrintAndLogEx(WARNING, "Simulation still running on Proxmark3 till next command or button press");