mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 05:43:48 -07:00
chg: hf 14a sim x - device simulation loop exited when client exits
This commit is contained in:
parent
051e008f11
commit
290c6f6c31
1 changed files with 10 additions and 1 deletions
|
@ -512,8 +512,9 @@ int CmdHF14ASim(const char *Cmd) {
|
||||||
PacketResponseNG resp;
|
PacketResponseNG resp;
|
||||||
|
|
||||||
PrintAndLogEx(SUCCESS, "press pm3-button to abort simulation");
|
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 (WaitForResponseTimeout(CMD_HF_MIFARE_SIMULATE, &resp, 1500) == 0) continue;
|
||||||
if (resp.status != PM3_SUCCESS) break;
|
if (resp.status != PM3_SUCCESS) break;
|
||||||
|
|
||||||
|
@ -521,7 +522,15 @@ int CmdHF14ASim(const char *Cmd) {
|
||||||
|
|
||||||
nonces_t *data = (nonces_t *)resp.data.asBytes;
|
nonces_t *data = (nonces_t *)resp.data.asBytes;
|
||||||
readerAttack(data[0], setEmulatorMem, verbose);
|
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))
|
if (resp.status == PM3_EOPABORTED && ((flags & FLAG_NR_AR_ATTACK) == FLAG_NR_AR_ATTACK))
|
||||||
showSectorTable();
|
showSectorTable();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue