From 418a93cbfbc9aaa56ef6c29947fb30b32713356c Mon Sep 17 00:00:00 2001 From: MX <10697207+xMasterX@users.noreply.github.com> Date: Wed, 23 Aug 2023 19:31:03 +0300 Subject: [PATCH] upd picopass --- application.fam | 3 +- files/iclass_elite_dict.txt | 41 +++++++++++++++++++++++++++ files/iclass_standard_dict.txt | 47 +++++++++++++++++++++++++++++++ helpers/iclass_elite_dict.c | 4 +-- scenes/picopass_scene_card_menu.c | 16 +++++++++++ 5 files changed, 108 insertions(+), 3 deletions(-) create mode 100644 files/iclass_elite_dict.txt create mode 100644 files/iclass_standard_dict.txt diff --git a/application.fam b/application.fam index 780999f7a83..817885d3d91 100644 --- a/application.fam +++ b/application.fam @@ -10,7 +10,7 @@ App( ], stack_size=4 * 1024, fap_description="App to communicate with NFC tags using the PicoPass format", - fap_version="1.0", + fap_version="1.1", fap_icon="125_10px.png", fap_category="NFC", fap_libs=["mbedtls"], @@ -20,4 +20,5 @@ App( ), ], fap_icon_assets="icons", + fap_file_assets="files" ) diff --git a/files/iclass_elite_dict.txt b/files/iclass_elite_dict.txt new file mode 100644 index 00000000000..908889aecf6 --- /dev/null +++ b/files/iclass_elite_dict.txt @@ -0,0 +1,41 @@ + +## From https://github.com/RfidResearchGroup/proxmark3/blob/master/client/dictionaries/iclass_default_keys.dic + +# key1/Kc from PicoPass 2k documentation +7665544332211000 +# SAGEM +0123456789ABCDEF +# PicoPass Default Exchange Key +5CBCF1DA45D5FB4F +# From HID multiclassSE reader +31ad7ebd2f282168 +# From pastebin: https://pastebin.com/uHqpjiuU +6EFD46EFCBB3C875 +E033CA419AEE43F9 + +# default picopass KD / Page 0 / Book 1 +FDCB5A52EA8F3090 +237FF9079863DF44 +5ADC25FB27181D32 +83B881F2936B2E49 +43644E61EE866BA5 +897034143D016080 +82D17B44C0122963 +4895CA7DE65E2025 +DADAD4C57BE271B7 +E41E9EDEF5719ABF +293D275EC3AF9C7F +C3C169251B8A70FB +F41DAF58B20C8B91 +28877A609EC0DD2B +66584C91EE80D5E5 +C1B74D7478053AE2 + +# default iCLASS RFIDeas +6B65797374726B72 + +# CTF key +5C100DF7042EAE64 + +# iCopy-X DRM key (iCE product) +2020666666668888 diff --git a/files/iclass_standard_dict.txt b/files/iclass_standard_dict.txt new file mode 100644 index 00000000000..46808ef602e --- /dev/null +++ b/files/iclass_standard_dict.txt @@ -0,0 +1,47 @@ + +## From https://github.com/RfidResearchGroup/proxmark3/blob/master/client/dictionaries/iclass_default_keys.dic + +# AA1 +AEA684A6DAB23278 +# key1/Kc from PicoPass 2k documentation +7665544332211000 +# SAGEM +0123456789ABCDEF +# from loclass demo file. +5b7c62c491c11b39 +# Kd from PicoPass 2k documentation +F0E1D2C3B4A59687 +# PicoPass Default Exchange Key +5CBCF1DA45D5FB4F +# From HID multiclassSE reader +31ad7ebd2f282168 +# From pastebin: https://pastebin.com/uHqpjiuU +6EFD46EFCBB3C875 +E033CA419AEE43F9 + +# iCopy-x DRM keys +# iCL tags +2020666666668888 +# iCS tags reversed from the SOs +6666202066668888 + +# default picopass KD / Page 0 / Book 1 +FDCB5A52EA8F3090 +237FF9079863DF44 +5ADC25FB27181D32 +83B881F2936B2E49 +43644E61EE866BA5 +897034143D016080 +82D17B44C0122963 +4895CA7DE65E2025 +DADAD4C57BE271B7 +E41E9EDEF5719ABF +293D275EC3AF9C7F +C3C169251B8A70FB +F41DAF58B20C8B91 +28877A609EC0DD2B +66584C91EE80D5E5 +C1B74D7478053AE2 + +# default iCLASS RFIDeas +6B65797374726B72 diff --git a/helpers/iclass_elite_dict.c b/helpers/iclass_elite_dict.c index f92dce0aa09..5f0f41f8506 100644 --- a/helpers/iclass_elite_dict.c +++ b/helpers/iclass_elite_dict.c @@ -3,9 +3,9 @@ #include #include -#define ICLASS_ELITE_DICT_FLIPPER_NAME APP_DATA_PATH("assets/iclass_elite_dict.txt") +#define ICLASS_ELITE_DICT_FLIPPER_NAME APP_ASSETS_PATH("iclass_elite_dict.txt") +#define ICLASS_STANDARD_DICT_FLIPPER_NAME APP_ASSETS_PATH("iclass_standard_dict.txt") #define ICLASS_ELITE_DICT_USER_NAME APP_DATA_PATH("assets/iclass_elite_dict_user.txt") -#define ICLASS_STANDARD_DICT_FLIPPER_NAME APP_DATA_PATH("assets/iclass_standard_dict.txt") #define TAG "IclassEliteDict" diff --git a/scenes/picopass_scene_card_menu.c b/scenes/picopass_scene_card_menu.c index fe63f7c86bb..fa4515db3e7 100644 --- a/scenes/picopass_scene_card_menu.c +++ b/scenes/picopass_scene_card_menu.c @@ -4,6 +4,8 @@ enum SubmenuIndex { SubmenuIndexSave, SubmenuIndexSaveAsLF, SubmenuIndexChangeKey, + SubmenuIndexWrite, + SubmenuIndexEmulate, }; void picopass_scene_card_menu_submenu_callback(void* context, uint32_t index) { @@ -26,6 +28,14 @@ void picopass_scene_card_menu_on_enter(void* context) { picopass_scene_card_menu_submenu_callback, picopass); } + submenu_add_item( + submenu, "Write", SubmenuIndexWrite, picopass_scene_card_menu_submenu_callback, picopass); + submenu_add_item( + submenu, + "Emulate", + SubmenuIndexEmulate, + picopass_scene_card_menu_submenu_callback, + picopass); submenu_add_item( submenu, "Change Key", @@ -57,6 +67,12 @@ bool picopass_scene_card_menu_on_event(void* context, SceneManagerEvent event) { picopass->dev->format = PicopassDeviceSaveFormatLF; scene_manager_next_scene(picopass->scene_manager, PicopassSceneSaveName); consumed = true; + } else if(event.event == SubmenuIndexWrite) { + scene_manager_next_scene(picopass->scene_manager, PicopassSceneWriteCard); + consumed = true; + } else if(event.event == SubmenuIndexEmulate) { + scene_manager_next_scene(picopass->scene_manager, PicopassSceneEmulate); + consumed = true; } else if(event.event == SubmenuIndexChangeKey) { scene_manager_set_scene_state( picopass->scene_manager, PicopassSceneCardMenu, SubmenuIndexChangeKey);