And make style

This commit is contained in:
AloneLiberty committed 2023-03-26 18:05:11 +03:00
1 parent 9a4c363549
commit d10d8c0039
4 files changed
+9 -9

No files matched your search

+1 -1
View File
@@ -497,7 +497,7 @@ void MifareWriteBlock(uint8_t arg0, uint8_t arg1, uint8_t *datain) {
retval = 1; retval = 1;
OUT: OUT:
crypto1_deinit(pcs); crypto1_deinit(pcs);
reply_mix(CMD_ACK, retval, 0, 0, 0, 0); reply_mix(CMD_ACK, retval, 0, 0, 0, 0);
+1 -1
View File
@@ -183,7 +183,7 @@ int mifare_classic_authex_2(struct Crypto1State *pcs, uint32_t uid, uint8_t bloc
// Generate (encrypted) nr+parity by loading it into the cipher (Nr) // Generate (encrypted) nr+parity by loading it into the cipher (Nr)
uint32_t pos; uint32_t pos;
uint8_t par[1] = {0x00}; uint8_t par[1] = {0x00};
uint8_t mf_nr_ar[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; uint8_t mf_nr_ar[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
for (pos = 0; pos < 4; pos++) { for (pos = 0; pos < 4; pos++) {
mf_nr_ar[pos] = crypto1_byte(pcs, nr[pos], 0) ^ nr[pos]; mf_nr_ar[pos] = crypto1_byte(pcs, nr[pos], 0) ^ nr[pos];
+5 -5
View File
@@ -633,7 +633,7 @@ static int CmdHF14AMfWrBl(const char *Cmd) {
PrintAndLogEx(SUCCESS, "Write ( " _GREEN_("ok") " )"); PrintAndLogEx(SUCCESS, "Write ( " _GREEN_("ok") " )");
PrintAndLogEx(HINT, "try `" _YELLOW_("hf mf rdbl") "` to verify"); PrintAndLogEx(HINT, "try `" _YELLOW_("hf mf rdbl") "` to verify");
} else if (status == PM3_ETEAROFF) { } else if (status == PM3_ETEAROFF) {
return status; return status;
} else { } else {
PrintAndLogEx(FAILED, "Write ( " _RED_("fail") " )"); PrintAndLogEx(FAILED, "Write ( " _RED_("fail") " )");
// suggest the opposite keytype than what was used. // suggest the opposite keytype than what was used.
@@ -7855,7 +7855,7 @@ static int CmdHF14AGen4_GDM_SetBlk(const char *Cmd) {
PrintAndLogEx(HINT, "try `" _YELLOW_("hf mf rdbl") "` to verify"); PrintAndLogEx(HINT, "try `" _YELLOW_("hf mf rdbl") "` to verify");
} else if (resp.status == PM3_ETEAROFF) { } else if (resp.status == PM3_ETEAROFF) {
return resp.status; return resp.status;
} else { } else {
PrintAndLogEx(FAILED, "Write ( " _RED_("fail") " )"); PrintAndLogEx(FAILED, "Write ( " _RED_("fail") " )");
PrintAndLogEx(HINT, "Maybe access rights? Try specify keytype `" _YELLOW_("hf mf gdmsetblk -%c ...") "` instead", (keytype == MF_KEY_A) ? 'b' : 'a'); PrintAndLogEx(HINT, "Maybe access rights? Try specify keytype `" _YELLOW_("hf mf gdmsetblk -%c ...") "` instead", (keytype == MF_KEY_A) ? 'b' : 'a');
} }
@@ -8007,7 +8007,7 @@ static int CmdHF14AMfValue(const char *Cmd) {
} }
if (resp.oldarg[0] & 0xFF) { if (resp.oldarg[0] & 0xFF) {
// all ok so set flag to read current value // all ok so set flag to read current value
getval = true; getval = true;
PrintAndLogEx(SUCCESS, "Update ( " _GREEN_("success") " )"); PrintAndLogEx(SUCCESS, "Update ( " _GREEN_("success") " )");
} else { } else {
@@ -8040,7 +8040,7 @@ static int CmdHF14AMfValue(const char *Cmd) {
} }
int status = resp.oldarg[0]; int status = resp.oldarg[0];
if (status) { if (status) {
// all ok so set flag to read current value // all ok so set flag to read current value
getval = true; getval = true;
PrintAndLogEx(SUCCESS, "Update ( " _GREEN_("success") " )"); PrintAndLogEx(SUCCESS, "Update ( " _GREEN_("success") " )");
} else if (status == PM3_ETEAROFF) { } else if (status == PM3_ETEAROFF) {
@@ -8137,7 +8137,7 @@ static command_t CommandTable[] = {
{"gsave", CmdHF14AGen4Save, IfPm3Iso14443a, "Save dump from card into file or emulator"}, {"gsave", CmdHF14AGen4Save, IfPm3Iso14443a, "Save dump from card into file or emulator"},
{"gsetblk", CmdHF14AGen4SetBlk, IfPm3Iso14443a, "Write block to card"}, {"gsetblk", CmdHF14AGen4SetBlk, IfPm3Iso14443a, "Write block to card"},
{"gview", CmdHF14AGen4View, IfPm3Iso14443a, "View card"}, {"gview", CmdHF14AGen4View, IfPm3Iso14443a, "View card"},
{"-----------", CmdHelp, IfPm3Iso14443a, "-------------------- " _CYAN_("magic gen4 GDM") " --------------------------"}, {"-----------", CmdHelp, IfPm3Iso14443a, "-------------------- " _CYAN_("magic gen4 GDM") " --------------------------"},
{"gdmcfg", CmdHF14AGen4_GDM_Cfg, IfPm3Iso14443a, "Read config block from card"}, {"gdmcfg", CmdHF14AGen4_GDM_Cfg, IfPm3Iso14443a, "Read config block from card"},
{"gdmsetcfg", CmdHF14AGen4_GDM_SetCfg, IfPm3Iso14443a, "Write config block to card"}, {"gdmsetcfg", CmdHF14AGen4_GDM_SetCfg, IfPm3Iso14443a, "Write config block to card"},
{"gdmsetblk", CmdHF14AGen4_GDM_SetBlk, IfPm3Iso14443a, "Write block to card"}, {"gdmsetblk", CmdHF14AGen4_GDM_SetBlk, IfPm3Iso14443a, "Write block to card"},
+2 -2
View File
@@ -4889,7 +4889,7 @@
"offline": false, "offline": false,
"options": [ "options": [
"-h, --help This help", "-h, --help This help",
"-r, --reset reset card", "-r, --reset Reset card",
"-u, --uid <hex> New UID (4 hex bytes)" "-u, --uid <hex> New UID (4 hex bytes)"
], ],
"usage": "hf mf supercard [-hr] [-u <hex>]" "usage": "hf mf supercard [-hr] [-u <hex>]"
@@ -11989,6 +11989,6 @@
"metadata": { "metadata": {
"commands_extracted": 754, "commands_extracted": 754,
"extracted_by": "PM3Help2JSON v1.00", "extracted_by": "PM3Help2JSON v1.00",
"extracted_on": "2023-03-26T13:15:37" "extracted_on": "2023-03-26T15:04:49"
} }
} }