From 81d18ebb89b5c3f9db0ca58be4258a457f3b550e Mon Sep 17 00:00:00 2001 From: merlokk <807634+merlokk@users.noreply.github.com> Date: Wed, 2 Feb 2022 17:17:19 +0200 Subject: [PATCH] add some info to create --- client/src/cipurse/cipursecore.c | 2 +- client/src/cipurse/cipursecore.h | 1 + client/src/cmdhfcipurse.c | 7 +++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/client/src/cipurse/cipursecore.c b/client/src/cipurse/cipursecore.c index 0ac11a4dc..0a068bd1c 100644 --- a/client/src/cipurse/cipursecore.c +++ b/client/src/cipurse/cipursecore.c @@ -330,7 +330,7 @@ void CIPURSEPrintInfoFile(uint8_t *data, size_t len) { CIPURSEPrintManufacturerInfo(data[8]); } -static void CIPURSEPrintFileDescriptor(uint8_t desc) { +void CIPURSEPrintFileDescriptor(uint8_t desc) { if (desc == 0x01) PrintAndLogEx(INFO, "Binary file"); else if (desc == 0x11) diff --git a/client/src/cipurse/cipursecore.h b/client/src/cipurse/cipursecore.h index 56740cf4e..ee002f135 100644 --- a/client/src/cipurse/cipursecore.h +++ b/client/src/cipurse/cipursecore.h @@ -61,5 +61,6 @@ bool CIPURSEChannelAuthenticate(uint8_t keyindex, uint8_t *key, bool verbose); void CIPURSECSetActChannelSecurityLevels(CipurseChannelSecurityLevel req, CipurseChannelSecurityLevel resp); void CIPURSEPrintFileAttr(uint8_t *attr, size_t len); +void CIPURSEPrintFileDescriptor(uint8_t desc); #endif /* __CIPURSECORE_H__ */ diff --git a/client/src/cmdhfcipurse.c b/client/src/cmdhfcipurse.c index 526040269..379b88b1e 100644 --- a/client/src/cmdhfcipurse.c +++ b/client/src/cmdhfcipurse.c @@ -1014,11 +1014,14 @@ static int CmdHFCipurseCreateDGI(const char *Cmd) { CLIParserFree(ctx); SetAPDULogging(APDULogging); - if (verbose && hdatalen > 1) { + if (verbose && hdatalen > 3) { if (hdata[0] == 0x92 && hdata[1] == 0x00) PrintAndLogEx(INFO, "DGI 9200 - ADF file attributes"); - if (hdata[0] == 0x92 && hdata[1] == 0x01) + if (hdata[0] == 0x92 && hdata[1] == 0x01) { PrintAndLogEx(INFO, "DGI 9201 - EF file attributes"); + PrintAndLogEx(INFO, "File type:"); + CIPURSEPrintFileDescriptor(hdata[3]); + } if (hdata[0] == 0xa0 && hdata[1] == 0x0f) PrintAndLogEx(INFO, "DGI a00f - All key values"); }