mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-19 21:03:48 -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);
|
CLIParserFree(ctx);
|
||||||
|
|
||||||
// sanity checks
|
// sanity checks
|
||||||
if ((scan + unaddressed + uidlen) > 1) {
|
if ((scan + unaddressed + (uidlen > 0)) > 1) {
|
||||||
PrintAndLogEx(WARNING, "Select only one option /scan/unaddress/uid");
|
PrintAndLogEx(WARNING, "Select only one option /scan/unaddress/uid");
|
||||||
return PM3_EINVARG;
|
return PM3_EINVARG;
|
||||||
}
|
}
|
||||||
|
@ -1755,8 +1755,7 @@ static int CmdHF15Dump(const char *Cmd) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// default fallback to scan for tag.
|
// default fallback to scan for tag.
|
||||||
// overriding unaddress parameter :)
|
if (uidlen != HF15_UID_LENGTH && !unaddressed) {
|
||||||
if (uidlen != HF15_UID_LENGTH) {
|
|
||||||
scan = true;
|
scan = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue