mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 05:43:48 -07:00
speed-up mad command
This commit is contained in:
parent
a8e2e912b7
commit
24b5bb56ba
3 changed files with 6 additions and 6 deletions
|
@ -1599,7 +1599,7 @@ static int CmdHF14aDesMAD(const char *Cmd) {
|
|||
|
||||
PICCInfoS PICCInfo = {0};
|
||||
AppListS AppList = {0};
|
||||
DesfireFillAppList(&dctx, &PICCInfo, AppList, false, false); // no deep scan, no scan files
|
||||
DesfireFillAppList(&dctx, &PICCInfo, AppList, false, false, false); // no deep scan, no scan files
|
||||
|
||||
if (PICCInfo.freemem == 0xffffffff)
|
||||
PrintAndLogEx(SUCCESS, "Applications count: " _GREEN_("%zu") " free memory " _YELLOW_("n/a"), PICCInfo.appCount);
|
||||
|
@ -5120,7 +5120,7 @@ static int CmdHF14ADesLsApp(const char *Cmd) {
|
|||
|
||||
PICCInfoS PICCInfo = {0};
|
||||
AppListS AppList = {0};
|
||||
DesfireFillAppList(&dctx, &PICCInfo, AppList, !nodeep, scanfiles);
|
||||
DesfireFillAppList(&dctx, &PICCInfo, AppList, !nodeep, scanfiles, true);
|
||||
|
||||
printf("\33[2K\r"); // clear current line before printing
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
|
|
|
@ -1482,7 +1482,7 @@ static int AppListSearchAID(uint32_t appNum, AppListS AppList, size_t appcount)
|
|||
return -1;
|
||||
}
|
||||
|
||||
int DesfireFillAppList(DesfireContext *dctx, PICCInfoS *PICCInfo, AppListS appList, bool deepmode, bool readFiles) {
|
||||
int DesfireFillAppList(DesfireContext *dctx, PICCInfoS *PICCInfo, AppListS appList, bool deepmode, bool readFiles, bool fillAppSettings) {
|
||||
uint8_t buf[250] = {0};
|
||||
size_t buflen = 0;
|
||||
|
||||
|
@ -1514,7 +1514,7 @@ int DesfireFillAppList(DesfireContext *dctx, PICCInfoS *PICCInfo, AppListS appLi
|
|||
// field on-off zone
|
||||
DesfireFillPICCInfo(dctx, PICCInfo, deepmode);
|
||||
|
||||
if (PICCInfo->appCount > 0) {
|
||||
if (fillAppSettings && PICCInfo->appCount > 0) {
|
||||
for (int i = 0; i < PICCInfo->appCount; i++) {
|
||||
if (i == 0)
|
||||
res = DesfireSelectAIDHex(dctx, appList[i].appNum, false, 0);
|
||||
|
@ -1549,7 +1549,7 @@ int DesfireFillAppList(DesfireContext *dctx, PICCInfoS *PICCInfo, AppListS appLi
|
|||
}
|
||||
|
||||
// field on-off zone
|
||||
if (PICCInfo->appCount > 0 && deepmode) {
|
||||
if (fillAppSettings && PICCInfo->appCount > 0 && deepmode) {
|
||||
for (int i = 0; i < PICCInfo->appCount; i++) {
|
||||
DesfireCheckAuthCommands(appList[i].appNum, appList[i].appDFName, 0, &appList[i].authCmdCheck);
|
||||
}
|
||||
|
|
|
@ -186,7 +186,7 @@ int DesfireGetUID(DesfireContext *dctx, uint8_t *resp, size_t *resplen);
|
|||
int DesfireGetAIDList(DesfireContext *dctx, uint8_t *resp, size_t *resplen);
|
||||
int DesfireGetDFList(DesfireContext *dctx, uint8_t *resp, size_t *resplen);
|
||||
int DesfireFillPICCInfo(DesfireContext *dctx, PICCInfoS *PICCInfo, bool deepmode);
|
||||
int DesfireFillAppList(DesfireContext *dctx, PICCInfoS *PICCInfo, AppListS appList, bool deepmode, bool readFiles);
|
||||
int DesfireFillAppList(DesfireContext *dctx, PICCInfoS *PICCInfo, AppListS appList, bool deepmode, bool readFiles, bool fillAppSettings);
|
||||
void DesfirePrintPICCInfo(DesfireContext *dctx, PICCInfoS *PICCInfo);
|
||||
void DesfirePrintAppList(DesfireContext *dctx, PICCInfoS *PICCInfo, AppListS appList);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue