make style
This commit is contained in:
1 parent
e37a1a81ec
commit
0d38da5de2
14 files changed
+205
-75
No files matched your search
@@ -1391,7 +1391,7 @@ static int CmdHF15Dump(const char *Cmd) {
|
||||
retry = 0;
|
||||
blocknum++;
|
||||
|
||||
PrintAndLogEx(INPLACE, "blk %3d", blocknum );
|
||||
PrintAndLogEx(INPLACE, "blk %3d", blocknum);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ static int CmdHFKSX6924Balance(const char *Cmd) {
|
||||
CLIParserFree(ctx);
|
||||
SetAPDULogging(APDULogging);
|
||||
|
||||
if ( KSX6924TrySelect()) {
|
||||
if (KSX6924TrySelect()) {
|
||||
get_and_print_balance();
|
||||
}
|
||||
|
||||
@@ -272,7 +272,7 @@ static int CmdHFKSX6924Initialize(const char *Cmd) {
|
||||
PrintAndLogEx(SUCCESS, "Initialize Card : Mpda -> %02X %02X %02X %02X", data[0], data[1], data[2], data[3]);
|
||||
|
||||
uint8_t response[25] = {0};
|
||||
if (KSX6924InitializeCard(data[0], data[1], data[2], data[3], response) ) {
|
||||
if (KSX6924InitializeCard(data[0], data[1], data[2], data[3], response)) {
|
||||
PrintAndLogEx(SUCCESS, "Response : %s", sprint_hex(response, sizeof(response)));
|
||||
} else {
|
||||
PrintAndLogEx(FAILED, "Initialize Card Error");
|
||||
|
||||
+3
-3
@@ -288,14 +288,14 @@ int CmdLFCommandRead(const char *Cmd) {
|
||||
uint8_t n = 0;
|
||||
crc_init_ref(&crc, 8, 0x1d, 0xff, 0, false, false);
|
||||
uint8_t i;
|
||||
for (i=0;i<cmd_len;i++) {
|
||||
for (i = 0; i < cmd_len; i++) {
|
||||
if ((cmd[i] != '0') && (cmd[i] != '1')) {
|
||||
continue;
|
||||
}
|
||||
data <<= 1;
|
||||
data += cmd[i] - '0';
|
||||
n += 1;
|
||||
if (n==8) {
|
||||
if (n == 8) {
|
||||
crc_update2(&crc, data, n);
|
||||
n = 0;
|
||||
data = 0;
|
||||
@@ -305,7 +305,7 @@ int CmdLFCommandRead(const char *Cmd) {
|
||||
crc_update2(&crc, data, n);
|
||||
}
|
||||
uint8_t crc_final = crc_finish(&crc);
|
||||
for (int j=7; j>=0; j--) {
|
||||
for (int j = 7; j >= 0; j--) {
|
||||
cmd[cmd_len] = ((crc_final >> j) & 1) ? '1' : '0';
|
||||
cmd_len++;
|
||||
}
|
||||
|
||||
@@ -216,6 +216,12 @@ const static vocabulory_t vocabulory[] = {
|
||||
{ 0, "hf fido auth" },
|
||||
{ 0, "hf fido make" },
|
||||
{ 0, "hf fido assert" },
|
||||
{ 1, "hf ksx6924 help" },
|
||||
{ 0, "hf ksx6924 balance" },
|
||||
{ 0, "hf ksx6924 info" },
|
||||
{ 0, "hf ksx6924 initialize" },
|
||||
{ 0, "hf ksx6924 prec" },
|
||||
{ 0, "hf ksx6924 select" },
|
||||
{ 1, "hf jooki help" },
|
||||
{ 0, "hf jooki clone" },
|
||||
{ 1, "hf jooki decode" },
|
||||
@@ -635,6 +641,9 @@ const static vocabulory_t vocabulory[] = {
|
||||
{ 0, "lf visa2000 reader" },
|
||||
{ 0, "lf visa2000 clone" },
|
||||
{ 0, "lf visa2000 sim" },
|
||||
{ 1, "lf zx help" },
|
||||
{ 1, "lf zx demod" },
|
||||
{ 0, "lf zx reader" },
|
||||
{ 1, "mem help" },
|
||||
{ 0, "mem baudrate" },
|
||||
{ 0, "mem dump" },
|
||||
|
||||
Reference in new issue
Block a user