mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 22:03:42 -07:00
Allow static encrypted nonces to be collected via trace
Signed-off-by: Nathan N <noproto@users.noreply.github.com>
This commit is contained in:
parent
f8db7b185d
commit
8b2040ec5e
1 changed files with 4 additions and 2 deletions
|
@ -1617,6 +1617,7 @@ static int CmdHF14AMfNested(const char *Cmd) { //TODO: single mode broken? can't
|
||||||
arg_lit0(NULL, "emu", "Fill simulator keys from found keys"),
|
arg_lit0(NULL, "emu", "Fill simulator keys from found keys"),
|
||||||
arg_lit0(NULL, "dump", "Dump found keys to file"),
|
arg_lit0(NULL, "dump", "Dump found keys to file"),
|
||||||
arg_lit0(NULL, "mem", "Use dictionary from flashmemory"),
|
arg_lit0(NULL, "mem", "Use dictionary from flashmemory"),
|
||||||
|
arg_lit0("i", NULL, "Ignore static encrypted nonces"),
|
||||||
arg_param_end
|
arg_param_end
|
||||||
};
|
};
|
||||||
CLIExecWithReturn(ctx, Cmd, argtable, false);
|
CLIExecWithReturn(ctx, Cmd, argtable, false);
|
||||||
|
@ -1658,6 +1659,7 @@ static int CmdHF14AMfNested(const char *Cmd) { //TODO: single mode broken? can't
|
||||||
bool createDumpFile = arg_get_lit(ctx, 13);
|
bool createDumpFile = arg_get_lit(ctx, 13);
|
||||||
bool singleSector = trgBlockNo > -1;
|
bool singleSector = trgBlockNo > -1;
|
||||||
bool use_flashmemory = arg_get_lit(ctx, 14);
|
bool use_flashmemory = arg_get_lit(ctx, 14);
|
||||||
|
bool ignore_static_encrypted = arg_get_lit(ctx, 15);
|
||||||
|
|
||||||
CLIParserFree(ctx);
|
CLIParserFree(ctx);
|
||||||
|
|
||||||
|
@ -1728,7 +1730,7 @@ static int CmdHF14AMfNested(const char *Cmd) { //TODO: single mode broken? can't
|
||||||
}
|
}
|
||||||
|
|
||||||
if (singleSector) {
|
if (singleSector) {
|
||||||
int16_t isOK = mfnested(blockNo, keyType, key, trgBlockNo, trgKeyType, keyBlock, true);
|
int16_t isOK = mfnested(blockNo, keyType, key, trgBlockNo, trgKeyType, keyBlock, !ignore_static_encrypted);
|
||||||
switch (isOK) {
|
switch (isOK) {
|
||||||
case PM3_ETIMEOUT:
|
case PM3_ETIMEOUT:
|
||||||
PrintAndLogEx(ERR, "Command execute timeout\n");
|
PrintAndLogEx(ERR, "Command execute timeout\n");
|
||||||
|
@ -1803,7 +1805,7 @@ static int CmdHF14AMfNested(const char *Cmd) { //TODO: single mode broken? can't
|
||||||
PrintAndLogEx(SUCCESS, "enter nested key recovery");
|
PrintAndLogEx(SUCCESS, "enter nested key recovery");
|
||||||
|
|
||||||
// nested sectors
|
// nested sectors
|
||||||
bool calibrate = true;
|
bool calibrate = !ignore_static_encrypted;
|
||||||
|
|
||||||
for (trgKeyType = MF_KEY_A; trgKeyType <= MF_KEY_B; ++trgKeyType) {
|
for (trgKeyType = MF_KEY_A; trgKeyType <= MF_KEY_B; ++trgKeyType) {
|
||||||
for (uint8_t sectorNo = 0; sectorNo < SectorsCnt; ++sectorNo) {
|
for (uint8_t sectorNo = 0; sectorNo < SectorsCnt; ++sectorNo) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue