mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2024-09-21 07:46:12 +08:00
chg: hf 14a sim x - device simulation loop exited when client exits
This commit is contained in:
parent
051e008f11
commit
290c6f6c31
|
@ -512,8 +512,9 @@ int CmdHF14ASim(const char *Cmd) {
|
|||
PacketResponseNG resp;
|
||||
|
||||
PrintAndLogEx(SUCCESS, "press pm3-button to abort simulation");
|
||||
bool keypress = kbd_enter_pressed();
|
||||
while (!keypress) {
|
||||
|
||||
while (!kbd_enter_pressed()) {
|
||||
if (WaitForResponseTimeout(CMD_HF_MIFARE_SIMULATE, &resp, 1500) == 0) continue;
|
||||
if (resp.status != PM3_SUCCESS) break;
|
||||
|
||||
|
@ -521,7 +522,15 @@ int CmdHF14ASim(const char *Cmd) {
|
|||
|
||||
nonces_t *data = (nonces_t *)resp.data.asBytes;
|
||||
readerAttack(data[0], setEmulatorMem, verbose);
|
||||
|
||||
keypress = kbd_enter_pressed();
|
||||
}
|
||||
|
||||
if (keypress && (flags & FLAG_NR_AR_ATTACK) == FLAG_NR_AR_ATTACK) {
|
||||
// inform device to break the sim loop since client has exited
|
||||
SendCommandNG(CMD_BREAK_LOOP, NULL, 0);
|
||||
}
|
||||
|
||||
if (resp.status == PM3_EOPABORTED && ((flags & FLAG_NR_AR_ATTACK) == FLAG_NR_AR_ATTACK))
|
||||
showSectorTable();
|
||||
|
||||
|
|
Loading…
Reference in a new issue