make style

This commit is contained in:
Philippe Teuwen
2019-03-11 23:12:31 +01:00
parent 842e321cdb
commit 346af6e3d1
5 changed files with 29 additions and 32 deletions

View File

@@ -42,7 +42,7 @@ int CmdHFSearch(const char *Cmd) {
if (cmdp == 'h') return usage_hf_search();
PrintAndLogEx(INFO, "Checking for known tags...\n");
int ans = CmdHF14AInfo("s");
if (ans > 0) {
PrintAndLogEx(SUCCESS, "\nValid " _GREEN_("ISO14443-A tag") " found\n");

View File

@@ -216,7 +216,7 @@ int CmdFlexdemod(const char *Cmd) {
}
if (start == size - LONG_WAIT) {
PrintAndLogEx(WARNING, "nothing to wait for");
PrintAndLogEx(WARNING, "nothing to wait for");
return 0;
}
@@ -839,12 +839,12 @@ bool CheckChipType(bool getDeviceData) {
//check for t55xx chip...
if (tryDetectP1(true)) {
PrintAndLogEx(SUCCESS, "\nChipset detection : " _GREEN_("Atmel T55xx") " found");
PrintAndLogEx(SUCCESS, "\nChipset detection : " _GREEN_("Atmel T55xx") " found");
PrintAndLogEx(SUCCESS, "Try " _YELLOW_("`lf t55xx`")" commands");
retval = true;
goto out;
}
out:
save_restoreGB(GRAPH_RESTORE);
save_restoreDB(GRAPH_RESTORE);
@@ -945,19 +945,19 @@ int CmdLFfind(const char *Cmd) {
bool st = true;
if (ASKDemod_ext("0 0 0", true, false, 1, &st)) {
PrintAndLogEx(NORMAL, "\nUnknown ASK Modulated and Manchester encoded Tag found!");
PrintAndLogEx(NORMAL, "if it does not look right it could instead be ASK/Biphase - try " _YELLOW_("'data rawdemod ab'") );
PrintAndLogEx(NORMAL, "if it does not look right it could instead be ASK/Biphase - try " _YELLOW_("'data rawdemod ab'"));
goto out;
}
if (CmdPSK1rawDemod("")) {
PrintAndLogEx(NORMAL, "Possible unknown PSK1 Modulated Tag found above!");
PrintAndLogEx(NORMAL, " Could also be PSK2 - try " _YELLOW_("'data rawdemod p2'") );
PrintAndLogEx(NORMAL, " Could also be PSK2 - try " _YELLOW_("'data rawdemod p2'"));
PrintAndLogEx(NORMAL, " Could also be PSK3 - [currently not supported]");
PrintAndLogEx(NORMAL, " Could also be NRZ - try " _YELLOW_("'data rawdemod nr") );
PrintAndLogEx(NORMAL, " Could also be NRZ - try " _YELLOW_("'data rawdemod nr"));
goto out;
}
PrintAndLogEx(FAILED, _RED_("\nNo data found!") );
PrintAndLogEx(FAILED, _RED_("\nNo data found!"));
}
out:
// identify chipset

View File

@@ -29,8 +29,7 @@ size_t nbytes(size_t nbits) {
return (nbits / 8) + ((nbits % 8) > 0);
}
int usage_hitag_reader(void)
{
int usage_hitag_reader(void) {
PrintAndLogEx(NORMAL, "Usage: lf hitag reader [h] <reader function #>");
PrintAndLogEx(NORMAL, "Options:");
PrintAndLogEx(NORMAL, " h This help");
@@ -43,7 +42,7 @@ int usage_hitag_reader(void)
PrintAndLogEx(NORMAL, " 22 <nr> <ar> Authentication");
PrintAndLogEx(NORMAL, " 23 <key> Authentication, key is in format: ISK high + ISK low");
PrintAndLogEx(NORMAL, " 25 Test recorded authentications");
PrintAndLogEx(NORMAL, " 26 Just read UID");
PrintAndLogEx(NORMAL, " 26 Just read UID");
return 0;
}
@@ -228,25 +227,25 @@ int CmdLFHitagReader(const char *Cmd) {
c.cmd = CMD_READ_HITAG_S;
num_to_bytes(param_get32ex(Cmd, 1, 0, 16), 4, htd->auth.NrAr);
num_to_bytes(param_get32ex(Cmd, 2, 0, 16), 4, htd->auth.NrAr + 4);
break;
break;
}
case RHTSF_KEY: {
c.cmd = CMD_READ_HITAG_S;
num_to_bytes(param_get64ex(Cmd, 1, 0, 16), 6, htd->crypto.key);
break;
break;
}
case RHT2F_PASSWORD: {
num_to_bytes(param_get32ex(Cmd, 1, 0, 16), 4, htd->pwd.password);
break;
break;
}
case RHT2F_AUTHENTICATE: {
num_to_bytes(param_get32ex(Cmd, 1, 0, 16), 4, htd->auth.NrAr);
num_to_bytes(param_get32ex(Cmd, 2, 0, 16), 4, htd->auth.NrAr + 4);
break;
break;
}
case RHT2F_CRYPTO: {
num_to_bytes(param_get64ex(Cmd, 1, 0, 16), 6, htd->crypto.key);
break;
break;
}
case RHT2F_TEST_AUTH_ATTEMPTS: {
// No additional parameters needed