mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-25 23:55:25 -07:00
auto read file improvement
This commit is contained in:
parent
5215f4660c
commit
17944f7d0a
1 changed files with 10 additions and 1 deletions
|
@ -6331,7 +6331,12 @@ static int CmdHF14ADesReadData(const char *Cmd) {
|
||||||
// get file settings
|
// get file settings
|
||||||
if (op == RFTAuto) {
|
if (op == RFTAuto) {
|
||||||
FileSettingsS fsettings;
|
FileSettingsS fsettings;
|
||||||
|
|
||||||
|
DesfireCommunicationMode commMode = dctx.commMode;
|
||||||
|
DesfireSetCommMode(&dctx, DCMMACed);
|
||||||
res = DesfireGetFileSettingsStruct(&dctx, fnum, &fsettings);
|
res = DesfireGetFileSettingsStruct(&dctx, fnum, &fsettings);
|
||||||
|
DesfireSetCommMode(&dctx, commMode);
|
||||||
|
|
||||||
if (res == PM3_SUCCESS) {
|
if (res == PM3_SUCCESS) {
|
||||||
switch(fsettings.fileType) {
|
switch(fsettings.fileType) {
|
||||||
case 0x00:
|
case 0x00:
|
||||||
|
@ -6358,8 +6363,12 @@ static int CmdHF14ADesReadData(const char *Cmd) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (verbose)
|
if (verbose)
|
||||||
PrintAndLogEx(INFO, "Got file type: %s. Option: %s", GetDesfireFileType(fsettings.fileType), CLIGetOptionListStr(DesfireReadFileTypeOpts, op));
|
PrintAndLogEx(INFO, "Got file type: %s. Option: %s. comm mode: %s",
|
||||||
|
GetDesfireFileType(fsettings.fileType),
|
||||||
|
CLIGetOptionListStr(DesfireReadFileTypeOpts, op),
|
||||||
|
CLIGetOptionListStr(DesfireCommunicationModeOpts, fsettings.commMode));
|
||||||
|
|
||||||
|
DesfireSetCommMode(&dctx, fsettings.commMode);
|
||||||
} else {
|
} else {
|
||||||
PrintAndLogEx(WARNING, "GetFileSettings error. Can't get file type.");
|
PrintAndLogEx(WARNING, "GetFileSettings error. Can't get file type.");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue