fix: hf mf nested - now print correct blockno/keytype. Unified output to autopwn style

This commit is contained in:
iceman1001 2019-12-29 12:00:39 +01:00
commit f8876bf748

View file

@ -478,10 +478,10 @@ int mfnested(uint8_t blockNo, uint8_t keyType, uint8_t *key, uint8_t trgBlockNo,
free(statelists[1].head.slhead); free(statelists[1].head.slhead);
num_to_bytes(key64, 6, resultKey); num_to_bytes(key64, 6, resultKey);
PrintAndLogEx(SUCCESS, "target block:%3u key type: %c -- found valid key [ %012" PRIx64 " ]", PrintAndLogEx(SUCCESS, "target block:%3u key type: %c -- found valid key [ " _YELLOW_("%s") "]",
(uint16_t)resp.oldarg[2] & 0xff, package->block,
(resp.oldarg[2] >> 8) ? 'B' : 'A', package->keytype ? 'B' : 'A',
key64 sprint_hex(resultKey, 6)
); );
return -5; return -5;
} }
@ -489,8 +489,8 @@ int mfnested(uint8_t blockNo, uint8_t keyType, uint8_t *key, uint8_t trgBlockNo,
out: out:
PrintAndLogEx(SUCCESS, "target block:%3u key type: %c", PrintAndLogEx(SUCCESS, "target block:%3u key type: %c",
(uint16_t)resp.oldarg[2] & 0xff, package->block,
(resp.oldarg[2] >> 8) ? 'B' : 'A' package->keytype ? 'B' : 'A'
); );
free(statelists[0].head.slhead); free(statelists[0].head.slhead);
@ -498,6 +498,7 @@ out:
return -4; return -4;
} }
// MIFARE // MIFARE
int mfReadSector(uint8_t sectorNo, uint8_t keyType, uint8_t *key, uint8_t *data) { int mfReadSector(uint8_t sectorNo, uint8_t keyType, uint8_t *key, uint8_t *data) {