emrtd: Add EF_CardAccess parsing to offline info

This commit is contained in:
Ave 2021-02-21 03:15:26 +03:00
commit 8904162d7a

View file

@ -1972,6 +1972,16 @@ int infoHF_EMRTD_offline(const char *path) {
uint8_t dg_hashes_calc[17][64] = { { 0 } }; uint8_t dg_hashes_calc[17][64] = { { 0 } };
int hash_algo = 0; int hash_algo = 0;
strcpy(filepath, path);
strncat(filepath, PATHSEP, 2);
strcat(filepath, dg_table[EF_CardAccess].filename);
if (loadFile_safeEx(filepath, ".BIN", (void **)&data, (size_t *)&datalen, false) == PM3_SUCCESS) {
emrtd_print_ef_cardaccess_info(data, datalen);
} else {
PrintAndLogEx(HINT, "The error above this is normal. It just means that your eMRTD lacks PACE.");
}
strcpy(filepath, path); strcpy(filepath, path);
strncat(filepath, PATHSEP, 2); strncat(filepath, PATHSEP, 2);
strcat(filepath, dg_table[EF_SOD].filename); strcat(filepath, dg_table[EF_SOD].filename);