From d10d8c00396d571dcdd426932afbc0b73e8eefa9 Mon Sep 17 00:00:00 2001 From: AloneLiberty <111039319+AloneLiberty@users.noreply.github.com> Date: Sun, 26 Mar 2023 18:05:11 +0300 Subject: [PATCH] And make style --- armsrc/mifarecmd.c | 2 +- armsrc/mifareutil.c | 2 +- client/src/cmdhfmf.c | 10 +++++----- doc/commands.json | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/armsrc/mifarecmd.c b/armsrc/mifarecmd.c index feabf15a1..a1c86c2e8 100644 --- a/armsrc/mifarecmd.c +++ b/armsrc/mifarecmd.c @@ -497,7 +497,7 @@ void MifareWriteBlock(uint8_t arg0, uint8_t arg1, uint8_t *datain) { retval = 1; -OUT: +OUT: crypto1_deinit(pcs); reply_mix(CMD_ACK, retval, 0, 0, 0, 0); diff --git a/armsrc/mifareutil.c b/armsrc/mifareutil.c index b11625339..6f04cc3e7 100644 --- a/armsrc/mifareutil.c +++ b/armsrc/mifareutil.c @@ -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) 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 }; for (pos = 0; pos < 4; pos++) { mf_nr_ar[pos] = crypto1_byte(pcs, nr[pos], 0) ^ nr[pos]; diff --git a/client/src/cmdhfmf.c b/client/src/cmdhfmf.c index 7b50a1a9e..5703afad4 100644 --- a/client/src/cmdhfmf.c +++ b/client/src/cmdhfmf.c @@ -633,7 +633,7 @@ static int CmdHF14AMfWrBl(const char *Cmd) { PrintAndLogEx(SUCCESS, "Write ( " _GREEN_("ok") " )"); PrintAndLogEx(HINT, "try `" _YELLOW_("hf mf rdbl") "` to verify"); } else if (status == PM3_ETEAROFF) { - return status; + return status; } else { PrintAndLogEx(FAILED, "Write ( " _RED_("fail") " )"); // 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"); } else if (resp.status == PM3_ETEAROFF) { return resp.status; - } else { + } else { 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'); } @@ -8007,7 +8007,7 @@ static int CmdHF14AMfValue(const char *Cmd) { } 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; PrintAndLogEx(SUCCESS, "Update ( " _GREEN_("success") " )"); } else { @@ -8040,7 +8040,7 @@ static int CmdHF14AMfValue(const char *Cmd) { } int status = resp.oldarg[0]; if (status) { - // all ok so set flag to read current value + // all ok so set flag to read current value getval = true; PrintAndLogEx(SUCCESS, "Update ( " _GREEN_("success") " )"); } else if (status == PM3_ETEAROFF) { @@ -8137,7 +8137,7 @@ static command_t CommandTable[] = { {"gsave", CmdHF14AGen4Save, IfPm3Iso14443a, "Save dump from card into file or emulator"}, {"gsetblk", CmdHF14AGen4SetBlk, IfPm3Iso14443a, "Write block to 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"}, {"gdmsetcfg", CmdHF14AGen4_GDM_SetCfg, IfPm3Iso14443a, "Write config block to card"}, {"gdmsetblk", CmdHF14AGen4_GDM_SetBlk, IfPm3Iso14443a, "Write block to card"}, diff --git a/doc/commands.json b/doc/commands.json index 3a59e6f7c..703ff688c 100644 --- a/doc/commands.json +++ b/doc/commands.json @@ -4889,7 +4889,7 @@ "offline": false, "options": [ "-h, --help This help", - "-r, --reset reset card", + "-r, --reset Reset card", "-u, --uid New UID (4 hex bytes)" ], "usage": "hf mf supercard [-hr] [-u ]" @@ -11989,6 +11989,6 @@ "metadata": { "commands_extracted": 754, "extracted_by": "PM3Help2JSON v1.00", - "extracted_on": "2023-03-26T13:15:37" + "extracted_on": "2023-03-26T15:04:49" } } \ No newline at end of file