mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-08-23 06:25:28 -07:00
CHG: 'hf mf nested' - (merlokk) 76fcccd109
CHG: 'hf mf hardnested' added same verification also here.
This commit is contained in:
parent
0acc606be3
commit
83cd6a7761
1 changed files with 18 additions and 3 deletions
|
@ -825,12 +825,19 @@ int CmdHF14AMfNested(const char *Cmd) {
|
||||||
}
|
}
|
||||||
|
|
||||||
ctmp = param_getchar(Cmd, 4);
|
ctmp = param_getchar(Cmd, 4);
|
||||||
if (ctmp == 't' || ctmp == 'T') transferToEml = true;
|
transferToEml |= (ctmp == 't' || ctmp == 'T');
|
||||||
else if (ctmp == 'd' || ctmp == 'D') createDumpFile = true;
|
createDumpFile |= (ctmp == 'd' || ctmp == 'D');
|
||||||
|
|
||||||
ctmp = param_getchar(Cmd, 6);
|
ctmp = param_getchar(Cmd, 6);
|
||||||
transferToEml |= (ctmp == 't' || ctmp == 'T');
|
transferToEml |= (ctmp == 't' || ctmp == 'T');
|
||||||
transferToEml |= (ctmp == 'd' || ctmp == 'D');
|
createDumpFile |= (ctmp == 'd' || ctmp == 'D');
|
||||||
|
|
||||||
|
// check if we can authenticate to sector
|
||||||
|
res = mfCheckKeys(blockNo, keyType, true, 1, key, &key64);
|
||||||
|
if (res) {
|
||||||
|
PrintAndLog("Key is wrong. Can't authenticate to block:%3d key type:%c", blockNo, keyType ? 'B' : 'A');
|
||||||
|
return 3;
|
||||||
|
}
|
||||||
|
|
||||||
if (cmdp == 'o') {
|
if (cmdp == 'o') {
|
||||||
int16_t isOK = mfnested(blockNo, keyType, key, trgBlockNo, trgKeyType, keyBlock, true);
|
int16_t isOK = mfnested(blockNo, keyType, key, trgBlockNo, trgKeyType, keyBlock, true);
|
||||||
|
@ -1091,6 +1098,14 @@ int CmdHF14AMfNestedHard(const char *Cmd) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint64_t key64 = 0;
|
||||||
|
// check if we can authenticate to sector
|
||||||
|
int res = mfCheckKeys(blockNo, keyType, true, 1, key, &key64);
|
||||||
|
if (res) {
|
||||||
|
PrintAndLog("Key is wrong. Can't authenticate to block:%3d key type:%c", blockNo, keyType ? 'B' : 'A');
|
||||||
|
return 3;
|
||||||
|
}
|
||||||
|
|
||||||
PrintAndLog("--target block no:%3d, target key type:%c, known target key: 0x%02x%02x%02x%02x%02x%02x%s, file action: %s, Slow: %s, Tests: %d ",
|
PrintAndLog("--target block no:%3d, target key type:%c, known target key: 0x%02x%02x%02x%02x%02x%02x%s, file action: %s, Slow: %s, Tests: %d ",
|
||||||
trgBlockNo,
|
trgBlockNo,
|
||||||
trgKeyType?'B':'A',
|
trgKeyType?'B':'A',
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue