nfc: Mifare Ultralight C detection (#2668)
* nfc: Add Mifare Ultralight C detection
* nfc: Add display name for MFUL C and hide menu items
MFUL C unlock and emulation currently not supported, so hide from menu
if current card is MFUL C
* nfc: Also check response when probing 3DES auth
* nfc: Hide emulate option in saved menu for MFUL if not supported
* nfc: Remove unlock options from saved menu if Ultralight C
Co-authored-by: gornekich <n.gorbadey@gmail.com>
Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
@@ -19,7 +19,7 @@ void nfc_scene_mf_ultralight_menu_on_enter(void* context) {
|
||||
Submenu* submenu = nfc->submenu;
|
||||
MfUltralightData* data = &nfc->dev->dev_data.mf_ul_data;
|
||||
|
||||
if(!mf_ul_is_full_capture(data)) {
|
||||
if(!mf_ul_is_full_capture(data) && data->type != MfUltralightTypeULC) {
|
||||
submenu_add_item(
|
||||
submenu,
|
||||
"Unlock",
|
||||
@@ -29,12 +29,14 @@ void nfc_scene_mf_ultralight_menu_on_enter(void* context) {
|
||||
}
|
||||
submenu_add_item(
|
||||
submenu, "Save", SubmenuIndexSave, nfc_scene_mf_ultralight_menu_submenu_callback, nfc);
|
||||
submenu_add_item(
|
||||
submenu,
|
||||
"Emulate",
|
||||
SubmenuIndexEmulate,
|
||||
nfc_scene_mf_ultralight_menu_submenu_callback,
|
||||
nfc);
|
||||
if(mf_ul_emulation_supported(data)) {
|
||||
submenu_add_item(
|
||||
submenu,
|
||||
"Emulate",
|
||||
SubmenuIndexEmulate,
|
||||
nfc_scene_mf_ultralight_menu_submenu_callback,
|
||||
nfc);
|
||||
}
|
||||
submenu_add_item(
|
||||
submenu, "Info", SubmenuIndexInfo, nfc_scene_mf_ultralight_menu_submenu_callback, nfc);
|
||||
|
||||
|
||||
@@ -42,7 +42,8 @@ void nfc_scene_saved_menu_on_enter(void* context) {
|
||||
nfc);
|
||||
}
|
||||
} else if(
|
||||
nfc->dev->format == NfcDeviceSaveFormatMifareUl ||
|
||||
(nfc->dev->format == NfcDeviceSaveFormatMifareUl &&
|
||||
mf_ul_emulation_supported(&nfc->dev->dev_data.mf_ul_data)) ||
|
||||
nfc->dev->format == NfcDeviceSaveFormatMifareClassic) {
|
||||
submenu_add_item(
|
||||
submenu, "Emulate", SubmenuIndexEmulate, nfc_scene_saved_menu_submenu_callback, nfc);
|
||||
@@ -72,6 +73,7 @@ void nfc_scene_saved_menu_on_enter(void* context) {
|
||||
submenu_add_item(
|
||||
submenu, "Info", SubmenuIndexInfo, nfc_scene_saved_menu_submenu_callback, nfc);
|
||||
if(nfc->dev->format == NfcDeviceSaveFormatMifareUl &&
|
||||
nfc->dev->dev_data.mf_ul_data.type != MfUltralightTypeULC &&
|
||||
!mf_ul_is_full_capture(&nfc->dev->dev_data.mf_ul_data)) {
|
||||
submenu_add_item(
|
||||
submenu,
|
||||
|
||||
Reference in New Issue
Block a user