mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-01-18 14:07:53 +08:00
Improved error detection and message if missing paramters for 'hf mf hardnested'
This commit is contained in:
parent
35e62e7d1f
commit
e1bc58692d
1 changed files with 13 additions and 0 deletions
|
@ -1261,6 +1261,12 @@ int CmdHF14AMfNestedHard(const char *Cmd) {
|
||||||
cmdp+=2;
|
cmdp+=2;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
if(param_getchar(Cmd, cmdp) == 0x00)
|
||||||
|
{
|
||||||
|
PrintAndLog("Block number is missing");
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
}
|
||||||
blockNo = param_get8(Cmd, cmdp);
|
blockNo = param_get8(Cmd, cmdp);
|
||||||
ctmp = param_getchar(Cmd, cmdp+1);
|
ctmp = param_getchar(Cmd, cmdp+1);
|
||||||
if (ctmp != 'a' && ctmp != 'A' && ctmp != 'b' && ctmp != 'B') {
|
if (ctmp != 'a' && ctmp != 'A' && ctmp != 'b' && ctmp != 'B') {
|
||||||
|
@ -1276,7 +1282,14 @@ int CmdHF14AMfNestedHard(const char *Cmd) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(param_getchar(Cmd, cmdp+3) == 0x00)
|
||||||
|
{
|
||||||
|
PrintAndLog("Target block number is missing");
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
}
|
||||||
trgBlockNo = param_get8(Cmd, cmdp+3);
|
trgBlockNo = param_get8(Cmd, cmdp+3);
|
||||||
|
|
||||||
ctmp = param_getchar(Cmd, cmdp+4);
|
ctmp = param_getchar(Cmd, cmdp+4);
|
||||||
if (ctmp != 'a' && ctmp != 'A' && ctmp != 'b' && ctmp != 'B') {
|
if (ctmp != 'a' && ctmp != 'A' && ctmp != 'b' && ctmp != 'B') {
|
||||||
PrintAndLog("Target key type must be A or B");
|
PrintAndLog("Target key type must be A or B");
|
||||||
|
|
Loading…
Reference in a new issue