diff --git a/client/src/cmdhflist.c b/client/src/cmdhflist.c index 8d337214e..0cd6fec7f 100644 --- a/client/src/cmdhflist.c +++ b/client/src/cmdhflist.c @@ -1873,6 +1873,63 @@ void annotateSeos(char *exp, size_t size, uint8_t *cmd, uint8_t cmdsize, bool is snprintf(exp, size, "CREATE ADF"); return; } + + // + /* + 0A 00 00 D4 00 00 00 E4 E4 + 0A 00 7F FF 90 00 AF 29 + + */ + if (memcmp(cmd + pos, "\x00\xD4\x00\x00\0x00", 5) == 0) { + snprintf(exp, size, "Get remaining credits"); + return; + } + + /* + 0B 00 A0 10 00 00 00 C0 D8 + 0B 00 6F 00 88 70 + */ + if (memcmp(cmd + pos, "\xA0\x10\x00\x00\x00", 5) == 0) { + snprintf(exp, size, "Get applet info"); + return; + } + + if (memcmp(cmd + pos, "\xA0\xD3\x00\x00\x00", 5) == 0) { + snprintf(exp, size, "Get applet version"); + return; + } + + if (memcmp(cmd + pos, "\xA0\xDA\x04", 3) == 0) { + snprintf(exp, size, "Push engine id"); + return; + } + + if (memcmp(cmd + pos, "\xA0\xDA\x05", 3) == 0) { + snprintf(exp, size, "Push user name"); + return; + } + /* + 00 A4 04 00 0A SELECT ConfigCardProgrammer +00 D4 00 00 00 GetRemainingCredits -> 7FFF 9000 + +A0 DA 10 00 01 01 FinalPersonalize + +A0 DA 25 00 02 01 AA undocumented opcode 0x25 +A0 CA 00 00 00 GET DATA (returns SNMPv3 authPriv blob) + */ + + /* + |0A 00 6D 00 83 5F + */ + + // CLA 0x90 Proprietary class - DESFire's "ISO 7816 wrap of native commands" indicator. + // Tells the card "the next byte is a DESFire native opcode, not an ISO 7816 standard INS." + // INS 0x5A DESFire native opcode SelectApplication (3-byte AID). + + if (memcmp(cmd + pos, "\x90\x5A\x00\x00", 4) == 0) { + snprintf(exp, size, "(desfire) Selected AID " _CYAN_("%02X%02X%02X"), cmd[pos + 5], cmd[pos + 6], cmd[pos + 7]); + return; + } if (isResponse) {