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

This commit is contained in:
Philippe Teuwen 2024-10-13 21:40:17 +02:00
commit 8cddd4e9c9
2 changed files with 7 additions and 1 deletions

View file

@ -3,6 +3,7 @@ All notable changes to this project will be documented in this file.
This project uses the changelog in accordance with [keepchangelog](http://keepachangelog.com/). Please use this to write notable changes, which is not the same as git commit log...
## [unreleased][unreleased]
- Added option to wait for a card to `hf 14a reader` (@doegox)
- Added support for quick dump via backdoor auth to `hf mf ecfill` (@doegox)
- Fixed `hf mf restore` - really skip strict ACLs unless --force (@doegox)
- Added `hf 14b setuid` - set uid on magic 14b tag (@iceman1001)

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) {