forked from flipperdevices/flipperzero-firmware
-
-
Notifications
You must be signed in to change notification settings - Fork 540
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Squashed 'mifare_nested/' changes from eba6163..8dd6fc799
8dd6fc799 move base pack here REVERT: eba6163 1.5.2 - Show correct amount of nonces to collect REVERT: bcad035 Too many files to change with update :( REVERT: 89ac8e2 1.5.1 - Fix wrong invalid/skipped keys count REVERT: 62a7c9b Add catalog readme REVERT: 6cfd9f4 Add screenshots and banner for catalogs REVERT: 86fc49f 1.5.0 - New update, new scene Changes: - Added new scene with information about why nonces aren't collected (skipped/invalid) - Removed some old code, breaking compability with old firmware - App renamed from "Flipper (Mifare) Nested" to "Flipper Nested" REVERT: 93581dd Fix compilation REVERT: d52b43e 1.4.6 - Fix fallback to hardnested REVERT: 3a1bd74 1.4.5 - Fix .nested folder if running Hard Nested Closes #8 REVERT: 9396a09 1.4.4 - Fix my fix again REVERT: f9df9e8 1.4.3 - Oops... REVERT: 7548828 1.4.2 - Minor code refactor REVERT: db21a62 1.4.1 - Fix invalid nonces after skipping REVERT: 3650991 1.4.0 - Huge update Changes: - Changed scenes, now they are more informative and beautiful (closes #6) - Check if sector is alive in Nested attacks (closes #5) - Now tag PRNG detected at sector, where key is available (fix not working with dead 0 sector, closes #4) - Detect hard PRNG from start, hardnested doesn't require calibration now - Settings menu: ability to always run Hard Nested (regardless of PRNG) - Minor code refactoring, a lot of bug fixes (memory leaks, stability improvements) - Fallback to Hard Nested now after 25 failed tries (was 10) REVERT: fb317df 1.3.0 - Bump version in application.fam REVERT: 34a5408 1.3.0 - Check first_byte_sum (no more invalid ones) REVERT: f15f924 1.2.5 - Add missing file REVERT: 71bdf7c 1.2.4 - Leaks... REVERT: f525e97 1.2.3 - free string REVERT: af49313 1.2.2 - Migrate to file_stream, fix more memory leaks (this time not mine) REVERT: 30a3796 1.2.1 - Fix memory leaks REVERT: a8f0a83 1.2.0 - Hard Nested attack REVERT: 6c1eaa1 Merge branch 'dev' of https://github.com/AloneLiberty/FlipperNested into hardnested REVERT: af164fa 1.2.0 - Hard Nested attack REVERT: abb4d16 Commas REVERT: a50dab5 Migrate FAQ to wiki, add guide links REVERT: c9654ab 1.1.1 - Improve calibration cycle (hope nothing breaks) REVERT: f7991cb Update FlipC link REVERT: f7f453f 1.1.0 - Text changes, nothing new REVERT: e3651bd 1.1.0 - Change nested folder name to .nested, remove .keys file after search, bug fixes REVERT: 0c13737 1.0.0 - Public release git-subtree-dir: mifare_nested git-subtree-split: 8dd6fc799e7b95b37cd7ac7daf450220fe422644
- Loading branch information
Showing
12 changed files
with
63 additions
and
213 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,58 @@ | ||
#include "../mifare_nested_i.h" | ||
|
||
void mifare_nested_scene_static_encrypted_nonce_widget_callback( | ||
GuiButtonType result, | ||
InputType type, | ||
void* context) { | ||
MifareNested* mifare_nested = context; | ||
if(type == InputTypeShort) { | ||
view_dispatcher_send_custom_event(mifare_nested->view_dispatcher, result); | ||
} | ||
} | ||
|
||
void mifare_nested_scene_static_encrypted_nonce_on_enter(void* context) { | ||
MifareNested* mifare_nested = context; | ||
Widget* widget = mifare_nested->widget; | ||
|
||
notification_message(mifare_nested->notifications, &sequence_error); | ||
|
||
widget_add_icon_element(widget, 73, 12, &I_DolphinCry); | ||
widget_add_string_element( | ||
widget, 0, 0, AlignLeft, AlignTop, FontPrimary, "Static encrypted nonce"); | ||
widget_add_string_element(widget, 0, 12, AlignLeft, AlignTop, FontSecondary, "This tag isn't"); | ||
widget_add_string_element(widget, 0, 22, AlignLeft, AlignTop, FontSecondary, "vulnerable to"); | ||
widget_add_string_element(widget, 0, 32, AlignLeft, AlignTop, FontSecondary, "Nested attack"); | ||
|
||
widget_add_button_element( | ||
widget, | ||
GuiButtonTypeLeft, | ||
"Back", | ||
mifare_nested_scene_static_encrypted_nonce_widget_callback, | ||
mifare_nested); | ||
|
||
// Setup and start worker | ||
view_dispatcher_switch_to_view(mifare_nested->view_dispatcher, MifareNestedViewWidget); | ||
} | ||
|
||
bool mifare_nested_scene_static_encrypted_nonce_on_event(void* context, SceneManagerEvent event) { | ||
MifareNested* mifare_nested = context; | ||
bool consumed = false; | ||
|
||
if(event.type == SceneManagerEventTypeCustom) { | ||
if(event.event == GuiButtonTypeCenter || event.event == GuiButtonTypeLeft) { | ||
scene_manager_search_and_switch_to_previous_scene(mifare_nested->scene_manager, 0); | ||
consumed = true; | ||
} | ||
} else if(event.type == SceneManagerEventTypeBack) { | ||
scene_manager_search_and_switch_to_previous_scene(mifare_nested->scene_manager, 0); | ||
consumed = true; | ||
} | ||
|
||
return consumed; | ||
} | ||
|
||
void mifare_nested_scene_static_encrypted_nonce_on_exit(void* context) { | ||
MifareNested* mifare_nested = context; | ||
|
||
widget_reset(mifare_nested->widget); | ||
} | ||
#include "../mifare_nested_i.h" | ||
|
||
void mifare_nested_scene_static_encrypted_nonce_widget_callback( | ||
GuiButtonType result, | ||
InputType type, | ||
void* context) { | ||
MifareNested* mifare_nested = context; | ||
if(type == InputTypeShort) { | ||
view_dispatcher_send_custom_event(mifare_nested->view_dispatcher, result); | ||
} | ||
} | ||
|
||
void mifare_nested_scene_static_encrypted_nonce_on_enter(void* context) { | ||
MifareNested* mifare_nested = context; | ||
Widget* widget = mifare_nested->widget; | ||
|
||
notification_message(mifare_nested->notifications, &sequence_error); | ||
|
||
widget_add_icon_element(widget, 73, 12, &I_DolphinCry); | ||
widget_add_string_element( | ||
widget, 0, 0, AlignLeft, AlignTop, FontPrimary, "Static encrypted nonce"); | ||
widget_add_string_element(widget, 0, 12, AlignLeft, AlignTop, FontSecondary, "This tag isn't"); | ||
widget_add_string_element(widget, 0, 22, AlignLeft, AlignTop, FontSecondary, "vulnerable to"); | ||
widget_add_string_element(widget, 0, 32, AlignLeft, AlignTop, FontSecondary, "Nested attack"); | ||
|
||
widget_add_button_element( | ||
widget, | ||
GuiButtonTypeLeft, | ||
"Back", | ||
mifare_nested_scene_static_encrypted_nonce_widget_callback, | ||
mifare_nested); | ||
|
||
// Setup and start worker | ||
view_dispatcher_switch_to_view(mifare_nested->view_dispatcher, MifareNestedViewWidget); | ||
} | ||
|
||
bool mifare_nested_scene_static_encrypted_nonce_on_event(void* context, SceneManagerEvent event) { | ||
MifareNested* mifare_nested = context; | ||
bool consumed = false; | ||
|
||
if(event.type == SceneManagerEventTypeCustom) { | ||
if(event.event == GuiButtonTypeCenter || event.event == GuiButtonTypeLeft) { | ||
scene_manager_search_and_switch_to_previous_scene(mifare_nested->scene_manager, 0); | ||
consumed = true; | ||
} | ||
} else if(event.type == SceneManagerEventTypeBack) { | ||
scene_manager_search_and_switch_to_previous_scene(mifare_nested->scene_manager, 0); | ||
consumed = true; | ||
} | ||
|
||
return consumed; | ||
} | ||
|
||
void mifare_nested_scene_static_encrypted_nonce_on_exit(void* context) { | ||
MifareNested* mifare_nested = context; | ||
|
||
widget_reset(mifare_nested->widget); | ||
} |