diff --git a/client/src/cmdhfmfdes.c b/client/src/cmdhfmfdes.c index 220a22d78..b13989119 100644 --- a/client/src/cmdhfmfdes.c +++ b/client/src/cmdhfmfdes.c @@ -3154,7 +3154,7 @@ static int CmdHF14ADesGetKeyVersions(const char *Cmd) { arg_str0(NULL, "keynum", "", "Key number/count (1 hex byte). (def: 0x00)"), arg_str0(NULL, "keyset", "", "Keyset number (1 hex byte)"), arg_lit0(NULL, "no-auth", "Execute without authentication"), - + arg_param_end }; CLIExecWithReturn(ctx, Cmd, argtable, true); @@ -3199,7 +3199,7 @@ static int CmdHF14ADesGetKeyVersions(const char *Cmd) { DropField(); PrintAndLogEx(FAILED, "Select or authentication %s " _RED_("failed") ". Result [%d] %s", DesfireWayIDStr(selectway, id), res, DesfireAuthErrorToStr(res)); return res; - } + } uint8_t buf[APDU_RES_LEN] = {0}; size_t buflen = 0; @@ -3509,7 +3509,7 @@ static int CmdHF14ADesGetFileIDs(const char *Cmd) { PrintAndLogEx(FAILED, "Select or authentication %s " _RED_("failed") ". Result [%d] %s", DesfireWayIDStr(selectway, id), res, DesfireAuthErrorToStr(res)); return res; } - + uint8_t buf[APDU_RES_LEN] = {0}; size_t buflen = 0; @@ -4235,7 +4235,7 @@ static int CmdHF14ADesCreateRecordFile(const char *Cmd) { DesfireContext_t dctx; int securechann = defaultSecureChannel; uint32_t appid = 0x000000; - int res = CmdDesGetSessionParameters(ctx, &dctx, 3, 4, 5, 6, 7, 8, 9, 10, 11, 0, 0,&securechann, DCMMACed, &appid, NULL); + int res = CmdDesGetSessionParameters(ctx, &dctx, 3, 4, 5, 6, 7, 8, 9, 10, 11, 0, 0, &securechann, DCMMACed, &appid, NULL); if (res) { CLIParserFree(ctx); return res; @@ -4460,7 +4460,7 @@ static int CmdHF14ADesDeleteFile(const char *Cmd) { int securechann = defaultSecureChannel; uint32_t id = 0x000000; DesfireISOSelectWay selectway = ISW6bAID; - int res = CmdDesGetSessionParameters(ctx, &dctx, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 0,&securechann, DCMMACed, &id, &selectway); + int res = CmdDesGetSessionParameters(ctx, &dctx, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 0, &securechann, DCMMACed, &id, &selectway); if (res) { CLIParserFree(ctx); return res; diff --git a/client/src/cmdlfhitag.c b/client/src/cmdlfhitag.c index e75cd0804..dddad1bab 100644 --- a/client/src/cmdlfhitag.c +++ b/client/src/cmdlfhitag.c @@ -2428,8 +2428,8 @@ int ht2_read_uid(void) { return PM3_ESOFT; } - PrintAndLogEx(SUCCESS, "UID.... " _GREEN_("%08X"), uid); - PrintAndLogEx(SUCCESS, "TYPE... " _GREEN_("%s"), getHitagTypeStr(uid)); + PrintAndLogEx(SUCCESS, "UID....... " _GREEN_("%08X"), uid); + PrintAndLogEx(SUCCESS, "TYPE...... " _GREEN_("%s"), getHitagTypeStr(uid)); return PM3_SUCCESS; } diff --git a/client/src/cmdlfhitaghts.c b/client/src/cmdlfhitaghts.c index 8af7dc998..de6efcae3 100644 --- a/client/src/cmdlfhitaghts.c +++ b/client/src/cmdlfhitaghts.c @@ -182,8 +182,8 @@ int read_hts_uid(void) { return PM3_ESOFT; } - PrintAndLogEx(SUCCESS, "UID.... " _GREEN_("%08X"), uid); - PrintAndLogEx(SUCCESS, "TYPE... " _GREEN_("%s"), hts_get_type_str(uid)); + PrintAndLogEx(SUCCESS, "UID....... " _GREEN_("%08X"), uid); + PrintAndLogEx(SUCCESS, "TYPE...... " _GREEN_("%s"), hts_get_type_str(uid)); return PM3_SUCCESS; } diff --git a/client/src/cmdlfhitagu.c b/client/src/cmdlfhitagu.c index 9a561651c..59e72aebe 100644 --- a/client/src/cmdlfhitagu.c +++ b/client/src/cmdlfhitagu.c @@ -197,8 +197,8 @@ int read_htu_uid(void) { return PM3_ESOFT; } - PrintAndLogEx(SUCCESS, "UID.... " _GREEN_("%012llX"), uid); - // PrintAndLogEx(SUCCESS, "TYPE... " _GREEN_("%s"), htu_get_type_str(uid)); + PrintAndLogEx(SUCCESS, "UID....... " _GREEN_("%012llX"), uid); + // PrintAndLogEx(SUCCESS, "TYPE...... " _GREEN_("%s"), htu_get_type_str(uid)); return PM3_SUCCESS; } diff --git a/client/src/cmdlfpyramid.c b/client/src/cmdlfpyramid.c index e763c68e3..e29453263 100644 --- a/client/src/cmdlfpyramid.c +++ b/client/src/cmdlfpyramid.c @@ -498,25 +498,28 @@ int getPyramidBits(uint32_t fc, uint32_t cn, uint8_t *pyramidBits) { // FSK Demod then try to locate a Farpointe Data (pyramid) ID int detectPyramid(uint8_t *dest, size_t *size, int *waveStartIdx) { - //make sure buffer has data + // make sure buffer has data if (*size < 128 * 50) return -1; - //test samples are not just noise + // test samples are not just noise if (getSignalProperties()->isnoise) return -2; // FSK demodulator RF/50 FSK 10,8 *size = fskdemod(dest, *size, 50, 1, 10, 8, waveStartIdx); // pyramid fsk2 - //did we get a good demod? + // did we get a good demod? if (*size < 128) return -3; size_t startIdx = 0; uint8_t preamble[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1}; - if (!preambleSearch(dest, preamble, sizeof(preamble), size, &startIdx)) - return -4; //preamble not found + if (!preambleSearch(dest, preamble, sizeof(preamble), size, &startIdx)) { + return -4; // preamble not found + } // wrong size? (between to preambles) - if (*size < 128) return -5; + if (*size < 128) { + return -5; + } return (int)startIdx; } diff --git a/client/src/mifare/desfirecore.c b/client/src/mifare/desfirecore.c index 1b82bd8b2..9d6fc5084 100644 --- a/client/src/mifare/desfirecore.c +++ b/client/src/mifare/desfirecore.c @@ -1100,7 +1100,7 @@ int DesfireSelectAndAuthenticateW(DesfireContext_t *dctx, DesfireSecureChannel s DesfirePrintContext(dctx); int res = 0; - + // Handle DF Name selection if it's present in the context if (dctx->selectedDFNameLen > 0) { // Select DF by name using ISO7816 SELECT @@ -1114,7 +1114,7 @@ int DesfireSelectAndAuthenticateW(DesfireContext_t *dctx, DesfireSecureChannel s if (verbose) { PrintAndLogEx(INFO, "DF %s is " _GREEN_("selected"), sprint_hex(dctx->selectedDFName, dctx->selectedDFNameLen)); } - + // If both dfname and aid are specified, now also select by AID if (way == ISW6bAID && id != 0x000000) { if (dctx->cmdSet == DCCISO) { diff --git a/client/src/mifare/desfirecrypto.c b/client/src/mifare/desfirecrypto.c index c7fbbb2da..b0097aab7 100644 --- a/client/src/mifare/desfirecrypto.c +++ b/client/src/mifare/desfirecrypto.c @@ -108,7 +108,7 @@ void DesfireSetKdf(DesfireContext_t *ctx, uint8_t kdfAlgo, uint8_t *kdfInput, ui void DesfireSetDFName(DesfireContext_t *ctx, uint8_t *dfname, uint8_t dfnameLen) { ctx->selectedDFNameLen = 0; memset(ctx->selectedDFName, 0, sizeof(ctx->selectedDFName)); - + if (dfname && dfnameLen > 0 && dfnameLen <= 16) { ctx->selectedDFNameLen = dfnameLen; memcpy(ctx->selectedDFName, dfname, dfnameLen); diff --git a/client/src/mifare/desfirecrypto.h b/client/src/mifare/desfirecrypto.h index c6b446705..363cef461 100644 --- a/client/src/mifare/desfirecrypto.h +++ b/client/src/mifare/desfirecrypto.h @@ -74,7 +74,7 @@ typedef struct { bool isoChaining; bool appSelected; // for iso auth uint32_t selectedAID; - + uint8_t selectedDFName[16]; uint8_t selectedDFNameLen; diff --git a/client/src/pm3line_vocabulary.h b/client/src/pm3line_vocabulary.h index 3bf14d7a0..8c106751f 100644 --- a/client/src/pm3line_vocabulary.h +++ b/client/src/pm3line_vocabulary.h @@ -477,6 +477,7 @@ const static vocabulary_t vocabulary[] = { { 0, "hf mfdes getkeyversions" }, { 0, "hf mfdes getfileids" }, { 0, "hf mfdes getfileisoids" }, + { 0, "hf mfdes lsfile" }, { 0, "hf mfdes lsfiles" }, { 0, "hf mfdes dump" }, { 0, "hf mfdes createfile" }, diff --git a/doc/commands.json b/doc/commands.json index 98afb786e..564f068d7 100644 --- a/doc/commands.json +++ b/doc/commands.json @@ -5680,7 +5680,8 @@ "hf mfdes auth -n 0 -t des -k 0000000000000000 --kdf none -> select PICC level and authenticate with key num=0, key type=des, key=00..00 and key derivation = none", "hf mfdes auth -n 0 -t aes -k 00000000000000000000000000000000 -> select PICC level and authenticate with key num=0, key type=aes, key=00..00 and key derivation = none", "hf mfdes auth -n 0 -t des -k 0000000000000000 --save -> select PICC level and authenticate and in case of successful authentication - save channel parameters to defaults", - "hf mfdes auth --aid 123456 -> select application 123456 and authenticate via parameters from `default` command" + "hf mfdes auth --aid 123456 -> select application 123456 and authenticate via parameters from `default` command", + "hf mfdes auth --dfname D2760000850100 -n 0 -t aes -k 00000000000000000000000000000000 -> select DF by name and authenticate" ], "offline": false, "options": [ @@ -5697,9 +5698,10 @@ "--schann Secure channel", "--aid Application ID of application for some parameters (3 hex bytes, big endian)", "--isoid Application ISO ID (ISO DF ID) (2 hex bytes, big endian)", + "--dfname Application ISO DF Name (5-16 hex bytes, big endian)", "--save saves channels parameters to defaults if authentication succeeds" ], - "usage": "hf mfdes auth [-hav] [-n ] [-t ] [-k ] [--kdf ] [-i ] [-m ] [-c ] [--schann ] [--aid ] [--isoid ] [--save]" + "usage": "hf mfdes auth [-hav] [-n ] [-t ] [-k ] [--kdf ] [-i ] [-m ] [-c ] [--schann ] [--aid ] [--isoid ] [--dfname ] [--save]" }, "hf mfdes bruteaid": { "command": "hf mfdes bruteaid", @@ -6190,10 +6192,11 @@ "--schann Secure channel", "--aid Application ID (3 hex bytes, big endian)", "--isoid Application ISO ID (ISO DF ID) (2 hex bytes, big endian).", + "--dfname Application ISO DF Name (5-16 hex bytes, big endian)", "-f, --file Filename of dictionary", "--save Save found key and parameters to defaults" ], - "usage": "hf mfdes detect [-hav] [-n ] [-t ] [-k ] [--kdf ] [-i ] [-m ] [-c ] [--schann ] [--aid ] [--isoid ] [-f ] [--save]" + "usage": "hf mfdes detect [-hav] [-n ] [-t ] [-k ] [--kdf ] [-i ] [-m ] [-c ] [--schann ] [--aid ] [--isoid ] [--dfname ] [-f ] [--save]" }, "hf mfdes dump": { "command": "hf mfdes dump", @@ -6216,10 +6219,11 @@ "--schann Secure channel", "--aid Application ID (3 hex bytes, big endian)", "--isoid Application ISO ID (ISO DF ID) (2 hex bytes, big endian)", + "--dfname Application ISO DF Name (5-16 hex bytes, big endian)", "-l, --length Maximum length for read data files (3 hex bytes, big endian)", "--no-auth Execute without authentication" ], - "usage": "hf mfdes dump [-hav] [-n ] [-t ] [-k ] [--kdf ] [-i ] [-m ] [-c ] [--schann ] [--aid ] [--isoid ] [-l ] [--no-auth]" + "usage": "hf mfdes dump [-hav] [-n ] [-t ] [-k ] [--kdf ] [-i ] [-m ] [-c ] [--schann ] [--aid ] [--isoid ] [--dfname ] [-l ] [--no-auth]" }, "hf mfdes formatpicc": { "command": "hf mfdes formatpicc", @@ -6263,9 +6267,10 @@ "-m, --cmode Communicaton mode", "-c, --ccset Communicaton command set", "--schann Secure channel", - "--no-auth Execute without authentication" + "--no-auth Execute without authentication", + "--dfname Application ISO DF Name (5-16 hex bytes, big endian)" ], - "usage": "hf mfdes getfreemem [-hav] [-n ] [-t ] [-k ] [--kdf ] [-i ] [-m ] [-c ] [--schann ] [--no-auth]" + "usage": "hf mfdes getfreemem [-hav] [-n ] [-t ] [-k ] [--kdf ] [-i ] [-m ] [-c ] [--schann ] [--no-auth] [--dfname ]" }, "hf mfdes getaids": { "command": "hf mfdes getaids", @@ -6318,7 +6323,8 @@ "description": "Get File IDs list from card. Master key needs to be provided or flag --no-auth set.", "notes": [ "hf mfdes getfileids --aid 123456 -> execute with defaults from `default` command", - "hf mfdes getfileids -n 0 -t des -k 0000000000000000 --kdf none --aid 123456 -> execute with default factory setup" + "hf mfdes getfileids -n 0 -t des -k 0000000000000000 --kdf none --aid 123456 -> execute with default factory setup", + "hf mfdes getfileids --dfname D2760000850100 -> select DF by name and get file IDs" ], "offline": false, "options": [ @@ -6335,9 +6341,10 @@ "--schann Secure channel", "--aid Application ID (3 hex bytes, big endian)", "--isoid Application ISO ID (ISO DF ID) (2 hex bytes, big endian).", + "--dfname Application ISO DF Name (5-16 hex bytes, big endian)", "--no-auth Execute without authentication" ], - "usage": "hf mfdes getfileids [-hav] [-n ] [-t ] [-k ] [--kdf ] [-i ] [-m ] [-c ] [--schann ] [--aid ] [--isoid ] [--no-auth]" + "usage": "hf mfdes getfileids [-hav] [-n ] [-t ] [-k ] [--kdf ] [-i ] [-m ] [-c ] [--schann ] [--aid ] [--isoid ] [--dfname ] [--no-auth]" }, "hf mfdes getfileisoids": { "command": "hf mfdes getfileisoids", @@ -6346,7 +6353,8 @@ "hf mfdes getfileisoids --aid 123456 -> execute with defaults from `default` command", "hf mfdes getfileisoids -n 0 -t des -k 0000000000000000 --kdf none --aid 123456 -> execute with default factory setup", "hf mfdes getfileisoids --isoid df01 -> get iso file ids from Desfire Light with factory card settings", - "hf mfdes getfileisoids --isoid df01 --schann lrp -t aes -> get iso file ids from Desfire Light via lrp channel with default key authentication" + "hf mfdes getfileisoids --isoid df01 --schann lrp -t aes -> get iso file ids from Desfire Light via lrp channel with default key authentication", + "hf mfdes getfileisoids --dfname D2760000850100 -> select DF by name and get file ISO IDs" ], "offline": false, "options": [ @@ -6363,9 +6371,10 @@ "--schann Secure channel", "--aid Application ID (3 hex bytes, big endian)", "--isoid Application ISO ID (ISO DF ID) (2 hex bytes, big endian).", + "--dfname Application ISO DF Name (5-16 hex bytes, big endian)", "--no-auth Execute without authentication" ], - "usage": "hf mfdes getfileisoids [-hav] [-n ] [-t ] [-k ] [--kdf ] [-i ] [-m ] [-c ] [--schann ] [--aid ] [--isoid ] [--no-auth]" + "usage": "hf mfdes getfileisoids [-hav] [-n ] [-t ] [-k ] [--kdf ] [-i ] [-m ] [-c ] [--schann ] [--aid ] [--isoid ] [--dfname ] [--no-auth]" }, "hf mfdes getfilesettings": { "command": "hf mfdes getfilesettings", @@ -6373,7 +6382,8 @@ "notes": [ "hf mfdes getfilesettings --aid 123456 --fid 01 -> execute with defaults from `default` command", "hf mfdes getfilesettings --isoid df01 --fid 00 --no-auth -> get file settings with select by iso id", - "hf mfdes getfilesettings -n 0 -t des -k 0000000000000000 --kdf none --aid 123456 --fid 01 -> execute with default factory setup" + "hf mfdes getfilesettings -n 0 -t des -k 0000000000000000 --kdf none --aid 123456 --fid 01 -> execute with default factory setup", + "hf mfdes getfilesettings --dfname D2760000850100 --fid 01 -> select DF by name and get file settings" ], "offline": false, "options": [ @@ -6390,17 +6400,19 @@ "--schann Secure channel", "--aid Application ID (3 hex bytes, big endian)", "--isoid Application ISO ID (ISO DF ID) (2 hex bytes, big endian)", + "--dfname Application ISO DF Name (5-16 hex bytes, big endian)", "--fid File ID (1 hex byte). (def: 1)", "--no-auth Execute without authentication" ], - "usage": "hf mfdes getfilesettings [-hav] [-n ] [-t ] [-k ] [--kdf ] [-i ] [-m ] [-c ] [--schann ] [--aid ] [--isoid ] [--fid ] [--no-auth]" + "usage": "hf mfdes getfilesettings [-hav] [-n ] [-t ] [-k ] [--kdf ] [-i ] [-m ] [-c ] [--schann ] [--aid ] [--isoid ] [--dfname ] [--fid ] [--no-auth]" }, "hf mfdes getkeysettings": { "command": "hf mfdes getkeysettings", "description": "Get key settings for card level or application level.", "notes": [ "hf mfdes getkeysettings -> get picc key settings with default key/channel setup", - "hf mfdes getkeysettings --aid 123456 -> get app 123456 key settings with default key/channel setup" + "hf mfdes getkeysettings --aid 123456 -> get app 123456 key settings with default key/channel setup", + "hf mfdes getkeysettings --dfname D2760000850100 -> select DF by name and get key settings" ], "offline": false, "options": [ @@ -6415,9 +6427,10 @@ "-m, --cmode Communicaton mode", "-c, --ccset Communicaton command set", "--schann Secure channel", - "--aid Application ID (3 hex bytes, big endian)" + "--aid Application ID (3 hex bytes, big endian)", + "--dfname Application ISO DF Name (5-16 hex bytes, big endian)" ], - "usage": "hf mfdes getkeysettings [-hav] [-n ] [-t ] [-k ] [--kdf ] [-i ] [-m ] [-c ] [--schann ] [--aid ]" + "usage": "hf mfdes getkeysettings [-hav] [-n ] [-t ] [-k ] [--kdf ] [-i ] [-m ] [-c ] [--schann ] [--aid ] [--dfname ]" }, "hf mfdes getkeyversions": { "command": "hf mfdes getkeyversions", @@ -6426,7 +6439,8 @@ "--keynum parameter: App level: key number. PICC level: 00..0d - keys count, 21..23 vc keys, default 0x00.", "hf mfdes getkeyversions --keynum 00 -> get picc master key version with default key/channel setup", "hf mfdes getkeyversions --aid 123456 --keynum 0d -> get app 123456 all key versions with default key/channel setup", - "hf mfdes getkeyversions --aid 123456 --keynum 0d --no-auth -> get key version without authentication" + "hf mfdes getkeyversions --aid 123456 --keynum 0d --no-auth -> get key version without authentication", + "hf mfdes getkeyversions --dfname D2760000850100 --keynum 00 -> select DF by name and get key versions" ], "offline": false, "options": [ @@ -6443,18 +6457,20 @@ "--schann Secure channel", "--aid Application ID (3 hex bytes, big endian)", "--isoid Application ISO ID (ISO DF ID) (2 hex bytes, big endian).", + "--dfname Application ISO DF Name (5-16 hex bytes, big endian)", "--keynum Key number/count (1 hex byte). (def: 0x00)", "--keyset Keyset number (1 hex byte)", "--no-auth Execute without authentication" ], - "usage": "hf mfdes getkeyversions [-hav] [-n ] [-t ] [-k ] [--kdf ] [-i ] [-m ] [-c ] [--schann ] [--aid ] [--isoid ] [--keynum ] [--keyset ] [--no-auth]" + "usage": "hf mfdes getkeyversions [-hav] [-n ] [-t ] [-k ] [--kdf ] [-i ] [-m ] [-c ] [--schann ] [--aid ] [--isoid ] [--dfname ] [--keynum ] [--keyset ] [--no-auth]" }, "hf mfdes getuid": { "command": "hf mfdes getuid", "description": "Get UID from card. Get the real UID if the random UID bit is on and get the same UID as in anticollision if not. Any card's key needs to be provided.", "notes": [ "hf mfdes getuid -> execute with default factory setup", - "hf mfdes getuid --isoid df01 -t aes --schan lrp -> for desfire lights default settings" + "hf mfdes getuid --isoid df01 -t aes --schan lrp -> for desfire lights default settings", + "hf mfdes getuid --dfname D2760000850100 -> select DF by name and get UID" ], "offline": false, "options": [ @@ -6470,9 +6486,10 @@ "-c, --ccset Communicaton command set", "--schann Secure channel", "--aid Application ID (3 hex bytes, big endian)", - "--isoid Application ISO ID (ISO DF ID) (2 hex bytes, big endian)" + "--isoid Application ISO ID (ISO DF ID) (2 hex bytes, big endian)", + "--dfname Application ISO DF Name (5-16 hex bytes, big endian)" ], - "usage": "hf mfdes getuid [-hav] [-n ] [-t ] [-k ] [--kdf ] [-i ] [-m ] [-c ] [--schann ] [--aid ] [--isoid ]" + "usage": "hf mfdes getuid [-hav] [-n ] [-t ] [-k ] [--kdf ] [-i ] [-m ] [-c ] [--schann ] [--aid ] [--isoid ] [--dfname ]" }, "hf mfdes help": { "command": "hf mfdes help", @@ -6512,7 +6529,8 @@ "description": "Show application list. Master key needs to be provided or flag --no-auth set (depend on cards settings).", "notes": [ "hf mfdes lsapp -> show application list with defaults from `default` command", - "hf mfdes lsapp --files -> show application list and show each file type/settings/etc" + "hf mfdes lsapp --files -> show application list and show each file type/settings/etc", + "hf mfdes lsapp --dfname D2760000850100 -> list apps after selecting DF by name" ], "offline": false, "options": [ @@ -6529,16 +6547,18 @@ "--schann Secure channel", "--no-auth Execute without authentication", "--no-deep not to check authentication commands that avail for any application", - "--files scan files and print file settings" + "--files scan files and print file settings", + "--dfname Application ISO DF Name (5-16 hex bytes, big endian)" ], - "usage": "hf mfdes lsapp [-hav] [-n ] [-t ] [-k ] [--kdf ] [-i ] [-m ] [-c ] [--schann ] [--no-auth] [--no-deep] [--files]" + "usage": "hf mfdes lsapp [-hav] [-n ] [-t ] [-k ] [--kdf ] [-i ] [-m ] [-c ] [--schann ] [--no-auth] [--no-deep] [--files] [--dfname ]" }, - "hf mfdes lsfiles": { - "command": "hf mfdes lsfiles", + "hf mfdes lsfile": { + "command": "hf mfdes lsfile", "description": "This commands List files inside application AID / ISOID. Master key needs to be provided or flag --no-auth set (depend on cards settings).", "notes": [ "hf mfdes lsfiles --aid 123456 -> AID 123456, list files using `default` command creds", - "hf mfdes lsfiles --isoid df01 --no-auth -> list files for DESFire light" + "hf mfdes lsfiles --isoid df01 --no-auth -> list files for DESFire light", + "hf mfdes lsfiles --dfname D2760000850100 -> select DF by name and list files" ], "offline": false, "options": [ @@ -6555,9 +6575,38 @@ "--schann Secure channel", "--aid Application ID (3 hex bytes, big endian)", "--isoid Application ISO ID (ISO DF ID) (2 hex bytes, big endian)", + "--dfname Application ISO DF Name (5-16 hex bytes, big endian)", "--no-auth Execute without authentication" ], - "usage": "hf mfdes lsfiles [-hav] [-n ] [-t ] [-k ] [--kdf ] [-i ] [-m ] [-c ] [--schann ] [--aid ] [--isoid ] [--no-auth]" + "usage": "hf mfdes lsfiles [-hav] [-n ] [-t ] [-k ] [--kdf ] [-i ] [-m ] [-c ] [--schann ] [--aid ] [--isoid ] [--dfname ] [--no-auth]" + }, + "hf mfdes lsfiles": { + "command": "hf mfdes lsfiles", + "description": "This commands List files inside application AID / ISOID. Master key needs to be provided or flag --no-auth set (depend on cards settings).", + "notes": [ + "hf mfdes lsfiles --aid 123456 -> AID 123456, list files using `default` command creds", + "hf mfdes lsfiles --isoid df01 --no-auth -> list files for DESFire light", + "hf mfdes lsfiles --dfname D2760000850100 -> select DF by name and list files" + ], + "offline": false, + "options": [ + "-h, --help This help", + "-a, --apdu Show APDU requests and responses", + "-v, --verbose Verbose output", + "-n, --keyno Key number", + "-t, --algo Crypt algo", + "-k, --key Key for authenticate (HEX 8(DES), 16(2TDEA or AES) or 24(3TDEA) bytes)", + "--kdf Key Derivation Function (KDF)", + "-i, --kdfi KDF input (1-31 hex bytes)", + "-m, --cmode Communicaton mode", + "-c, --ccset Communicaton command set", + "--schann Secure channel", + "--aid Application ID (3 hex bytes, big endian)", + "--isoid Application ISO ID (ISO DF ID) (2 hex bytes, big endian)", + "--dfname Application ISO DF Name (5-16 hex bytes, big endian)", + "--no-auth Execute without authentication" + ], + "usage": "hf mfdes lsfiles [-hav] [-n ] [-t ] [-k ] [--kdf ] [-i ] [-m ] [-c ] [--schann ] [--aid ] [--isoid ] [--dfname ] [--no-auth]" }, "hf mfdes mad": { "command": "hf mfdes mad", @@ -13487,8 +13536,8 @@ } }, "metadata": { - "commands_extracted": 775, + "commands_extracted": 780, "extracted_by": "PM3Help2JSON v1.00", - "extracted_on": "2025-08-12T16:26:32" + "extracted_on": "2025-08-20T08:39:30" } } diff --git a/doc/commands.md b/doc/commands.md index 6fbd8f18f..fbae0a050 100644 --- a/doc/commands.md +++ b/doc/commands.md @@ -672,6 +672,7 @@ Check column "offline" for their availability. |`hf mfdes getkeyversions`|N |`Get Key Versions` |`hf mfdes getfileids `|N |`Get File IDs list` |`hf mfdes getfileisoids `|N |`Get File ISO IDs list` +|`hf mfdes lsfile `|N |`Show all files list` |`hf mfdes lsfiles `|N |`Show all files list` |`hf mfdes dump `|N |`Dump all files` |`hf mfdes createfile `|N |`Create Standard/Backup File`