This commit is contained in:
Willy-JL
2024-02-01 02:46:43 +00:00
12 changed files with 131 additions and 34 deletions

View File

@@ -117,7 +117,8 @@ void nfc_render_emv_transactions(const EmvApplication* apl, FuriString* str) {
furi_string_cat_printf(str, "Transactions:\n");
for(int i = 0; i < len; i++) {
//if(!apl->trans[i].amount) continue; - NO Skip here pls
// If no date and amount - skip
if((!apl->trans[i].date) && (!apl->trans[i].amount)) continue;
// transaction counter
furi_string_cat_printf(str, "\e#%d: ", apl->trans[i].atc);
@@ -167,10 +168,13 @@ void nfc_render_emv_transactions(const EmvApplication* apl, FuriString* str) {
if(apl->trans[i].time)
furi_string_cat_printf(
str,
"%02lx:%02lx:%02lx\n",
"%02lx:%02lx:%02lx",
apl->trans[i].time & 0xff,
(apl->trans[i].time >> 8) & 0xff,
apl->trans[i].time >> 16);
// Line break
furi_string_cat_printf(str, "\n");
}
furi_string_free(tmp);

View File

@@ -13,7 +13,7 @@ static bool mykey_is_blank(const St25tbData* data) {
}
static bool mykey_has_lockid(const St25tbData* data) {
return (data->blocks[5] & 0xFF) == 0x7F;
return (data->blocks[5] >> 24) == 0x7F;
}
static bool check_invalid_low_nibble(uint8_t value) {

View File

@@ -22,11 +22,13 @@ void nfc_scene_emulate_on_enter(void* context) {
timer_auto_exit =
furi_timer_alloc(nfc_scene_emulate_timer_callback, FuriTimerTypeOnce, instance);
furi_timer_start(
timer_auto_exit,
instance->fav_timeout ?
xtreme_settings.favorite_timeout * furi_kernel_get_tick_frequency() :
NFC_EMULATION_TIME_MAX_MS);
if(!furi_hal_rtc_is_flag_set(FuriHalRtcFlagDebug) || instance->fav_timeout)
furi_timer_start(
timer_auto_exit,
instance->fav_timeout ?
xtreme_settings.favorite_timeout * furi_kernel_get_tick_frequency() :
NFC_EMULATION_TIME_MAX_MS);
}
bool nfc_scene_emulate_on_event(void* context, SceneManagerEvent event) {

View File

@@ -31,12 +31,22 @@ bool nfc_scene_save_success_on_event(void* context, SceneManagerEvent event) {
} else if(scene_manager_has_previous_scene(nfc->scene_manager, NfcSceneSaveConfirm)) {
scene_manager_next_scene(nfc->scene_manager, NfcSceneMfClassicDetectReader);
consumed = true;
} else if(scene_manager_has_previous_scene(nfc->scene_manager, NfcSceneSetType)) {
consumed = scene_manager_search_and_switch_to_another_scene(
nfc->scene_manager, NfcSceneFileSelect);
} else if(scene_manager_has_previous_scene(nfc->scene_manager, NfcSceneReadSuccess)) {
consumed = scene_manager_search_and_switch_to_another_scene(
nfc->scene_manager, NfcSceneFileSelect);
} else {
consumed = scene_manager_search_and_switch_to_previous_scene(
nfc->scene_manager, NfcSceneFileSelect);
if(!consumed) {
consumed = scene_manager_search_and_switch_to_previous_scene(
nfc->scene_manager, NfcSceneSavedMenu);
if(!consumed) {
consumed = scene_manager_search_and_switch_to_another_scene(
nfc->scene_manager, NfcSceneFileSelect);
}
}
}
}

View File

@@ -24,6 +24,9 @@ void nfc_scene_start_on_enter(void* context) {
furi_string_reset(nfc->file_name);
nfc_device_clear(nfc->nfc_device);
iso14443_3a_reset(nfc->iso14443_3a_edit_data);
// Clear detected protocols list
memset(nfc->protocols_detected, NfcProtocolIso14443_3a, NfcProtocolNum);
nfc_app_reset_detected_protocols(nfc);
submenu_add_item(submenu, "Read", SubmenuIndexRead, nfc_scene_start_submenu_callback, nfc);
submenu_add_item(