Merge remote-tracking branch 'mntm/dev' into feat/use-after-free-sentinel

This commit is contained in:
Willy-JL
2024-11-10 05:11:04 +00:00
8 changed files with 292 additions and 10 deletions
+8 -2
View File
@@ -103,7 +103,9 @@
- Added typedocs for all extra JS modules in Momentum (by @Willy-JL)
- RPC: Added ASCII event support (#284 by @Willy-JL)
- FBT/SDK: New app flag UnloadAssetPacks to free RAM in heavy apps like NFC, MFKey, uPython (#260 by @Willy-JL)
- OFW: Settings: Clock editing & Alarm function (目覚め時計) (by @skotopes)
- Settings:
- OFW: Clock editing & Alarm function (目覚め時計) (by @skotopes)
- Add warnings for some settings you shouldn't touch like Debug, Sleep Method, Heap Trace (#296 by @Willy-JL)
- BadKB:
- OFW: Add linux/gnome badusb demo files (by @thomasnemer)
- Add older qFlipper install demos for windows and macos (by @DXVVAY & @grugnoymeme)
@@ -150,6 +152,7 @@
- Decoding of URL-encoded URI characters (#267 by @jaylikesbunda)
- SmartPoster record support (#275 by @Willy-JL)
- Enable parsing NTAG I2C Plus 1k and 2k chips too (#237 by @RocketGod-git)
- NFC: Updated MFC dict, +100 keys from RRG proxmark3, +17 keys from Mifare Classic Tool
- Added 6 new Mifare Classic keys from Bulgaria Hotel (#216 by @z3r0l1nk)
- UL: Add iq aparts hotel key (by @xMasterX)
- OFW/UL: Rename 'Detect Reader' to 'Extract MFC Keys' (by @bettse & @xMasterX)
@@ -178,7 +181,9 @@
- Move more commands as plugins on SD, refactor plugin wrapper (#276 by @Willy-JL)
- FBT: Optimize icons blob, scrub unused icons (#291 by @Willy-JL)
- OFW: BadKB: Improve ChromeOS and GNOME demo scripts (by @kowalski7cc)
- OFW: GUI: Change dialog_ex text ownership model (by @skotopes)
- GUI:
- OFW: Change dialog_ex text ownership model (by @skotopes)
- Improve some error messages to be more clear, like Sub-GHz region missing and Main Menu .fap file missing (#296 by @Willy-JL)
- OFW: CCID: App changes and improvements (by @kidbomb)
- OFW: API: Exposed `view_dispatcher_get_event_loop` (by @CookiePLMonster)
- Furi:
@@ -199,6 +204,7 @@
- OFW: Fix detection of GProx II cards and false detection of other cards (by @Astrrra)
- OFW: Fix Guard GProxII False Positive and 36-bit Parsing (by @zinongli)
- OFW: GProxII Fix Writing and Rendering Conflict (by @zinongli)
- Asset Packer: Fix font terminator causing freezes/crashes, like in Marauder AP scan/list (#295 by @Willy-JL)
- Desktop:
- Fallback Poweroff prompt when power settings is unavailable (by @Willy-JL)
- Sub-GHz:
@@ -278,6 +278,7 @@ AFBECD121004
763958704B78
# Onity S1 A/B
8A19D40CF2B5
3961EA82C46D
# 24-7
D21762B2DE3B
0E83A374B513
@@ -1955,6 +1956,15 @@ FC9418BF788B
4E4F584D2105
686B35333376
861861861861
# Transport System Cracow / Polen
B071A76BA2E9
B3A181BCA5F2
3225942F7717
80D00703C5FB
6DD510E080B1
87529F30FC58
B75C4FA614AE
42DC568C64F4
# Data from "the more the marriott" mifare project (colonelborkmundus)
# aka The Horde
# These keys seem to be from Vingcard / Saflok system which means they are diversified
@@ -2257,12 +2267,179 @@ BD6AF9754C18
722F24F0722F
# STS Hotel 2A
535453535453
# Public transport in Sofia, Bulgaria (SKGT)
# upgraded to DESFire since January 2024
# SKGT common
# Sector 15, key A
F618B3D7855A
# Sector 15, key B
F1AFA4DA949F
# SKGT multi-use ticket
# Sector 0
67362DACE527
633A010FA3C3
# Sector 1
F93C98655B9C
67EC0A47B0FB
# Sector 2
54A028818AC7
B2E87E53C5A0
# Sector 3
3E93CF0644B6
79E12280E219
# Sector 4
2204B9FBF033
4537FD238C8E
# Sector 5
D1B44A9DF05F
CFA526835A1F
# Sector 6
21CC007AD81C
C097D0A85446
# Sector 7
D2268262710F
730BB7B8B3DE
# Sector 8
9FE7C5BE7DFF
61AE2D920C79
# Sector 9
78FCD4470C50
B638CAF7357B
# Sector 10
0DC1DD7C8EA2
4C6A6866B934
# Sector 11
03DE2CEB2EA1
93E0118B21ED
# Sector 12
8FBCED387BF4
F57CA95C6EDD
# Sector 13
EF24FE3B4CF7
8B44D303D62F
# Sector 14
B1EA40B2CAA6
3ABF8431003B
# Sector 15 - see above
# SKGT personalised subscription card
# Sector 0, 2, 16, key A
# Sector 8-14, 17-39, key A
# Sector 1, key A
# blue
F1DF0CA8948B
# yellow
7747B4912984
# Sector 3, key A
# blue
09D556D57A4B
# yellow
3ED158C6934E
# Sector 4-7, key A
# blue
839DEDBFEC0D
# yellow
C694A9ED2F9E
# Sector 15 - see above
# Sector 0, 16, key B (blue)
81D55F4551B9
# Sector 0, key B (yellow)
6E9A040C3C91
# Sector 1, key B
# blue
5B72C63FB416
# yellow
A3CDCED46371
# Sector 2, key B
# blue
87A61433D026
# yellow
9CD3A81F11AB
# Sector 3, key B
# blue
7070D331360C
# yellow
836C790F6E2C
# Sector 4-7, key B
# blue
7FE057787C4F
# yellow
FF59C6D13F88
# Sector 8-14, 17-39, key B
536F6669614D
# Sector 15 - see above
# End of SKGT
# Hanoi Bus Rapid Transit - 1/2/3 A
AAAFBA10FC37
C61F2C28DADF
23AACA30CBF2
# Keys dumped from student ID (AGH Cracow - Poland), may be diversified
# Need to be verified
833E4F32589E
432D02DA59F3
5C161CA2716F
F60B5F9666B8
98EAC5321D2F
CC945E3FE5C4
70783C436CF4
2D186C7149A9
5D60AC0939FC
93A5CE63C873
87174550E900
45675B25A3DA
F91750E629D5
A3E662ABCDC8
33D99E9FFA6A
FF7AABA39C61
A8248C049BEA
C2AF731771C4
9263B2E0DD80
CE7FCCBBA5D8
F8E385E5A2A0
B27678B5C4AE
D68D7EBB9551
7AB63F082328
# Payment cards used by Eurest on certain campuses
7E2BC58168EB
# Shower cards provided by Seijsener
291A65CBEA7B
344A359BBAD9
476572726974
4D696368656C
4F3748E6C826
69D40AF8B353
72DEA10F21DF
74845AA8E3F1
8C3C43EDCC55
ACD30DFFB434
D1A27C8EC5DF
F14D329CBDBE
# Hotel cards from Austria
AB287B3B4903
7B0DEDA7E162
# +-----------------------------------------------------------------------------------------------------------------------------------+
# | https://github.com/ikarus23/MifareClassicTool/blob/master/Mifare%20Classic%20Tool/app/src/main/assets/key-files/extended-std.keys |
# +-----------------------------------------------------------------------------------------------------------------------------------+
# UK London Office
435DF6296EC4
2338B4913222
# Acces card of students, and more in Occitanie, France
E9A553102EA5
F982E971CFED
1F42AB9159EE
BBFB836A48B8
B5D170B2E8F5
E76978A05F10
0B1A995DD007
650DB9CEDB6B
13E54B4448B7
3E3540C2C273
A76152840117
066CCC7666BC
3C0B3AC3AFA3
CCB541598D72
1988B5D48EC3
892EEF0D30FB
0FE5CE5CC640
# +----------------------------------------------------------------------------------------------+
# | https://github.com/UberGuidoZ/Flipper/blob/main/NFC/mf_classic_dict/mf_classic_dict_user.nfc |
# +----------------------------------------------------------------------------------------------+
+1 -1
View File
@@ -51,7 +51,7 @@ void subghz_dialog_message_freq_error(SubGhz* subghz, SubGhzTx can_tx) {
default:
return;
case SubGhzTxBlockedRegionNotProvisioned:
message_text = "Region is not\nprovisioned.\nUpdate firmware\nor bypass region.";
message_text = "Missing region file.\nReinstall firmware\nwith Web/App\nor bypass region.";
break;
case SubGhzTxBlockedRegion:
message_text = "Frequency outside\nof region range.\nMNTM > Protocols\n> Bypass Region";
+1 -1
View File
@@ -596,7 +596,7 @@ void cli_plugin_wrapper(const char* name, Cli* cli, FuriString* args, void* cont
handler(cli, args, context);
} else {
printf(
"CLI plugin '%s' failed (code %" PRIu16 "), update firmware or check logs\r\n",
"CLI plugin '%s' failed (code %" PRIu16 "), reinstall firmware or check logs\r\n",
name,
error);
}
+1 -1
View File
@@ -107,7 +107,7 @@ static void loader_show_gui_error(
Storage* storage = furi_record_open(RECORD_STORAGE);
if(storage_sd_status(storage) == FSE_OK) {
header = "Update needed";
text = "Update firmware\nto run this app";
text = "Reinstall firmware\nto run this app";
} else {
header = "SD card needed";
text = "Install SD card\nto run this app";
@@ -46,10 +46,10 @@ int32_t loader_menu_storage_settings(void* context) {
dialog_ex_set_header(dialog_ex, "Update needed", 64, 0, AlignCenter, AlignTop);
dialog_ex_set_text(
dialog_ex,
"Update firmware\n"
"to run this app\n"
"Reinstall firmware\n"
"to run this app.\n"
"Can format SD\n"
"here if needed",
"here if needed.",
3,
17,
AlignLeft,
+100 -2
View File
@@ -2,6 +2,21 @@
#include <loader/loader.h>
#include <lib/toolbox/value_index.h>
#include <locale/locale.h>
#include <dialogs/dialogs.h>
enum VarItemListIndex {
VarItemListIndexHandOrient,
VarItemListIndexUnits,
VarItemListIndexTimeFormat,
VarItemListIndexDateFormat,
VarItemListIndexLogLevel,
VarItemListIndexLogDevice,
VarItemListIndexLogBaudRate,
VarItemListIndexDebug,
VarItemListIndexHeapTrace,
VarItemListIndexSleepMethod,
VarItemListIndexFileNaming,
};
const char* const log_level_text[] = {
"Default",
@@ -80,10 +95,11 @@ const char* const debug_text[] = {
};
static void debug_changed(VariableItem* item) {
SystemSettings* app = variable_item_get_context(item);
uint8_t index = variable_item_get_current_value_index(item);
variable_item_set_current_value_text(item, debug_text[index]);
if(index) {
furi_hal_rtc_set_flag(FuriHalRtcFlagDebug);
view_dispatcher_send_custom_event(app->view_dispatcher, VarItemListIndexDebug);
} else {
furi_hal_rtc_reset_flag(FuriHalRtcFlagDebug);
}
@@ -108,9 +124,13 @@ const uint32_t heap_trace_mode_value[] = {
};
static void heap_trace_mode_changed(VariableItem* item) {
SystemSettings* app = variable_item_get_context(item);
uint8_t index = variable_item_get_current_value_index(item);
variable_item_set_current_value_text(item, heap_trace_mode_text[index]);
furi_hal_rtc_set_heap_track_mode(heap_trace_mode_value[index]);
if(index) {
view_dispatcher_send_custom_event(app->view_dispatcher, VarItemListIndexHeapTrace);
}
}
const char* const measurement_units_text[] = {
@@ -184,10 +204,11 @@ const char* const sleep_method[] = {
};
static void sleep_method_changed(VariableItem* item) {
SystemSettings* app = variable_item_get_context(item);
uint8_t index = variable_item_get_current_value_index(item);
variable_item_set_current_value_text(item, sleep_method[index]);
if(index) {
furi_hal_rtc_set_flag(FuriHalRtcFlagLegacySleep);
view_dispatcher_send_custom_event(app->view_dispatcher, VarItemListIndexSleepMethod);
} else {
furi_hal_rtc_reset_flag(FuriHalRtcFlagLegacySleep);
}
@@ -213,6 +234,81 @@ static uint32_t system_settings_exit(void* context) {
return VIEW_NONE;
}
static bool system_settings_custom_event_callback(void* context, uint32_t event) {
furi_assert(context);
SystemSettings* app = context;
VariableItem* item = variable_item_list_get(app->var_item_list, event);
DialogsApp* dialogs = furi_record_open(RECORD_DIALOGS);
DialogMessage* msg = dialog_message_alloc();
dialog_message_set_buttons(msg, "No", NULL, "Yes");
switch(event) {
case VarItemListIndexDebug:
dialog_message_set_header(msg, "Enable Debug?", 64, 4, AlignCenter, AlignTop);
dialog_message_set_text(
msg,
"This consumes 400% more\n"
"battery life. Don't use unless\n"
"you know exactly what\n"
"you're doing.",
64,
36,
AlignCenter,
AlignCenter);
if(dialog_message_show(dialogs, msg) == DialogMessageButtonRight) {
furi_hal_rtc_set_flag(FuriHalRtcFlagDebug);
} else {
variable_item_set_current_value_text(item, debug_text[0]);
variable_item_set_current_value_index(item, 0);
}
break;
case VarItemListIndexSleepMethod:
dialog_message_set_header(msg, "Disable DeepSleep?", 64, 4, AlignCenter, AlignTop);
dialog_message_set_text(
msg,
"Disabling will consume 400%\n"
"more battery life. Only\n"
"disable if you have a\n"
"specific reason.",
64,
36,
AlignCenter,
AlignCenter);
if(dialog_message_show(dialogs, msg) == DialogMessageButtonRight) {
furi_hal_rtc_set_flag(FuriHalRtcFlagLegacySleep);
} else {
variable_item_set_current_value_text(item, sleep_method[0]);
variable_item_set_current_value_index(item, 0);
}
break;
case VarItemListIndexHeapTrace:
dialog_message_set_header(msg, "Enable Heap Trace?", 64, 4, AlignCenter, AlignTop);
dialog_message_set_text(
msg,
"Will use more RAM and might\n"
"cause Out Of Memory errors.\n"
"Don't enable without a\n"
"specific reason.",
64,
36,
AlignCenter,
AlignCenter);
if(dialog_message_show(dialogs, msg) != DialogMessageButtonRight) {
furi_hal_rtc_set_heap_track_mode(heap_trace_mode_value[0]);
variable_item_set_current_value_text(item, heap_trace_mode_text[0]);
variable_item_set_current_value_index(item, 0);
}
break;
default:
break;
}
dialog_message_free(msg);
furi_record_close(RECORD_DIALOGS);
return true;
}
SystemSettings* system_settings_alloc(void) {
SystemSettings* app = malloc(sizeof(SystemSettings));
@@ -221,6 +317,8 @@ SystemSettings* system_settings_alloc(void) {
app->view_dispatcher = view_dispatcher_alloc();
view_dispatcher_set_event_callback_context(app->view_dispatcher, app);
view_dispatcher_set_custom_event_callback(
app->view_dispatcher, system_settings_custom_event_callback);
view_dispatcher_attach_to_gui(app->view_dispatcher, app->gui, ViewDispatcherTypeFullscreen);
+1
View File
@@ -119,6 +119,7 @@ def pack_font(src: pathlib.Path, dst: pathlib.Path):
.decode("unicode_escape")
.encode("latin_1")
)
font += b"\0"
dst.with_suffix(".u8f").write_bytes(font)
elif src.suffix == ".u8f":
if not dst.is_file():