diff --git a/client/src/cmdlf.c b/client/src/cmdlf.c index 0d3703808..748c9557a 100644 --- a/client/src/cmdlf.c +++ b/client/src/cmdlf.c @@ -1276,16 +1276,16 @@ int CmdLFfind(const char *Cmd) { if (demodAWID() == PM3_SUCCESS) { PrintAndLogEx(SUCCESS, "\nValid " _GREEN_("AWID ID") " found!"); goto out;} if (demodIOProx() == PM3_SUCCESS) { PrintAndLogEx(SUCCESS, "\nValid " _GREEN_("IO Prox ID") " found!"); goto out;} if (demodParadox() == PM3_SUCCESS) { PrintAndLogEx(SUCCESS, "\nValid " _GREEN_("Paradox ID") " found!"); goto out;} - + if (demodNexWatch() == PM3_SUCCESS) { PrintAndLogEx(SUCCESS, "\nValid " _GREEN_("NexWatch ID") " found!"); goto out;} + if (demodIndala() == PM3_SUCCESS) { PrintAndLogEx(SUCCESS, "\nValid " _GREEN_("Indala ID") " found!"); goto out;} + if (demodEM410x() == PM3_SUCCESS) { PrintAndLogEx(SUCCESS, "\nValid " _GREEN_("EM410x ID") " found!"); goto out;} if (demodFDX() == PM3_SUCCESS) { PrintAndLogEx(SUCCESS, "\nValid " _GREEN_("FDX-B ID") " found!"); goto out;} if (demodGuard() == PM3_SUCCESS) { PrintAndLogEx(SUCCESS, "\nValid " _GREEN_("Guardall G-Prox II ID") " found!"); goto out; } if (demodIdteck() == PM3_SUCCESS) { PrintAndLogEx(SUCCESS, "\nValid " _GREEN_("Idteck ID") " found!"); goto out;} - if (demodIndala() == PM3_SUCCESS) { PrintAndLogEx(SUCCESS, "\nValid " _GREEN_("Indala ID") " found!"); goto out;} if (demodJablotron() == PM3_SUCCESS) { PrintAndLogEx(SUCCESS, "\nValid " _GREEN_("Jablotron ID") " found!"); goto out;} if (demodNedap() == PM3_SUCCESS) { PrintAndLogEx(SUCCESS, "\nValid " _GREEN_("NEDAP ID") " found!"); goto out;} - if (demodNexWatch() == PM3_SUCCESS) { PrintAndLogEx(SUCCESS, "\nValid " _GREEN_("NexWatch ID") " found!"); goto out;} if (demodNoralsy() == PM3_SUCCESS) { PrintAndLogEx(SUCCESS, "\nValid " _GREEN_("Noralsy ID") " found!"); goto out;} if (demodKeri() == PM3_SUCCESS) { PrintAndLogEx(SUCCESS, "\nValid " _GREEN_("KERI ID") " found!"); goto out;} if (demodPac() == PM3_SUCCESS) { PrintAndLogEx(SUCCESS, "\nValid " _GREEN_("PAC/Stanley ID") " found!"); goto out;} diff --git a/client/src/cmdlfjablotron.c b/client/src/cmdlfjablotron.c index 464b6e282..a2859fbb4 100644 --- a/client/src/cmdlfjablotron.c +++ b/client/src/cmdlfjablotron.c @@ -120,7 +120,7 @@ int demodJablotron(void) { uint64_t rawid = ((uint64_t)(bytebits_to_byte(DemodBuffer + 16, 8) & 0xff) << 32) | bytebits_to_byte(DemodBuffer + 24, 32); uint64_t id = getJablontronCardId(rawid); - PrintAndLogEx(SUCCESS, "Jablotron - Card: " _GREEN_("%"PRIx64) ", Raw: %08X%08X", id, raw1, raw2); + PrintAndLogEx(SUCCESS, "Jablotron - Card: " _GREEN_("%"PRIx64) ", Raw: %08X%08X", id, raw1, raw2); uint8_t chksum = raw2 & 0xFF; bool isok = (chksum == jablontron_chksum(DemodBuffer)); diff --git a/client/src/cmdlfmotorola.c b/client/src/cmdlfmotorola.c index 1af4f120c..36777be02 100644 --- a/client/src/cmdlfmotorola.c +++ b/client/src/cmdlfmotorola.c @@ -30,7 +30,12 @@ static int CmdHelp(const char *Cmd); //see PSKDemod for what args are accepted static int CmdMotorolaDemod(const char *Cmd) { + (void)Cmd; + return demodMotorola(); +} +int demodMotorola(void) { + //PSK1 if (PSKDemod("32 1", true) != PM3_SUCCESS) { PrintAndLogEx(DEBUG, "DEBUG: Error - Motorola: PSK Demod failed"); @@ -140,7 +145,7 @@ static int CmdMotorolaRead(const char *Cmd) { sc.divisor = LF_DIVISOR_125; sc.samples_to_skip = 0; lf_config(&sc); - return CmdMotorolaDemod(Cmd); + return demodMotorola(); } static int CmdMotorolaClone(const char *Cmd) { @@ -252,10 +257,6 @@ int detectMotorola(uint8_t *dest, size_t *size) { return (int)start_idx; } -int demodMotorola(void) { - return CmdMotorolaDemod(""); -} - int readMotorolaUid(void) { return (CmdMotorolaRead("") == PM3_SUCCESS); } diff --git a/client/src/cmdlfnedap.c b/client/src/cmdlfnedap.c index da4354a49..ddd734eb3 100644 --- a/client/src/cmdlfnedap.c +++ b/client/src/cmdlfnedap.c @@ -42,6 +42,7 @@ static int usage_lf_nedap_gen(void) { PrintAndLogEx(NORMAL, ""); PrintAndLogEx(NORMAL, "Examples:"); PrintAndLogEx(NORMAL, _YELLOW_(" lf nedap generate s 1 c 123 i 12345")); + PrintAndLogEx(NORMAL, ""); return PM3_SUCCESS; } @@ -59,6 +60,7 @@ static int usage_lf_nedap_clone(void) { PrintAndLogEx(NORMAL, ""); PrintAndLogEx(NORMAL, "Examples:"); PrintAndLogEx(NORMAL, _YELLOW_(" lf nedap clone s 1 c 123 i 12345")); + PrintAndLogEx(NORMAL, ""); return PM3_SUCCESS; } @@ -77,6 +79,7 @@ static int usage_lf_nedap_sim(void) { PrintAndLogEx(NORMAL, "Examples:"); // TODO proper example? PrintAndLogEx(NORMAL, _YELLOW_(" lf nedap sim s 1 c 7 i 1337")); + PrintAndLogEx(NORMAL, ""); return PM3_SUCCESS; } @@ -192,9 +195,9 @@ static int CmdLFNedapDemod(const char *Cmd) { badgeId = r1 * 10000 + r2 * 1000 + r3 * 100 + r4 * 10 + r5; - PrintAndLogEx(SUCCESS, "NEDAP - Card: " _YELLOW_("%05u") " subtype: " _YELLOW_("%1u")" customer code: " _YELLOW_("%03x"), badgeId, subtype, customerCode); - PrintAndLogEx(SUCCESS, "Checksum (%s) 0x%04X", _GREEN_("ok"), checksum); - PrintAndLogEx(SUCCESS, "Raw: %s", sprint_hex(data, size / 8)); + PrintAndLogEx(SUCCESS, "NEDAP - Card: " _YELLOW_("%05u") " subtype: " _YELLOW_("%1u")" customer code: " _YELLOW_("%03x") ", Raw: %s", badgeId, subtype, customerCode, sprint_hex(data, size / 8)); + PrintAndLogEx(DEBUG, "Checksum (%s) 0x%04X", _GREEN_("ok"), checksum); + } else { PrintAndLogEx(ERR, "Invalid idx (1:%02x - 2:%02x - 3:%02x - 4:%02x - 5:%02x)", idxC1, idxC2, idxC3, idxC4, idxC5); ret = PM3_ESOFT; diff --git a/client/src/cmdlfnexwatch.c b/client/src/cmdlfnexwatch.c index fda84b9b6..11541b29c 100644 --- a/client/src/cmdlfnexwatch.c +++ b/client/src/cmdlfnexwatch.c @@ -244,18 +244,16 @@ int demodNexWatch(void) { } PrintAndLogEx(SUCCESS, " 88bit id : " _YELLOW_("%"PRIu32) " (" _YELLOW_("0x%"PRIx32)")", cn, cn); PrintAndLogEx(SUCCESS, " mode : %x", mode); - if (parity == calc_parity) { - PrintAndLogEx(SUCCESS, " parity : %s (0x%X)", _GREEN_("ok"), parity); - } else { - PrintAndLogEx(WARNING, " parity : %s (0x%X != 0x%X)", _RED_("fail"), parity, calc_parity); - } - if (m_idx < ARRAYLEN(items)) { - PrintAndLogEx(SUCCESS, " checksum : %s (0x%02X)", _GREEN_("ok"), chk); - } else { - PrintAndLogEx(WARNING, " checksum : %s (0x%02X)", _RED_("fail"), chk); - } - PrintAndLogEx(INFO, " raw : " _YELLOW_("%"PRIX32"%"PRIX32"%"PRIX32), raw1, raw2, raw3); + if (parity == calc_parity) { + PrintAndLogEx(DEBUG, " parity : %s (0x%X)", _GREEN_("ok"), parity); + } else { + PrintAndLogEx(DEBUG, " parity : %s (0x%X != 0x%X)", _RED_("fail"), parity, calc_parity); + } + + PrintAndLogEx(DEBUG, " checksum : %s (0x%02X)", (m_idx < ARRAYLEN(items)) ? _GREEN_("ok") : _RED_("fail"), chk); + + PrintAndLogEx(INFO, " Raw : " _YELLOW_("%"PRIX32"%"PRIX32"%"PRIX32), raw1, raw2, raw3); return PM3_SUCCESS; } diff --git a/client/src/cmdlfviking.c b/client/src/cmdlfviking.c index 07d80af86..445dbc209 100644 --- a/client/src/cmdlfviking.c +++ b/client/src/cmdlfviking.c @@ -34,6 +34,7 @@ static int usage_lf_viking_clone(void) { PrintAndLogEx(NORMAL, " : specify write to Q5 (t5555 instead of t55x7)"); PrintAndLogEx(NORMAL, ""); PrintAndLogEx(NORMAL, "Examples:"); + PrintAndLogEx(NORMAL, _YELLOW_(" lf viking clone 1A337")); PrintAndLogEx(NORMAL, _YELLOW_(" lf viking clone 1A337 Q5")); return PM3_SUCCESS; }