mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2026-05-12 11:18:11 -07:00
Preserve default flow
This commit is contained in:
@@ -1473,7 +1473,7 @@ static int CmdHF15Sim(const char *Cmd) {
|
||||
arg_param_begin,
|
||||
arg_str0("u", "uid", "<hex>", "UID, 8 hex bytes"),
|
||||
arg_int0("b", "blocksize", "<dec>", "block size (def 4)"),
|
||||
arg_int0("t", "timeout", "<dec>", "timeout in ms (0 will run until button press - def 0)"),
|
||||
arg_int0("t", "timeout", "<dec>", "timeout in ms (def -1, ie. until button press)"),
|
||||
arg_param_end
|
||||
};
|
||||
CLIExecWithReturn(ctx, Cmd, argtable, true);
|
||||
@@ -1487,7 +1487,7 @@ static int CmdHF15Sim(const char *Cmd) {
|
||||
int uidlen = 0;
|
||||
CLIGetHexWithReturn(ctx, 1, payload.uid, &uidlen);
|
||||
payload.block_size = arg_get_int_def(ctx, 2, 4);
|
||||
size_t timeout = arg_get_int_def(ctx, 3, 0);
|
||||
size_t timeout = arg_get_int_def(ctx, 3, -1);
|
||||
CLIParserFree(ctx);
|
||||
|
||||
// sanity checks
|
||||
@@ -1496,10 +1496,6 @@ static int CmdHF15Sim(const char *Cmd) {
|
||||
return PM3_EINVARG;
|
||||
}
|
||||
|
||||
if (timeout == 0) {
|
||||
timeout = -1;
|
||||
}
|
||||
|
||||
PacketResponseNG resp;
|
||||
|
||||
// get UID from emulator for printing
|
||||
@@ -1532,7 +1528,7 @@ static int CmdHF15Sim(const char *Cmd) {
|
||||
clearCommandBuffer();
|
||||
SendCommandNG(CMD_HF_ISO15693_SIMULATE, (uint8_t *)&payload, sizeof(payload));
|
||||
WaitForResponseTimeout(CMD_HF_ISO15693_SIMULATE, &resp, timeout);
|
||||
if (timeout != -1) {
|
||||
if (timeout != (size_t) - 1) {
|
||||
SendCommandNG(CMD_BREAK_LOOP, NULL, 0);
|
||||
}
|
||||
PrintAndLogEx(INFO, "Done!");
|
||||
|
||||
Reference in New Issue
Block a user