This commit is contained in:
iceman1001 2020-06-30 18:50:38 +02:00
commit 1ec2a83e39

View file

@ -157,7 +157,6 @@ static void print_result(const em4x50_word_t *words, int fwr, int lwr, bool verb
strcat(string, pstring);
}
} else {
string[0] = '\0';
sprintf(pstring, "[" _GREEN_("+") "] word[%i]: " _YELLOW_("0x"), i);
strcat(string, pstring);
@ -167,7 +166,6 @@ static void print_result(const em4x50_word_t *words, int fwr, int lwr, bool verb
strcat(string, pstring);
}
}
PrintAndLogEx(INFO, string);
}
}
@ -188,7 +186,6 @@ static void print_info_result(uint8_t *data, bool verbose) {
int fwwi = reflect8(words[EM4X50_PROTECTION].byte[FIRST_WORD_WRITE_INHIBITED]);
int lwwi = reflect8(words[EM4X50_PROTECTION].byte[LAST_WORD_WRITE_INHIBITED]);
PrintAndLogEx(NORMAL, "");
PrintAndLogEx(INFO, "--- " _CYAN_("Tag Information") " ---------------------------");
PrintAndLogEx(INFO, "-------------------------------------------------------------");
@ -198,10 +195,7 @@ static void print_info_result(uint8_t *data, bool verbose) {
PrintAndLogEx(INFO, _YELLOW_("EM4x50 data:"));
if (verbose) {
// detailed data section
print_result(words, 0, EM4X50_NO_WORDS - 1, true);
} else {
PrintAndLogEx(NORMAL, "");
@ -210,7 +204,6 @@ static void print_info_result(uint8_t *data, bool verbose) {
// condensed data section
for (int i = 0; i < EM4X50_NO_WORDS; i++) {
char s[50] = {0};
switch(i) {
case EM4X50_DEVICE_PASSWORD:
@ -237,7 +230,6 @@ static void print_info_result(uint8_t *data, bool verbose) {
}
PrintAndLogEx(INFO, "----+-------------+----------------------------------");
// configuration section
PrintAndLogEx(NORMAL, "");
PrintAndLogEx(INFO, "---- " _CYAN_("Configuration") " ----");
@ -264,7 +256,7 @@ bool detect_4x50_block(void) {
.addr_given = true,
.address = EM4X50_DEVICE_ID,
};
em4x50_word_t words[EM4X50_NO_WORDS] = {0};
em4x50_word_t words[EM4X50_NO_WORDS];
return (em4x50_read(&etd, words, false) == PM3_SUCCESS);
}
@ -274,7 +266,7 @@ int read_em4x50_uid(void) {
.addr_given = true,
.address = EM4X50_DEVICE_SERIAL,
};
em4x50_word_t words[EM4X50_NO_WORDS] = {0};
em4x50_word_t words[EM4X50_NO_WORDS];
int res = em4x50_read(&etd, words, false);
if (res == PM3_SUCCESS)
PrintAndLogEx(INFO, " Serial: " _GREEN_("%s"), sprint_hex(words[EM4X50_DEVICE_SERIAL].byte, 4));