From 1b41e8968b61e00701f5acfe2f539dffcff9af85 Mon Sep 17 00:00:00 2001 From: DerSkythe Date: Mon, 18 Dec 2023 11:26:42 +0400 Subject: [PATCH 1/6] Update name_generator_make_auto invocation based on attack type Added a conditional statement that checks the type of SubBrute attack. If the attack type is SubBruteAttackLoadFile, the name_generator_make_auto function is invoked with a different argument, else the existing argument is used. This modification ensures proper name generation depending on the attack type. --- scenes/subbrute_scene_save_name.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/scenes/subbrute_scene_save_name.c b/scenes/subbrute_scene_save_name.c index 4e35f5e..7628a47 100644 --- a/scenes/subbrute_scene_save_name.c +++ b/scenes/subbrute_scene_save_name.c @@ -9,11 +9,17 @@ void subbrute_scene_save_name_on_enter(void* context) { // Setup view TextInput* text_input = instance->text_input; - name_generator_make_auto( - instance->text_store, - sizeof(instance->text_store), - subbrute_protocol_file(instance->device->protocol_info->file)); - + if(instance->device->attack == SubBruteAttackLoadFile) { + name_generator_make_auto( + instance->text_store, + sizeof(instance->text_store), + subbrute_protocol_file(instance->device->file_protocol_info->file)); + } else { + name_generator_make_auto( + instance->text_store, + sizeof(instance->text_store), + subbrute_protocol_file(instance->device->protocol_info->file)); + } text_input_set_header_text(text_input, "Name of file"); text_input_set_result_callback( text_input, From 1e7795cd8fe3a4f444b40ccb4ee7efc66e1c921c Mon Sep 17 00:00:00 2001 From: DerSkythe Date: Mon, 18 Dec 2023 21:35:52 +0400 Subject: [PATCH 2/6] feat:Update Sub-GHz BruteForcer version and clean up subbrute_main_view Updated the version identifier for Sub-GHz BruteForcer in the subbrute_i header file. In the subbrute_main_view file, unnecessary comments and function invocations have been removed, and a condition to check if the model index is smaller than 7 has been added. This cleanup makes the code more readable and easier to maintain, while the version update makes tracking changes in functionality easier. --- subbrute_i.h | 2 +- views/subbrute_main_view.c | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/subbrute_i.h b/subbrute_i.h index 6e99a63..bdecd10 100644 --- a/subbrute_i.h +++ b/subbrute_i.h @@ -31,7 +31,7 @@ #include "views/subbrute_attack_view.h" #include "views/subbrute_main_view.h" -#define SUBBRUTEFORCER_VER "Sub-GHz BruteForcer 3.9" +#define SUBBRUTEFORCER_VER "Sub-GHz BruteForcer 3.A" #ifdef FURI_DEBUG //#define SUBBRUTE_FAST_TRACK false diff --git a/views/subbrute_main_view.c b/views/subbrute_main_view.c index 9b63606..de40670 100644 --- a/views/subbrute_main_view.c +++ b/views/subbrute_main_view.c @@ -112,18 +112,12 @@ void subbrute_main_view_draw_is_byte_selected(Canvas* canvas, SubBruteMainViewMo #ifdef FURI_DEBUG //FURI_LOG_D(TAG, "key_from_file: %s", model->key_from_file); #endif - //char msg_index[18]; - //snprintf(msg_index, sizeof(msg_index), "Field index: %d", model->index); canvas_set_font(canvas, FontSecondary); canvas_draw_str_aligned( canvas, 64, 17, AlignCenter, AlignTop, "Please select values to calc:"); subbrute_main_view_center_displayed_key( canvas, model->key_from_file, model->index, model->two_bytes); - //const char* line = furi_string_get_cstr(menu_items); - //canvas_set_font(canvas, FontSecondary); - //canvas_draw_str_aligned( - // canvas, 64, 37, AlignCenter, AlignTop, furi_string_get_cstr(menu_items)); elements_button_center(canvas, "Select"); if(model->index > 0) { @@ -132,6 +126,7 @@ void subbrute_main_view_draw_is_byte_selected(Canvas* canvas, SubBruteMainViewMo if(model->index < 7) { elements_button_right(canvas, " "); } + // Switch to another mode if(model->two_bytes) { elements_button_top_left(canvas, "One byte"); From 81fe0673421b44667e334113abd8b919fe9bee3e Mon Sep 17 00:00:00 2001 From: derskythe Date: Mon, 18 Dec 2023 17:48:36 +0000 Subject: [PATCH 3/6] docs: update `CHANGELOG.md` Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a9b16b8..ccb9069 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## [v3.10.0](https://github.com/DarkFlippers/flipperzero-subbrute/tree/v3.10.0) (2023-11-04) + +[Full Changelog](https://github.com/DarkFlippers/flipperzero-subbrute/compare/v3.9.2...v3.10.0) + ## [v3.9.2](https://github.com/DarkFlippers/flipperzero-subbrute/tree/v3.9.2) (2023-11-04) [Full Changelog](https://github.com/DarkFlippers/flipperzero-subbrute/compare/v3.9.1...v3.9.2) From f0b1731673eda2fe0a47341c86c6637d2bfaa56d Mon Sep 17 00:00:00 2001 From: DerSkythe <31771569+derskythe@users.noreply.github.com> Date: Mon, 18 Dec 2023 21:54:21 +0400 Subject: [PATCH 4/6] Update CHANGELOG.md Signed-off-by: DerSkythe <31771569+derskythe@users.noreply.github.com> --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ccb9069..24dc7db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ [Full Changelog](https://github.com/DarkFlippers/flipperzero-subbrute/compare/v3.9.2...v3.10.0) +**Fixed bugs:** + +- NULL pointer exception on existing dump BF save [\#50](https://github.com/DarkFlippers/flipperzero-subbrute/pull/50) ([derskythe](https://github.com/derskythe)) + ## [v3.9.2](https://github.com/DarkFlippers/flipperzero-subbrute/tree/v3.9.2) (2023-11-04) [Full Changelog](https://github.com/DarkFlippers/flipperzero-subbrute/compare/v3.9.1...v3.9.2) From 970d608100436e30794bbbcfb1d69be6b3d176e1 Mon Sep 17 00:00:00 2001 From: DerSkythe <31771569+derskythe@users.noreply.github.com> Date: Tue, 19 Dec 2023 14:12:01 +0400 Subject: [PATCH 5/6] ci: update changelog.yml Disable autorun Signed-off-by: DerSkythe <31771569+derskythe@users.noreply.github.com> --- .github/workflows/changelog.yml | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index 6492eff..0ab1703 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -33,18 +33,27 @@ jobs: repo: ${{ github.repository }} output: CHANGELOG.md unreleased: false + issues: true + prWoLabels: true stripGeneratorNotice: true + verbose: true + breakingLabels: true + enhancementLabels: true + bugLabels: true + deprecatedLabels: true + removedLabels: true + securityLabels: true - name: "Show CHANGELOG.md" run: cat CHANGELOG.md - - name: "Commit changes" - uses: stefanzweifel/git-auto-commit-action@v4 - with: - commit_message: "docs: update `CHANGELOG.md`" - file_pattern: "*.md" - branch: ${{ github.ref_name }} - commit_options: '--no-verify --signoff' - # skip_dirty_check: true - # skip_checkout: true - # skip_fetch: true \ No newline at end of file +# - name: "Commit changes" +# uses: stefanzweifel/git-auto-commit-action@v4 +# with: +# commit_message: "docs: update `CHANGELOG.md`" +# file_pattern: "*.md" +# branch: ${{ github.ref_name }} +# commit_options: '--no-verify --signoff' +# # skip_dirty_check: true +# # skip_checkout: true +# # skip_fetch: true From 9155b3a366573d63d70262dc19694339b48b9c08 Mon Sep 17 00:00:00 2001 From: DerSkythe <31771569+derskythe@users.noreply.github.com> Date: Tue, 19 Dec 2023 14:15:13 +0400 Subject: [PATCH 6/6] ci: Update changelog.yml Signed-off-by: DerSkythe <31771569+derskythe@users.noreply.github.com> --- .github/workflows/changelog.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index 0ab1703..08a7811 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -33,16 +33,8 @@ jobs: repo: ${{ github.repository }} output: CHANGELOG.md unreleased: false - issues: true - prWoLabels: true stripGeneratorNotice: true verbose: true - breakingLabels: true - enhancementLabels: true - bugLabels: true - deprecatedLabels: true - removedLabels: true - securityLabels: true - name: "Show CHANGELOG.md" run: cat CHANGELOG.md