mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2026-05-29 14:04:20 +00:00
improve text output in hf iclass tear
This commit is contained in:
@@ -944,6 +944,9 @@ int do_iclass_simulation(int simulationMode, uint8_t *reader_mac_buf) {
|
||||
goto send;
|
||||
|
||||
} else if (cmd == ICLASS_CMD_DETECT) { // 0x0F
|
||||
// if EAS byte in config block, (normally 0xFF, but 0x7F)
|
||||
// MSB = 1 , don't answe with CSN
|
||||
// MSB = 0 == enabled , answer with CSN
|
||||
// not supported yet, ignore
|
||||
// } else if (cmd == 0x26 && len == 5) {
|
||||
// standard ISO15693 INVENTORY command. Ignore.
|
||||
|
||||
@@ -4215,7 +4215,13 @@ static int CmdHFiClass_TearBlock(const char *Cmd) {
|
||||
for (int i = 7; i >= 0; --i) {
|
||||
int bit1 = (data_read_orig[7] >> i) & 1;
|
||||
int bit2 = (data_read[7] >> i) & 1;
|
||||
PrintAndLogEx(INFO, "%-11s %-10d %-10d", flag_names[i], bit1, bit2);
|
||||
|
||||
// if bit flipped, mark it with color
|
||||
if (bit1 != bit2) {
|
||||
PrintAndLogEx(SUCCESS, "%-11s %-10d " _GREEN_("%-10d"), flag_names[i], bit1, bit2);
|
||||
} else {
|
||||
PrintAndLogEx(INFO, "%-11s %-10d %-10d", flag_names[i], bit1, bit2);
|
||||
}
|
||||
}
|
||||
|
||||
isok = PM3_SUCCESS;
|
||||
|
||||
Reference in New Issue
Block a user