From ffd03dadaae9b2a7fa3f0571c266b498e282f49d Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Thu, 19 Sep 2019 10:48:32 +0200 Subject: [PATCH] style --- client/cmdlfawid.c | 6 +++--- client/cmdlffdx.c | 6 +++--- client/cmdlfguard.c | 6 +++--- client/cmdlfindala.c | 32 ++++++++++++++++---------------- client/cmdlfio.c | 10 +++++----- client/cmdlfjablotron.c | 10 +++++----- client/cmdlfkeri.c | 10 +++++----- 7 files changed, 40 insertions(+), 40 deletions(-) diff --git a/client/cmdlfawid.c b/client/cmdlfawid.c index 934335c64..056d95af4 100644 --- a/client/cmdlfawid.c +++ b/client/cmdlfawid.c @@ -442,15 +442,15 @@ static int CmdAWIDClone(const char *Cmd) { if (i == 0) { SetConfigWithBlock0(blocks[0]); - if ( t55xxAquireAndCompareBlock0(false, 0, blocks[0], false) ) + if (t55xxAquireAndCompareBlock0(false, 0, blocks[0], false)) continue; } - + if (t55xxVerifyWrite(i, 0, false, false, 0, 0xFF, blocks[i]) == false) res++; } - if ( res == 0 ) + if (res == 0) PrintAndLogEx(SUCCESS, "Success writing to tag"); return PM3_SUCCESS; diff --git a/client/cmdlffdx.c b/client/cmdlffdx.c index 233783b33..85529609d 100644 --- a/client/cmdlffdx.c +++ b/client/cmdlffdx.c @@ -323,15 +323,15 @@ static int CmdFdxClone(const char *Cmd) { if (i == 0) { SetConfigWithBlock0(blocks[0]); - if ( t55xxAquireAndCompareBlock0(false, 0, blocks[0], false) ) + if (t55xxAquireAndCompareBlock0(false, 0, blocks[0], false)) continue; } - + if (t55xxVerifyWrite(i, 0, false, false, 0, 0xFF, blocks[i]) == false) res++; } - if ( res == 0 ) + if (res == 0) PrintAndLogEx(SUCCESS, "Success writing to tag"); return PM3_SUCCESS; diff --git a/client/cmdlfguard.c b/client/cmdlfguard.c index 036597f0f..fe00d1187 100644 --- a/client/cmdlfguard.c +++ b/client/cmdlfguard.c @@ -210,15 +210,15 @@ static int CmdGuardClone(const char *Cmd) { if (i == 0) { SetConfigWithBlock0(blocks[0]); - if ( t55xxAquireAndCompareBlock0(false, 0, blocks[0], false) ) + if (t55xxAquireAndCompareBlock0(false, 0, blocks[0], false)) continue; } - + if (t55xxVerifyWrite(i, 0, false, false, 0, 0xFF, blocks[i]) == false) res++; } - if ( res == 0 ) + if (res == 0) PrintAndLogEx(SUCCESS, "Success writing to tag"); return PM3_SUCCESS; diff --git a/client/cmdlfindala.c b/client/cmdlfindala.c index da13766db..673ed1438 100644 --- a/client/cmdlfindala.c +++ b/client/cmdlfindala.c @@ -444,7 +444,7 @@ static int CmdIndalaSim(const char *Cmd) { static int CmdIndalaClone(const char *Cmd) { bool isLongUid = false; - uint32_t blocks[8] = {0}; + uint32_t blocks[8] = {0}; uint8_t max = 0; uint8_t data[7 * 4]; @@ -470,17 +470,17 @@ static int CmdIndalaClone(const char *Cmd) { CLIGetHexWithReturn(2, data, &datalen); CLIParserFree(); -/* - //TODO add selection of chip for Q5 or T55x7 - - // data[0] = T5555_SET_BITRATE(32 | T5555_MODULATION_PSK2 | 7 << T5555_MAXBLOCK_SHIFT; - //Alternative config for Indala (Extended mode;RF/32;PSK1 with RF/2;Maxblock=7;Inverse data) - // T5567WriteBlock(0x603E10E2,0); - - // data[0] = T5555_SET_BITRATE(32 | T5555_MODULATION_PSK1 | 2 << T5555_MAXBLOCK_SHIFT; - //Alternative config for Indala (Extended mode;RF/32;PSK1 with RF/2;Maxblock=2;Inverse data) - // T5567WriteBlock(0x603E1042,0); -*/ + /* + //TODO add selection of chip for Q5 or T55x7 + + // data[0] = T5555_SET_BITRATE(32 | T5555_MODULATION_PSK2 | 7 << T5555_MAXBLOCK_SHIFT; + //Alternative config for Indala (Extended mode;RF/32;PSK1 with RF/2;Maxblock=7;Inverse data) + // T5567WriteBlock(0x603E10E2,0); + + // data[0] = T5555_SET_BITRATE(32 | T5555_MODULATION_PSK1 | 2 << T5555_MAXBLOCK_SHIFT; + //Alternative config for Indala (Extended mode;RF/32;PSK1 with RF/2;Maxblock=2;Inverse data) + // T5567WriteBlock(0x603E1042,0); + */ if (isLongUid) { // config for Indala (RF/32;PSK2 with RF/2;Maxblock=7) @@ -495,7 +495,7 @@ static int CmdIndalaClone(const char *Cmd) { blocks[7] = bytes_to_num(data + 24, 4); max = 8; } else { - // config for Indala 64 format (RF/32;PSK1 with RF/2;Maxblock=2) + // config for Indala 64 format (RF/32;PSK1 with RF/2;Maxblock=2) PrintAndLogEx(INFO, "Preparing to clone Indala 64bit tag with RawID %s", sprint_hex(data, datalen)); blocks[0] = T55x7_BITRATE_RF_32 | T55x7_MODULATION_PSK1 | (2 << T55x7_MAXBLOCK_SHIFT); blocks[1] = bytes_to_num(data, 4); @@ -530,15 +530,15 @@ static int CmdIndalaClone(const char *Cmd) { if (i == 0) { SetConfigWithBlock0(blocks[0]); - if ( t55xxAquireAndCompareBlock0(false, 0, blocks[0], false) ) + if (t55xxAquireAndCompareBlock0(false, 0, blocks[0], false)) continue; } - + if (t55xxVerifyWrite(i, 0, false, false, 0, 0xFF, blocks[i]) == false) res++; } - if ( res == 0 ) + if (res == 0) PrintAndLogEx(SUCCESS, "Success writing to tag"); return PM3_SUCCESS; diff --git a/client/cmdlfio.c b/client/cmdlfio.c index b71302ea9..7b3e777c6 100644 --- a/client/cmdlfio.c +++ b/client/cmdlfio.c @@ -269,7 +269,7 @@ static int CmdIOProxClone(const char *Cmd) { } uint32_t blocks[3] = {T55x7_MODULATION_FSK2a | T55x7_BITRATE_RF_64 | 2 << T55x7_MAXBLOCK_SHIFT, 0, 0}; - + if (tolower(param_getchar(Cmd, 3) == 'q')) blocks[0] = T5555_MODULATION_FSK2 | T5555_INVERT_OUTPUT | T5555_SET_BITRATE(64) | 2 << T5555_MAXBLOCK_SHIFT; @@ -304,17 +304,17 @@ static int CmdIOProxClone(const char *Cmd) { if (i == 0) { SetConfigWithBlock0(blocks[0]); - if ( t55xxAquireAndCompareBlock0(false, 0, blocks[0], false) ) + if (t55xxAquireAndCompareBlock0(false, 0, blocks[0], false)) continue; } - + if (t55xxVerifyWrite(i, 0, false, false, 0, 0xFF, blocks[i]) == false) res++; } - if ( res == 0 ) + if (res == 0) PrintAndLogEx(SUCCESS, "Success writing to tag"); - + return PM3_SUCCESS; } diff --git a/client/cmdlfjablotron.c b/client/cmdlfjablotron.c index 919610293..13a1d6e1f 100644 --- a/client/cmdlfjablotron.c +++ b/client/cmdlfjablotron.c @@ -197,17 +197,17 @@ static int CmdJablotronClone(const char *Cmd) { if (i == 0) { SetConfigWithBlock0(blocks[0]); - if ( t55xxAquireAndCompareBlock0(false, 0, blocks[0], false) ) + if (t55xxAquireAndCompareBlock0(false, 0, blocks[0], false)) continue; } - + if (t55xxVerifyWrite(i, 0, false, false, 0, 0xFF, blocks[i]) == false) - res++; + res++; } - if ( res == 0 ) + if (res == 0) PrintAndLogEx(SUCCESS, "Success writing to tag"); - + return PM3_SUCCESS; } diff --git a/client/cmdlfkeri.c b/client/cmdlfkeri.c index 9f01f2f7f..49d3c2a33 100644 --- a/client/cmdlfkeri.c +++ b/client/cmdlfkeri.c @@ -186,17 +186,17 @@ static int CmdKeriClone(const char *Cmd) { if (i == 0) { SetConfigWithBlock0(blocks[0]); - if ( t55xxAquireAndCompareBlock0(false, 0, blocks[0], false) ) + if (t55xxAquireAndCompareBlock0(false, 0, blocks[0], false)) continue; } - + if (t55xxVerifyWrite(i, 0, false, false, 0, 0xFF, blocks[i]) == false) - res++; + res++; } - if ( res == 0 ) + if (res == 0) PrintAndLogEx(SUCCESS, "Success writing to tag"); - + return PM3_SUCCESS; }