trying to extract ndef data from dumps by looking at MAD

This commit is contained in:
iceman1001 committed 2023-05-05 22:26:44 +02:00
1 parent cb0a447600
commit 27576be5c2
5 files changed
+77 -22

No files matched your search

+9 -2
View File
@@ -118,8 +118,15 @@ static int CmdNfcDecode(const char *Cmd) {
PrintAndLogEx(SUCCESS, "MFC dump file detected. Converting...");
uint8_t ndef[4096] = {0};
uint16_t ndeflen = 0;
uint8_t skip = (4 * MFBLOCK_SIZE);
convert_mfc_2_arr(dump + skip, bytes_read - skip, ndef, &ndeflen);
// uint8_t skip = (4 * MFBLOCK_SIZE);
// convert_mfc_2_arr(dump + skip, bytes_read - skip, ndef, &ndeflen);
if (convert_mad_to_arr(dump, bytes_read, ndef, &ndeflen) != PM3_SUCCESS) {
PrintAndLogEx(FAILED, "Failed converting, aborting...");
free(dump);
return PM3_ESOFT;
}
memcpy(dump, ndef, ndeflen);
bytes_read = ndeflen;
}