Fix MAD decoding for DESFire
This commit is contained in:
@@ -372,3 +372,13 @@ int MAD2DecodeAndPrint(uint8_t *sector, bool swapmad, bool verbose) {
|
||||
|
||||
return PM3_SUCCESS;
|
||||
}
|
||||
|
||||
int MADDFDecodeAndPrint(uint32_t short_aid) {
|
||||
open_mad_file(&mad_known_aids, false);
|
||||
|
||||
char fmt[50];
|
||||
sprintf(fmt, " MAD AID Function 0x%04X :" _YELLOW_("%s"), short_aid, "%s");
|
||||
print_aid_description(mad_known_aids, short_aid, fmt, false);
|
||||
close_mad_file(mad_known_aids);
|
||||
return PM3_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ int MADCheck(uint8_t *sector0, uint8_t *sector10, bool verbose, bool *haveMAD2);
|
||||
int MADDecode(uint8_t *sector0, uint8_t *sector10, uint16_t *mad, size_t *madlen, bool swapmad);
|
||||
int MAD1DecodeAndPrint(uint8_t *sector, bool swapmad, bool verbose, bool *haveMAD2);
|
||||
int MAD2DecodeAndPrint(uint8_t *sector, bool swapmad, bool verbose);
|
||||
int MADDFDecodeAndPrint(uint32_t short_aid);
|
||||
int MADCardHolderInfoDecode(uint8_t *data, size_t dataLen, bool verbose);
|
||||
|
||||
#endif // _MAD_H_
|
||||
|
||||
Reference in New Issue
Block a user