Added option to wait for a card to hf 14a reader

This commit is contained in:
Philippe Teuwen committed 2024-10-13 22:55:41 +02:00
1 parent a11ba61b01
commit 8cddd4e9c9
2 files changed
+7 -1

No files matched your search

+6 -1
View File
@@ -558,6 +558,7 @@ static int CmdHF14AReader(const char *Cmd) {
arg_lit0(NULL, "ecp", "Use enhanced contactless polling"),
arg_lit0(NULL, "mag", "Use Apple magsafe polling"),
arg_lit0("@", NULL, "continuous reader mode"),
arg_lit0("w", "wait", "wait for card"),
arg_param_end
};
CLIExecWithReturn(ctx, Cmd, argtable, true);
@@ -589,8 +590,10 @@ static int CmdHF14AReader(const char *Cmd) {
}
bool continuous = arg_get_lit(ctx, 7);
bool wait = arg_get_lit(ctx, 8);
CLIParserFree(ctx);
bool found = false;
if (disconnectAfter == false) {
cm |= ISO14A_NO_DISCONNECT;
}
@@ -628,6 +631,8 @@ static int CmdHF14AReader(const char *Cmd) {
*/
uint64_t select_status = resp.oldarg[0];
found = (select_status != 0);
if (select_status == 0) {
DropField();
res = PM3_ESOFT;
@@ -682,7 +687,7 @@ plot:
break;
}
} while (continuous);
} while (continuous || (wait && (!found)));
if (disconnectAfter == false) {
if (silent == false) {