mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-03-01 02:27:21 +08:00
textual
This commit is contained in:
parent
114cc98600
commit
2235d96486
1 changed files with 17 additions and 4 deletions
|
@ -3083,12 +3083,27 @@ static int CmdHF14AMfuEv1CounterTearoff(const char *Cmd) {
|
||||||
PrintAndLogEx(WARNING, "Counter must 0, 1 or 2");
|
PrintAndLogEx(WARNING, "Counter must 0, 1 or 2");
|
||||||
return PM3_EINVARG;
|
return PM3_EINVARG;
|
||||||
}
|
}
|
||||||
|
|
||||||
cnt_no = (uint8_t)counter;
|
cnt_no = (uint8_t)counter;
|
||||||
|
|
||||||
|
iso14a_card_select_t card;
|
||||||
|
|
||||||
|
if (ul_select(&card) == 0) {
|
||||||
|
PrintAndLogEx(WARNING, "Failed to select card");
|
||||||
|
return PM3_ESOFT;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t inital_cnt[3] = {0, 0, 0};
|
||||||
|
int len = ulev1_readCounter(cnt_no, inital_cnt, sizeof(inital_cnt));
|
||||||
|
DropField();
|
||||||
|
if ( len != sizeof(inital_cnt) ) {
|
||||||
|
PrintAndLogEx(WARNING, "Failed to read counter");
|
||||||
|
return PM3_ESOFT;
|
||||||
|
}
|
||||||
|
|
||||||
PrintAndLogEx(INFO, "----------------- " _CYAN_("MFU Ev1 Counter Tear off") " ---------------------");
|
PrintAndLogEx(INFO, "----------------- " _CYAN_("MFU Ev1 Counter Tear off") " ---------------------");
|
||||||
PrintAndLogEx(INFO, "Starting counter tear-off test");
|
PrintAndLogEx(INFO, "Target counter no " _GREEN_("%u"), counter);
|
||||||
PrintAndLogEx(INFO, "Target counter no: %u", counter);
|
PrintAndLogEx(INFO, "Target initial value " _GREEN_("%s"), sprint_hex_inrow(inital_cnt, sizeof(inital_cnt)));
|
||||||
PrintAndLogEx(INFO, "----------------------------------------------------");
|
PrintAndLogEx(INFO, "----------------------------------------------------");
|
||||||
|
|
||||||
bool got_pre = false, got_post = false;
|
bool got_pre = false, got_post = false;
|
||||||
|
@ -3096,8 +3111,6 @@ static int CmdHF14AMfuEv1CounterTearoff(const char *Cmd) {
|
||||||
uint8_t post[3] = {0};
|
uint8_t post[3] = {0};
|
||||||
uint32_t actual_time = start_time;
|
uint32_t actual_time = start_time;
|
||||||
|
|
||||||
iso14a_card_select_t card;
|
|
||||||
|
|
||||||
while (actual_time <= (time_limit - interval)) {
|
while (actual_time <= (time_limit - interval)) {
|
||||||
|
|
||||||
if (kbd_enter_pressed()) {
|
if (kbd_enter_pressed()) {
|
||||||
|
|
Loading…
Reference in a new issue