mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 21:33:47 -07:00
style
This commit is contained in:
parent
47096906fb
commit
a7f69b5f13
4 changed files with 30 additions and 30 deletions
|
@ -1407,10 +1407,10 @@ static int CmdHFCipurseDeleteFile(const char *Cmd) {
|
||||||
res = CIPURSEDeleteFile(childFileId, buf, sizeof(buf), &len, &sw);
|
res = CIPURSEDeleteFile(childFileId, buf, sizeof(buf), &len, &sw);
|
||||||
if (res != 0 || sw != 0x9000) {
|
if (res != 0 || sw != 0x9000) {
|
||||||
PrintAndLogEx(ERR, "Delete child file " _CYAN_("%04x ") " %s", childFileId, _RED_("ERROR"));
|
PrintAndLogEx(ERR, "Delete child file " _CYAN_("%04x ") " %s", childFileId, _RED_("ERROR"));
|
||||||
PrintAndLogEx(ERR, "0x%04x - %s",
|
PrintAndLogEx(ERR, "0x%04x - %s",
|
||||||
sw,
|
sw,
|
||||||
GetSpecificAPDUCodeDesc(DeleteAPDUCodeDescriptions, ARRAYLEN(DeleteAPDUCodeDescriptions), sw)
|
GetSpecificAPDUCodeDesc(DeleteAPDUCodeDescriptions, ARRAYLEN(DeleteAPDUCodeDescriptions), sw)
|
||||||
);
|
);
|
||||||
DropField();
|
DropField();
|
||||||
return PM3_ESOFT;
|
return PM3_ESOFT;
|
||||||
}
|
}
|
||||||
|
@ -1420,9 +1420,9 @@ static int CmdHFCipurseDeleteFile(const char *Cmd) {
|
||||||
if (res != 0 || sw != 0x9000) {
|
if (res != 0 || sw != 0x9000) {
|
||||||
PrintAndLogEx(ERR, "Delete file " _CYAN_("%04x ") " %s", fileId, _RED_("ERROR"));
|
PrintAndLogEx(ERR, "Delete file " _CYAN_("%04x ") " %s", fileId, _RED_("ERROR"));
|
||||||
PrintAndLogEx(ERR, "0x%04x - %s",
|
PrintAndLogEx(ERR, "0x%04x - %s",
|
||||||
sw,
|
sw,
|
||||||
GetSpecificAPDUCodeDesc(DeleteAPDUCodeDescriptions, ARRAYLEN(DeleteAPDUCodeDescriptions), sw)
|
GetSpecificAPDUCodeDesc(DeleteAPDUCodeDescriptions, ARRAYLEN(DeleteAPDUCodeDescriptions), sw)
|
||||||
);
|
);
|
||||||
DropField();
|
DropField();
|
||||||
return PM3_ESOFT;
|
return PM3_ESOFT;
|
||||||
}
|
}
|
||||||
|
@ -1432,9 +1432,9 @@ static int CmdHFCipurseDeleteFile(const char *Cmd) {
|
||||||
if (res != 0 || sw != 0x9000) {
|
if (res != 0 || sw != 0x9000) {
|
||||||
PrintAndLogEx(ERR, "Delete application " _CYAN_("%s ") " %s", sprint_hex_inrow(aid, aidLen), _RED_("ERROR"));
|
PrintAndLogEx(ERR, "Delete application " _CYAN_("%s ") " %s", sprint_hex_inrow(aid, aidLen), _RED_("ERROR"));
|
||||||
PrintAndLogEx(ERR, "0x%04x - %s",
|
PrintAndLogEx(ERR, "0x%04x - %s",
|
||||||
sw,
|
sw,
|
||||||
GetSpecificAPDUCodeDesc(DeleteAPDUCodeDescriptions, ARRAYLEN(DeleteAPDUCodeDescriptions), sw)
|
GetSpecificAPDUCodeDesc(DeleteAPDUCodeDescriptions, ARRAYLEN(DeleteAPDUCodeDescriptions), sw)
|
||||||
);
|
);
|
||||||
DropField();
|
DropField();
|
||||||
return PM3_ESOFT;
|
return PM3_ESOFT;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2185,30 +2185,30 @@ static int CmdHF14ADesSetConfiguration(const char *Cmd) {
|
||||||
if (verbose) {
|
if (verbose) {
|
||||||
if (DesfireMFSelected(selectway, id)) {
|
if (DesfireMFSelected(selectway, id)) {
|
||||||
PrintAndLogEx(INFO, _CYAN_("PICC") " param ID: 0x%02x param[%d]: %s",
|
PrintAndLogEx(INFO, _CYAN_("PICC") " param ID: 0x%02x param[%d]: %s",
|
||||||
paramid,
|
paramid,
|
||||||
paramlen,
|
paramlen,
|
||||||
sprint_hex(param, paramlen)
|
sprint_hex(param, paramlen)
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
PrintAndLogEx(INFO, _CYAN_("%s %06x") " param ID: 0x%02x param[%d]: %s",
|
PrintAndLogEx(INFO, _CYAN_("%s %06x") " param ID: 0x%02x param[%d]: %s",
|
||||||
DesfireSelectWayToStr(selectway),
|
DesfireSelectWayToStr(selectway),
|
||||||
id,
|
id,
|
||||||
paramid,
|
paramid,
|
||||||
paramlen,
|
paramlen,
|
||||||
sprint_hex(param, paramlen)
|
sprint_hex(param, paramlen)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
res = DesfireSelectAndAuthenticateAppW(&dctx, securechann, selectway, id, false, verbose);
|
res = DesfireSelectAndAuthenticateAppW(&dctx, securechann, selectway, id, false, verbose);
|
||||||
if (res != PM3_SUCCESS) {
|
if (res != PM3_SUCCESS) {
|
||||||
DropField();
|
DropField();
|
||||||
PrintAndLogEx(FAILED, "Select or authentication ( %s ) Result [%d] %s %s",
|
PrintAndLogEx(FAILED, "Select or authentication ( %s ) Result [%d] %s %s",
|
||||||
DesfireWayIDStr(selectway, id),
|
DesfireWayIDStr(selectway, id),
|
||||||
res,
|
res,
|
||||||
DesfireAuthErrorToStr(res),
|
DesfireAuthErrorToStr(res),
|
||||||
_RED_("failed")
|
_RED_("failed")
|
||||||
);
|
);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -258,7 +258,7 @@ int flash_load(flash_file_t *ctx, bool force) {
|
||||||
Elf32_Ehdr_t *ehdr;
|
Elf32_Ehdr_t *ehdr;
|
||||||
Elf32_Shdr_t *shdrs = NULL;
|
Elf32_Shdr_t *shdrs = NULL;
|
||||||
uint8_t *shstr = NULL;
|
uint8_t *shstr = NULL;
|
||||||
struct version_information_t *vi = NULL;
|
struct version_information_t *vi = NULL;
|
||||||
int res = PM3_EUNDEF;
|
int res = PM3_EUNDEF;
|
||||||
|
|
||||||
fd = fopen(ctx->filename, "rb");
|
fd = fopen(ctx->filename, "rb");
|
||||||
|
@ -346,7 +346,7 @@ int flash_load(flash_file_t *ctx, bool force) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcmp(((char *)shstr) + shdrs[i].sh_name, ".bootphase1") == 0) {
|
if (strcmp(((char *)shstr) + shdrs[i].sh_name, ".bootphase1") == 0) {
|
||||||
uint32_t offset = *(uint32_t*)(ctx->elf + le32(shdrs[i].sh_offset) + le32(shdrs[i].sh_size) - 4);
|
uint32_t offset = *(uint32_t *)(ctx->elf + le32(shdrs[i].sh_offset) + le32(shdrs[i].sh_size) - 4);
|
||||||
if (offset >= le32(shdrs[i].sh_addr)) {
|
if (offset >= le32(shdrs[i].sh_addr)) {
|
||||||
offset -= le32(shdrs[i].sh_addr);
|
offset -= le32(shdrs[i].sh_addr);
|
||||||
if (offset < le32(shdrs[i].sh_size)) {
|
if (offset < le32(shdrs[i].sh_size)) {
|
||||||
|
|
|
@ -10910,6 +10910,6 @@
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"commands_extracted": 688,
|
"commands_extracted": 688,
|
||||||
"extracted_by": "PM3Help2JSON v1.00",
|
"extracted_by": "PM3Help2JSON v1.00",
|
||||||
"extracted_on": "2022-02-24T18:33:33"
|
"extracted_on": "2022-02-27T15:27:46"
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue