improve text output in hf iclass tear
This commit is contained in:
1 parent
d11d008a42
commit
ee63e0bc2d
2 files changed
+10
-1
No files matched your search
@@ -944,6 +944,9 @@ int do_iclass_simulation(int simulationMode, uint8_t *reader_mac_buf) {
|
|||||||
goto send;
|
goto send;
|
||||||
|
|
||||||
} else if (cmd == ICLASS_CMD_DETECT) { // 0x0F
|
} 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
|
// not supported yet, ignore
|
||||||
// } else if (cmd == 0x26 && len == 5) {
|
// } else if (cmd == 0x26 && len == 5) {
|
||||||
// standard ISO15693 INVENTORY command. Ignore.
|
// standard ISO15693 INVENTORY command. Ignore.
|
||||||
|
|||||||
@@ -4215,7 +4215,13 @@ static int CmdHFiClass_TearBlock(const char *Cmd) {
|
|||||||
for (int i = 7; i >= 0; --i) {
|
for (int i = 7; i >= 0; --i) {
|
||||||
int bit1 = (data_read_orig[7] >> i) & 1;
|
int bit1 = (data_read_orig[7] >> i) & 1;
|
||||||
int bit2 = (data_read[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;
|
isok = PM3_SUCCESS;
|
||||||
|
|||||||
Reference in new issue
Block a user