mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-07-16 10:03:04 -07:00
cmdhf15: dump: fix arg parsing/sanitization
This commit is contained in:
parent
7f666d445c
commit
524a439d6e
1 changed files with 2 additions and 3 deletions
|
@ -1744,7 +1744,7 @@ static int CmdHF15Dump(const char *Cmd) {
|
|||
CLIParserFree(ctx);
|
||||
|
||||
// sanity checks
|
||||
if ((scan + unaddressed + uidlen) > 1) {
|
||||
if ((scan + unaddressed + (uidlen > 0)) > 1) {
|
||||
PrintAndLogEx(WARNING, "Select only one option /scan/unaddress/uid");
|
||||
return PM3_EINVARG;
|
||||
}
|
||||
|
@ -1755,8 +1755,7 @@ static int CmdHF15Dump(const char *Cmd) {
|
|||
}
|
||||
|
||||
// default fallback to scan for tag.
|
||||
// overriding unaddress parameter :)
|
||||
if (uidlen != HF15_UID_LENGTH) {
|
||||
if (uidlen != HF15_UID_LENGTH && !unaddressed) {
|
||||
scan = true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue