mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2024-11-11 01:55:38 +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;
|
||||
break;
|
||||
default:
|
||||
if(param_getchar(Cmd, cmdp) == 0x00)
|
||||
{
|
||||
PrintAndLog("Block number is missing");
|
||||
return 1;
|
||||
|
||||
}
|
||||
blockNo = param_get8(Cmd, cmdp);
|
||||
ctmp = param_getchar(Cmd, cmdp+1);
|
||||
if (ctmp != 'a' && ctmp != 'A' && ctmp != 'b' && ctmp != 'B') {
|
||||
|
@ -1276,7 +1282,14 @@ int CmdHF14AMfNestedHard(const char *Cmd) {
|
|||
return 1;
|
||||
}
|
||||
|
||||
if(param_getchar(Cmd, cmdp+3) == 0x00)
|
||||
{
|
||||
PrintAndLog("Target block number is missing");
|
||||
return 1;
|
||||
|
||||
}
|
||||
trgBlockNo = param_get8(Cmd, cmdp+3);
|
||||
|
||||
ctmp = param_getchar(Cmd, cmdp+4);
|
||||
if (ctmp != 'a' && ctmp != 'A' && ctmp != 'b' && ctmp != 'B') {
|
||||
PrintAndLog("Target key type must be A or B");
|
||||
|
|
Loading…
Reference in a new issue