mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 13:53:55 -07:00
changed "hf mfdes lsapp" to print dfname regardless if it is not a genuine strign
This commit is contained in:
parent
e1ae1cdd26
commit
8940982c85
3 changed files with 17 additions and 12 deletions
|
@ -18,12 +18,10 @@
|
|||
// Code heavily modified by B.Kerler :)
|
||||
|
||||
#include "cmdhfmfdes.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "commonutil.h" // ARRAYLEN
|
||||
#include "cmdparser.h" // command_t
|
||||
#include "commonutil.h" // ARRAYLEN
|
||||
#include "cmdparser.h" // command_t
|
||||
#include "comms.h"
|
||||
#include "ui.h"
|
||||
#include "cmdhf14a.h"
|
||||
|
@ -32,16 +30,16 @@
|
|||
#include "protocols.h"
|
||||
#include "cmdtrace.h"
|
||||
#include "cliparser.h"
|
||||
#include "iso7816/apduinfo.h" // APDU manipulation / errorcodes
|
||||
#include "iso7816/apduinfo.h" // APDU manipulation / errorcodes
|
||||
#include "iso7816/iso7816core.h" // APDU logging
|
||||
#include "util_posix.h" // msleep
|
||||
#include "util_posix.h" // msleep
|
||||
#include "mifare/desfirecore.h"
|
||||
#include "mifare/desfiretest.h"
|
||||
#include "mifare/desfiresecurechan.h"
|
||||
#include "mifare/mifaredefault.h" // default keys
|
||||
#include "mifare/mifaredefault.h" // default keys
|
||||
#include "crapto1/crapto1.h"
|
||||
#include "fileutils.h"
|
||||
#include "nfc/ndef.h" // NDEF
|
||||
//#include "nfc/ndef.h" // NDEF
|
||||
#include "mifare/mad.h"
|
||||
#include "mifare/mifaredefault.h"
|
||||
#include "generator.h"
|
||||
|
|
|
@ -333,7 +333,7 @@ int AIDDFDecodeAndPrint(uint8_t aid[3]) {
|
|||
open_aiddf_file(&df_known_aids, false);
|
||||
|
||||
char fmt[80];
|
||||
snprintf(fmt, sizeof(fmt), " DF AID Function %02X%02X%02X :" _YELLOW_("%s"), aid[2], aid[1], aid[0], "%s");
|
||||
snprintf(fmt, sizeof(fmt), " DF AID Function... %02X%02X%02X :" _YELLOW_("%s"), aid[2], aid[1], aid[0], "%s");
|
||||
print_aiddf_description(df_known_aids, aid, fmt, false);
|
||||
close_aiddf_file(df_known_aids);
|
||||
return PM3_SUCCESS;
|
||||
|
|
|
@ -997,7 +997,7 @@ int DesfireSelectAndAuthenticateEx(DesfireContext_t *dctx, DesfireSecureChannel
|
|||
if (isosw)
|
||||
dctx->cmdSet = DCCISO;
|
||||
|
||||
if (!noauth) {
|
||||
if (noauth == false) {
|
||||
res = DesfireAuthenticate(dctx, secureChannel, verbose);
|
||||
if (res != PM3_SUCCESS) {
|
||||
PrintAndLogEx(ERR, "Desfire authenticate " _RED_("error") ". Result: [%d] %s", res, DesfireAuthErrorToStr(res));
|
||||
|
@ -1746,7 +1746,12 @@ int DesfireFillAppList(DesfireContext_t *dctx, PICCInfo_t *PICCInfo, AppListS ap
|
|||
int indx = AppListSearchAID(DesfireAIDByteToUint(&buf[i * 24 + 1]), appList, PICCInfo->appCount);
|
||||
if (indx >= 0) {
|
||||
appList[indx].appISONum = MemLeToUint2byte(&buf[i * 24 + 1 + 3]);
|
||||
memcpy(appList[indx].appDFName, &buf[i * 24 + 1 + 5], strnlen((char *)&buf[i * 24 + 1 + 5], 16));
|
||||
memcpy(
|
||||
appList[indx].appDFName,
|
||||
&buf[i * 24 + 1 + 5],
|
||||
// strnlen((char *)&buf[i * 24 + 1 + 5], 16)
|
||||
16
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1822,7 +1827,9 @@ void DesfirePrintAppList(DesfireContext_t *dctx, PICCInfo_t *PICCInfo, AppListS
|
|||
PrintAndLogEx(SUCCESS, "--------------------------------- " _CYAN_("Applications list") " ---------------------------------");
|
||||
|
||||
for (int i = 0; i < PICCInfo->appCount; i++) {
|
||||
PrintAndLogEx(SUCCESS, _CYAN_("Application number: 0x%02x") " iso id: " _GREEN_("0x%04x") " name: " _GREEN_("%s"), appList[i].appNum, appList[i].appISONum, appList[i].appDFName);
|
||||
PrintAndLogEx(SUCCESS, _CYAN_("Application number: 0x%02X"), appList[i].appNum);
|
||||
PrintAndLogEx(SUCCESS," ISO id.... " _GREEN_("0x%04X"), appList[i].appISONum);
|
||||
PrintAndLogEx(SUCCESS," DF name... " _GREEN_("%s") " ( %s)", appList[i].appDFName, sprint_hex((uint8_t*)appList[i].appDFName, sizeof(appList[i].appDFName)));
|
||||
|
||||
DesfirePrintAIDFunctions(appList[i].appNum);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue