This commit is contained in:
iceman1001 2019-02-24 17:25:47 +01:00
commit 92631bdfb4

View file

@ -443,14 +443,14 @@ int CmdEM410xSim(const char *Cmd) {
uint8_t clock = 64; uint8_t clock = 64;
if (param_gethex(Cmd, 0, uid, 10)) { if (param_gethex(Cmd, 0, uid, 10)) {
PrintAndLogEx(NORMAL, "UID must include 10 HEX symbols"); PrintAndLogEx(FAILED, "UID must include 10 HEX symbols");
return 0; return 0;
} }
param_getdec(Cmd, 1, &clock); param_getdec(Cmd, 1, &clock);
PrintAndLogEx(NORMAL, "Starting simulating UID %02X%02X%02X%02X%02X clock: %d", uid[0],uid[1],uid[2],uid[3],uid[4],clock); PrintAndLogEx(SUCCESS, "Starting simulating UID %02X%02X%02X%02X%02X clock: %d", uid[0],uid[1],uid[2],uid[3],uid[4],clock);
PrintAndLogEx(NORMAL, "Press pm3-button to abort simulation"); PrintAndLogEx(SUCCESS, "Press pm3-button to abort simulation");
ConstructEM410xEmulGraph(Cmd, clock); ConstructEM410xEmulGraph(Cmd, clock);
@ -508,7 +508,7 @@ int CmdEM410xBrute(const char *Cmd) {
if( buf[0]=='#' ) continue; if( buf[0]=='#' ) continue;
if (param_gethex(buf, 0, uid, 10)) { if (param_gethex(buf, 0, uid, 10)) {
PrintAndLogEx(NORMAL, "UIDs must include 10 HEX symbols"); PrintAndLogEx(FAILED, "UIDs must include 10 HEX symbols");
free(uidBlock); free(uidBlock);
fclose(f); fclose(f);
return 1; return 1;
@ -535,11 +535,12 @@ int CmdEM410xBrute(const char *Cmd) {
fclose(f); fclose(f);
if (uidcnt == 0) { if (uidcnt == 0) {
PrintAndLogEx(NORMAL, "No UIDs found in file"); PrintAndLogEx(FAILED, "No UIDs found in file");
free(uidBlock); free(uidBlock);
return 1; return 1;
} }
PrintAndLogEx(NORMAL, "Loaded %d UIDs from %s, pause delay: %d ms", uidcnt, filename, delay);
PrintAndLogEx(SUCCESS, "Loaded %d UIDs from %s, pause delay: %d ms", uidcnt, filename, delay);
// loop // loop
for(uint32_t c = 0; c < uidcnt; ++c ) { for(uint32_t c = 0; c < uidcnt; ++c ) {
@ -599,7 +600,7 @@ int CmdEM410xWatchnSpoof(const char *Cmd) {
// loops if the captured ID was in XL-format. // loops if the captured ID was in XL-format.
CmdEM410xWatch(Cmd); CmdEM410xWatch(Cmd);
PrintAndLogEx(NORMAL, "# Replaying captured ID: %010" PRIx64 , g_em410xid); PrintAndLogEx(SUCCESS, "# Replaying captured ID: %010" PRIx64 , g_em410xid);
CmdLFaskSim(""); CmdLFaskSim("");
return 0; return 0;
} }
@ -645,17 +646,17 @@ int CmdEM410xWrite(const char *Cmd) {
} }
if (card == 1) { if (card == 1) {
PrintAndLogEx(NORMAL, "Writing %s tag with UID 0x%010" PRIx64 " (clock rate: %d)", "T55x7", id, clock); PrintAndLogEx(SUCCESS, "Writing %s tag with UID 0x%010" PRIx64 " (clock rate: %d)", "T55x7", id, clock);
// NOTE: We really should pass the clock in as a separate argument, but to // NOTE: We really should pass the clock in as a separate argument, but to
// provide for backwards-compatibility for older firmware, and to avoid // provide for backwards-compatibility for older firmware, and to avoid
// having to add another argument to CMD_EM410X_WRITE_TAG, we just store // having to add another argument to CMD_EM410X_WRITE_TAG, we just store
// the clock rate in bits 8-15 of the card value // the clock rate in bits 8-15 of the card value
card = (card & 0xFF) | ((clock << 8) & 0xFF00); card = (card & 0xFF) | ((clock << 8) & 0xFF00);
} else if (card == 0) { } else if (card == 0) {
PrintAndLogEx(NORMAL, "Writing %s tag with UID 0x%010" PRIx64, "T5555", id, clock); PrintAndLogEx(SUCCESS, "Writing %s tag with UID 0x%010" PRIx64, "T5555", id, clock);
card = (card & 0xFF) | ((clock << 8) & 0xFF00); card = (card & 0xFF) | ((clock << 8) & 0xFF00);
} else { } else {
PrintAndLogEx(WARNING, "Error! Bad card type selected.\n"); PrintAndLogEx(FAILED, "Error! Bad card type selected.\n");
return 0; return 0;
} }