mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-24 07:05:40 -07:00
print holder info
This commit is contained in:
parent
bea7856c3e
commit
9bf80a5017
1 changed files with 7 additions and 2 deletions
|
@ -1543,6 +1543,7 @@ static int CmdHF14aDesDetect(const char *Cmd) {
|
||||||
|
|
||||||
// https://www.nxp.com/docs/en/application-note/AN10787.pdf
|
// https://www.nxp.com/docs/en/application-note/AN10787.pdf
|
||||||
// MIFARE Application Directory (MAD)
|
// MIFARE Application Directory (MAD)
|
||||||
|
// test cardholder data 0a53616d706c656d616e00475068696c697000826d00d054656c2b312f313233342f3536373800
|
||||||
static int CmdHF14aDesMAD(const char *Cmd) {
|
static int CmdHF14aDesMAD(const char *Cmd) {
|
||||||
CLIParserContext *ctx;
|
CLIParserContext *ctx;
|
||||||
CLIParserInit(&ctx, "hf mfdes mad",
|
CLIParserInit(&ctx, "hf mfdes mad",
|
||||||
|
@ -1634,13 +1635,17 @@ static int CmdHF14aDesMAD(const char *Cmd) {
|
||||||
uint8_t data[250] = {0};
|
uint8_t data[250] = {0};
|
||||||
size_t datalen = 0;
|
size_t datalen = 0;
|
||||||
|
|
||||||
res = DesfireReadFile(&dctx, 02, 0x000000, 0, data, &datalen);
|
res = DesfireReadFile(&dctx, 01, 0x000000, 0, data, &datalen);
|
||||||
if (res != PM3_SUCCESS) {
|
if (res != PM3_SUCCESS) {
|
||||||
PrintAndLogEx(SUCCESS, "Card Holder : " _RED_("n/a"));
|
PrintAndLogEx(SUCCESS, "Card Holder : " _RED_("n/a"));
|
||||||
} else {
|
} else {
|
||||||
if (datalen > 0) {
|
if (datalen > 0) {
|
||||||
PrintAndLogEx(SUCCESS, "Card Holder : ");
|
PrintAndLogEx(SUCCESS, "Card Holder : ");
|
||||||
print_buffer_with_offset(data, datalen, 0, true);
|
if (verbose) {
|
||||||
|
print_buffer_with_offset(data, datalen, 0, true);
|
||||||
|
PrintAndLogEx(NORMAL, "");
|
||||||
|
}
|
||||||
|
MADCardHolderInfoDecode(data, datalen, verbose);
|
||||||
PrintAndLogEx(NORMAL, "");
|
PrintAndLogEx(NORMAL, "");
|
||||||
} else {
|
} else {
|
||||||
PrintAndLogEx(SUCCESS, "Card Holder : " _YELLOW_("none"));
|
PrintAndLogEx(SUCCESS, "Card Holder : " _YELLOW_("none"));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue