mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-26 14:30:25 +00:00
typos fixed
This commit is contained in:
parent
6f71f1113a
commit
4a382bc1de
4 changed files with 13 additions and 10 deletions
|
@ -133,8 +133,9 @@ static bool emv_parse(const NfcDevice* device, FuriString* parsed_data) {
|
|||
if(storage_readed)
|
||||
furi_string_cat_printf(parsed_data, "Currency: %s\n", furi_string_get_cstr(str));
|
||||
|
||||
if(app.pin_try_counter != 0xFF)
|
||||
furi_string_cat_printf(parsed_data, "PIN attempts left: %d\n", app.pin_try_counter);
|
||||
if(app.pin_attempts_counter != 0xFF)
|
||||
furi_string_cat_printf(
|
||||
parsed_data, "PIN attempts left: %d\n", app.pin_attempts_counter);
|
||||
|
||||
parsed = true;
|
||||
} while(false);
|
||||
|
|
|
@ -28,7 +28,7 @@ const NfcDeviceBase nfc_device_emv = {
|
|||
EmvData* emv_alloc() {
|
||||
EmvData* data = malloc(sizeof(EmvData));
|
||||
data->iso14443_4a_data = iso14443_4a_alloc();
|
||||
data->emv_application.pin_try_counter = 0xff;
|
||||
data->emv_application.pin_attempts_counter = 0xff;
|
||||
|
||||
return data;
|
||||
}
|
||||
|
@ -107,9 +107,9 @@ bool emv_load(EmvData* data, FlipperFormat* ff, uint32_t version) {
|
|||
if(!flipper_format_read_hex(ff, "Effective month", &app->effective_month, 1)) break;
|
||||
if(!flipper_format_read_hex(ff, "Effective day", &app->effective_day, 1)) break;
|
||||
|
||||
uint32_t pin_try_counter;
|
||||
if(!flipper_format_read_uint32(ff, "PIN counter", &pin_try_counter, 1)) break;
|
||||
app->pin_try_counter = pin_try_counter;
|
||||
uint32_t pin_attempts_counter;
|
||||
if(!flipper_format_read_uint32(ff, "PIN attempts left", &pin_attempts_counter, 1)) break;
|
||||
app->pin_attempts_counter = pin_attempts_counter;
|
||||
|
||||
parsed = true;
|
||||
} while(false);
|
||||
|
@ -159,7 +159,8 @@ bool emv_save(const EmvData* data, FlipperFormat* ff) {
|
|||
break;
|
||||
if(!flipper_format_write_hex(ff, "Effective day", (uint8_t*)&app.effective_day, 1)) break;
|
||||
|
||||
if(!flipper_format_write_uint32(ff, "PIN counter", (uint32_t*)&app.pin_try_counter, 1))
|
||||
if(!flipper_format_write_uint32(
|
||||
ff, "PIN attempts left", (uint32_t*)&app.pin_attempts_counter, 1))
|
||||
break;
|
||||
|
||||
saved = true;
|
||||
|
|
|
@ -90,7 +90,7 @@ typedef struct {
|
|||
uint8_t effective_year;
|
||||
uint16_t country_code;
|
||||
uint16_t currency_code;
|
||||
uint8_t pin_try_counter;
|
||||
uint8_t pin_attempts_counter;
|
||||
uint16_t transaction_counter;
|
||||
uint16_t last_online_atc;
|
||||
APDU pdol;
|
||||
|
|
|
@ -263,9 +263,10 @@ static bool
|
|||
success = true;
|
||||
break;
|
||||
case EMV_TAG_PIN_ATTEMPTS_COUNTER:
|
||||
app->pin_try_counter = buff[i];
|
||||
app->pin_attempts_counter = buff[i];
|
||||
success = true;
|
||||
FURI_LOG_T(TAG, "found EMV_TAG_PIN_ATTEMPTS_COUNTER %x: %d", tag, app->pin_try_counter);
|
||||
FURI_LOG_T(
|
||||
TAG, "found EMV_TAG_PIN_ATTEMPTS_COUNTER %x: %d", tag, app->pin_attempts_counter);
|
||||
break;
|
||||
}
|
||||
return success;
|
||||
|
|
Loading…
Reference in a new issue