Add --dfname param to 'hf mfdes read'
This commit is contained in:
1 parent
73d0388141
commit
5be7e8f9a3
3 files changed
+10
-6
No files matched your search
@@ -7328,6 +7328,7 @@ static int CmdHF14ADesReadData(const char *Cmd) {
|
||||
"hf mfdes read --aid 123456 --fid 10 --type data -c iso -> read file via ISO channel: app=123456, short iso id=10, offset=0.\n"
|
||||
"hf mfdes read --aid 123456 --fileisoid 1000 --type data -c iso -> read file via ISO channel: app=123456, iso id=1000, offset=0. Select via native ISO wrapper\n"
|
||||
"hf mfdes read --isoid 0102 --fileisoid 1000 --type data -c iso -> read file via ISO channel: app iso id=0102, iso id=1000, offset=0. Select via ISO commands\n"
|
||||
"hf mfdes read --dfname D2760000850100 --fid 01 -> select DF by name and read file 01\n"
|
||||
"hf mfdes read --isoid 0102 --fileisoid 1100 --type record -c iso --offset 000005 --length 000001 -> get one record (number 5) from file 1100 via iso commands\n"
|
||||
"hf mfdes read --isoid 0102 --fileisoid 1100 --type record -c iso --offset 000005 --length 000000 -> get all record (from 5 to 1) from file 1100 via iso commands\n"
|
||||
"hf mfdes read --isoid df01 --fid 00 --schann lrp -t aes --length 000010 -> read via lrp channel\n"
|
||||
@@ -7352,6 +7353,7 @@ static int CmdHF14ADesReadData(const char *Cmd) {
|
||||
arg_str0("o", "offset", "<hex>", "File Offset (3 hex bytes, big endian). For records - record number (0 - lastest record). (def: 0)"),
|
||||
arg_str0("l", "length", "<hex>", "Length to read (3 hex bytes, big endian -> 000000 = Read all data). For records - records count (0 - all). (def: 0)"),
|
||||
arg_str0(NULL, "isoid", "<hex>", "Application ISO ID (ISO DF ID) (2 hex bytes, big endian)"),
|
||||
arg_str0(NULL, "dfname", "<hex>", "Application ISO DF Name (1-16 hex bytes, big endian)"),
|
||||
arg_str0(NULL, "fileisoid", "<hex>", "File ISO ID (ISO DF ID) (2 hex bytes, big endian). Works only for ISO read commands"),
|
||||
arg_lit0(NULL, "isochain", "use iso chaining commands. Switched on by default if secure channel = lrp"),
|
||||
arg_param_end
|
||||
@@ -7366,7 +7368,7 @@ static int CmdHF14ADesReadData(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, 17, 0, &securechann, DCMMACed, &id, &selectway);
|
||||
int res = CmdDesGetSessionParameters(ctx, &dctx, 3, 4, 5, 6, 7, 8, 9, 10, 11, 17, 18, &securechann, DCMMACed, &id, &selectway);
|
||||
if (res) {
|
||||
CLIParserFree(ctx);
|
||||
return res;
|
||||
@@ -7398,12 +7400,12 @@ static int CmdHF14ADesReadData(const char *Cmd) {
|
||||
|
||||
uint32_t fileisoid = 0x0000;
|
||||
bool fileisoidpresent = false;
|
||||
if (CLIGetUint32Hex(ctx, 18, 0x0000, &fileisoid, &fileisoidpresent, 2, "File ISO ID (for DF) must have 2 bytes length")) {
|
||||
if (CLIGetUint32Hex(ctx, 19, 0x0000, &fileisoid, &fileisoidpresent, 2, "File ISO ID (for DF) must have 2 bytes length")) {
|
||||
CLIParserFree(ctx);
|
||||
return PM3_EINVARG;
|
||||
}
|
||||
|
||||
dctx.isoChaining = arg_get_lit(ctx, 19);
|
||||
dctx.isoChaining = arg_get_lit(ctx, 20);
|
||||
|
||||
SetAPDULogging(APDULogging);
|
||||
CLIParserFree(ctx);
|
||||
|
||||
Reference in new issue
Block a user