From 237d2ba1a01ff1ea371d92bdaf0df7527c1ac845 Mon Sep 17 00:00:00 2001 From: gid9798 <30450294+gid9798@users.noreply.github.com> Date: Tue, 6 Jun 2023 11:14:23 +0300 Subject: [PATCH] Fuzzer App: field_editor view V2 --- .../pacs_fuzzer/icons/ButtonLeft_4x7.png | Bin 0 -> 1415 bytes .../pacs_fuzzer/icons/ButtonRight_4x7.png | Bin 0 -> 1839 bytes .../external/pacs_fuzzer/icons/Ok_btn_9x9.png | Bin 0 -> 3605 bytes .../pacs_fuzzer/icons/Pin_arrow_up_7x9.png | Bin 0 -> 3603 bytes .../pacs_fuzzer/icons/Pin_back_arrow_10x8.png | Bin 0 -> 3606 bytes applications/external/pacs_fuzzer/todo.md | 2 +- .../external/pacs_fuzzer/views/attack.c | 42 +++---- .../external/pacs_fuzzer/views/field_editor.c | 108 ++++++++++++------ .../external/pacs_fuzzer/views/main_menu.c | 1 - 9 files changed, 94 insertions(+), 59 deletions(-) create mode 100644 applications/external/pacs_fuzzer/icons/ButtonLeft_4x7.png create mode 100644 applications/external/pacs_fuzzer/icons/ButtonRight_4x7.png create mode 100644 applications/external/pacs_fuzzer/icons/Ok_btn_9x9.png create mode 100644 applications/external/pacs_fuzzer/icons/Pin_arrow_up_7x9.png create mode 100644 applications/external/pacs_fuzzer/icons/Pin_back_arrow_10x8.png diff --git a/applications/external/pacs_fuzzer/icons/ButtonLeft_4x7.png b/applications/external/pacs_fuzzer/icons/ButtonLeft_4x7.png new file mode 100644 index 0000000000000000000000000000000000000000..0b4655d43247083aa705620e9836ac415b42ca46 GIT binary patch literal 1415 zcmbVM+iKK67*5rq)>aU2M7$VM1Vxif;vTv~W2u`S7ED{V3s&&L*<`XiG|9wd+THd> z5CnY!sdyuJtrvQyAo>KpiLcV|{Tkc)riAbluXfwSZCApL`ztB&p zx6LGKvks4K_4~)qD&oGa-YdJlW)hAKMNJd7<=t?6c^RI1>c$ifyjaM>^|&8!ey zB4!nh9u>5uen6Ve@<H5rru6h<2Ef#GQdQ*CmZOlQi~N!?9H`Rp;C% zU}CB21#?;r`&0|6C0}b-=jODa5|nEJ#ntxQ&{~jpgtwDta4hftr~G=#p@V36e4Zjh zq%J~{y26Jjn=1Nw-l*3%QW5YFE*v4z3gt0$&(*xf2en34c?JpH8+FYldo+Alvg8af-pG4(=!fyUi-Wsg z`g#n9VUcf(DFr{poMSNzw-lz>w+HV+n1ELr&SLA#LHUb0p(xWQ(1*vJ-i+1!`swxZ Z!O7;c$;lT_->m1Ovaz)0yuI`A$q$F8u*d)a literal 0 HcmV?d00001 diff --git a/applications/external/pacs_fuzzer/icons/ButtonRight_4x7.png b/applications/external/pacs_fuzzer/icons/ButtonRight_4x7.png new file mode 100644 index 0000000000000000000000000000000000000000..8e1c74c1c0038ea55172f19ac875003fc80c2d06 GIT binary patch literal 1839 zcmcIlO>f*p7#Yw)M6zw!O+@VZ{?d|D~WYi~8rHRY?X-&T}Yen`g$^+EJ;z+|RV zE@PoDvZ9%#+_}3bC_5Cj8jDGq541mi{7F+&KF}W65sr$Xn5H|YrMQ2(J7%Yc%;(zO z57ax000=TsQ+1Ke@+w#iw3au3cGGQWY740k2ijH>P(6tD)S)be>gX6Tj7`<`b>di- zgWp$8Y+?i31~CzF0&E4uRlA=C(Mp~K`{74jEchB|)4DDK!ZVhSwdFyw0YIZ1cDh0S{OvfO-U_~ zvmRF*m9sWDXNH)GOyqS1Skhxbr6}s*7t&@~kFM(NW5}qh?Lu@lJ}HE;FDiLdGO>LO z5pS*%E2grR)l^;|?O5b_?u0me&c1U}%jrk8*%=Wk%i)8yp2P|kuxmKg<=(u_`oQRI_0 zS`-DNysBx=#3&qSkgA@hJP>~D+ZM(s5jI6Owp`?yE=3e`YGUqkVOp#Cp=3wR3O4hX zX6BLsN3UBzV(vI5;|SZHgOb=HD0VFjpTyfFW}GnQuh>2*Q`k>*cAmA#iUT7EXSpo# zkPm5~#I-o^cpgfe#P$=4-Pi*SpT!-@nJgp8L347xe>5EKl`=_ZFc8XGy+_j=_R_7! z@vZZMowS1GJ?Zw)eetks%~G{BTR>T}9|jt0j3Btyb*C3-`C?fwY3EY`q*oYZ39DpM z&uJ;PCZPLs4QO1Jd_|A1PF)azZJ)RZ`^-VMWr6e#XUOA%3eLG_Ch@BDOHzMk*MF0G zCo7xMd?Mg*HMIXw%nNz?%60fZiZPlqb?GqUpXO`F&Yi!okZl(n>P@r1P2i)yk3DgRwbHeNn6e|;J^SK4TM LH~i+q&mR8;k>NTA literal 0 HcmV?d00001 diff --git a/applications/external/pacs_fuzzer/icons/Ok_btn_9x9.png b/applications/external/pacs_fuzzer/icons/Ok_btn_9x9.png new file mode 100644 index 0000000000000000000000000000000000000000..9a1539da2049f12f7b25f96b11a9c40cd8227302 GIT binary patch literal 3605 zcmaJ@c{r5q+kR|?vSeS9G2*Q(Gqz$f_GQ#q8r!JE7=ytqjlqnNNGaK}Wlbolp-q`& zs|bxHiiEP0&{#s&zVZIv-rx7f*Y_O9^W67+-RF5;*L_{ra~$^-2RmyaK{-JH0EBE1 z7AVdru>JD$aK0bym%#uaXpT2Gcd#)x2azcxAABGV0BC)Aj-lw(6)B^^6`Y8RS?}DV z%)ko(See1!Eb3M$dL6)A6csaRjExg?k&xVzi*Rm;?iNJk#f=mkVEUR~jXN3dd|Lmz z;y}sMh%ol-?E1&`>dD;6jdps6NYoxN)s%@sf4~40YY6LAOtMEbwA4g#OCpANL823^ zSH66W05Hcxr$tg98gFntAOYL}xm$C;Skv&Ym?{TVR{)d(41vWacX1`7fM!jnW(lBK z26*WB#9I(Z1Ast!xEUC@Cj`v=urcBTdP`FWq=DYTy`}s>0vC{VzHdNRvxNFy}ir1|g=xDsrFP&l1P<-Sv zXLqYVYz{b^ZIV@1Ulg->7DEgvM*Min&Y8{8QW! z$_pA434?^wCTq$4%^>Zo8&|8XwbCv;KEd;WJJ{s;T}8R8Zwi7ssk$QWQ5l5+opKfX z;8D*COFEB#4W^*FIrRU%PDSc?B(}+9ZV?N9(yH>0uSnM?xg!>+>;e z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11cI@{U7;B zQ-8QzAye z?YX)QgQSmUMA3ROrqjb8(+}^Keqk~C{I7xACr^BG`h2tXW#7w|fwa?Q^Pou#Tc-nA z6Ux=gqvW7&R`EYy$;(ndrfyqZ_A8PP|3nOJFp782&dJ(|nq3+>oA{}~w;(&q!3^~- zt&hEkT}cb_JmgvBk8aC0Q(}I_mU%5U&3zn?_nfJue}^pk^lFtIEJ78dY$NHbLzw$V zXp^Kx-n6?(G4s3qJ66M%C`$TCPDSu}Lmjrwww;{p%X+9*d9fjae!jTBR?Bh)&695p|Np`_A@%C6Gkw(!c ztlQ|bD0BfD08GqSbOJGm#02}0{K-@lg#WAt0w(*SAnr!?Fncs1cZ-)AAzU~M!*noC|vOF)r0RvA`FmlWAHx@MBtF&>xaZy+5F>9 zprIfEOeP%(g@%WR>xUcY(-{6xxUsP@6o!Bz5PAX&y%08)Nnq(wLo|OgSdl`A3^JWb zrcuG`j07KAC=&${1pA*XDD;16sUiPVN>DQ>i$I6M^|Nl)Xlz**5m^jjZ zpQ#thS=L9?WiG40+mRzvqC`xB>H5sFVffs4KqX-!S)&$7{TGz=zWF=INHY2 z0tT}-KpPtw|HfL;h@lh`mH8X%`(G^lkJ$BrpwI=Ltw;=V7|GX$L8E~G&KgPnV=RW& zf8_fI>-)!83~m01g$ja!uJ`tT_4@agV1U-ee}`9~{5$?6s$k|Bg5ln!QST+V7#p3i zF4n&y*YC(C3v7{K(X_L&aAEcMczb*MMhV&2h)M`^tW<_XOB8+kL0OWLfY3%j)E-d2 TFC+3}9cE|kU{!4CefEC<&8td2 literal 0 HcmV?d00001 diff --git a/applications/external/pacs_fuzzer/todo.md b/applications/external/pacs_fuzzer/todo.md index 7afd3fad8..9070e6363 100644 --- a/applications/external/pacs_fuzzer/todo.md +++ b/applications/external/pacs_fuzzer/todo.md @@ -22,7 +22,7 @@ - [x] Rewrite `gui_const` logic - [ ] Separate protocol name from `fuzzer_proto_items` - [x] Icon in dialog - - [ ] Description and buttons in `field_editor` view + - [x] Description and buttons in `field_editor` view - [ ] Protocol carousel in `main_menu` - [x] prototype - [x] UID diff --git a/applications/external/pacs_fuzzer/views/attack.c b/applications/external/pacs_fuzzer/views/attack.c index ad99f0132..13e2325fd 100644 --- a/applications/external/pacs_fuzzer/views/attack.c +++ b/applications/external/pacs_fuzzer/views/attack.c @@ -18,7 +18,7 @@ typedef struct { const char* attack_name; const char* protocol_name; FuzzerAttackState attack_state; - char* uid; + FuriString* uid_str; } FuzzerViewAttackModel; void fuzzer_view_attack_reset_data( @@ -34,38 +34,25 @@ void fuzzer_view_attack_reset_data( model->attack_name = attack_name; model->protocol_name = protocol_name; model->attack_state = FuzzerAttackStateIdle; - strcpy(model->uid, "Not_set"); + furi_string_set_str(model->uid_str, "Not_set"); }, true); } void fuzzer_view_attack_set_uid(FuzzerViewAttack* view, const FuzzerPayload uid) { furi_assert(view); - - // TODO fix it - uint8_t* data = malloc(uid.data_size); - memcpy(data, uid.data, uid.data_size); + furi_assert(uid.data); with_view_model( view->view, FuzzerViewAttackModel * model, { - snprintf( - model->uid, - uid.data_size * 3, - "%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X", - data[0], - data[1], - data[2], - data[3], - data[4], - data[5], - data[6], - data[7]); + furi_string_printf(model->uid_str, "%02X", uid.data[0]); + for(uint8_t i = 1; i < uid.data_size; i++) { + furi_string_cat_printf(model->uid_str, ":%02X", uid.data[i]); + } }, true); - - free(data); } void fuzzer_view_attack_start(FuzzerViewAttack* view) { @@ -133,10 +120,11 @@ void fuzzer_view_attack_draw(Canvas* canvas, FuzzerViewAttackModel* model) { canvas_draw_str_aligned(canvas, 64, 26, AlignCenter, AlignTop, model->protocol_name); canvas_set_font(canvas, FontPrimary); - if(128 < canvas_string_width(canvas, model->uid)) { + if(128 < canvas_string_width(canvas, furi_string_get_cstr(model->uid_str))) { canvas_set_font(canvas, FontSecondary); } - canvas_draw_str_aligned(canvas, 64, 38, AlignCenter, AlignTop, model->uid); + canvas_draw_str_aligned( + canvas, 64, 38, AlignCenter, AlignTop, furi_string_get_cstr(model->uid_str)); canvas_set_font(canvas, FontSecondary); if(model->attack_state == FuzzerAttackStateRunning) { @@ -245,10 +233,11 @@ FuzzerViewAttack* fuzzer_view_attack_alloc() { FuzzerViewAttackModel * model, { model->time_delay = FUZZ_TIME_DELAY_MIN; - model->uid = malloc(ATTACK_SCENE_MAX_UID_LENGTH + 1); + model->uid_str = furi_string_alloc_set_str("Not_set"); + // malloc(ATTACK_SCENE_MAX_UID_LENGTH + 1); model->attack_state = FuzzerAttackStateOff; - strcpy(model->uid, "Not_set"); + // strcpy(model->uid_str, "Not_set"); model->attack_name = "Not_set"; model->protocol_name = "Not_set"; }, @@ -260,7 +249,10 @@ void fuzzer_view_attack_free(FuzzerViewAttack* view_attack) { furi_assert(view_attack); with_view_model( - view_attack->view, FuzzerViewAttackModel * model, { free(model->uid); }, true); + view_attack->view, + FuzzerViewAttackModel * model, + { furi_string_free(model->uid_str); }, + true); view_free(view_attack->view); free(view_attack); } diff --git a/applications/external/pacs_fuzzer/views/field_editor.c b/applications/external/pacs_fuzzer/views/field_editor.c index 53e15e152..07a19ae0e 100644 --- a/applications/external/pacs_fuzzer/views/field_editor.c +++ b/applications/external/pacs_fuzzer/views/field_editor.c @@ -5,8 +5,21 @@ #include #include +#define FIELD_EDITOR_V2 + +#define GUI_DISPLAY_WIDTH 128 +#define GUI_DISPLAY_HEIGHT 64 + +#define GUI_DISPLAY_HORIZONTAL_CENTER 64 +#define GUI_DISPLAY_VERTICAL_CENTER 32 + #define UID_STR_LENGTH 25 + +#ifdef FIELD_EDITOR_V2 +#define EDITOR_STRING_Y 38 +#else #define EDITOR_STRING_Y 50 +#endif struct FuzzerViewFieldEditor { View* view; @@ -14,7 +27,6 @@ struct FuzzerViewFieldEditor { void* context; }; -// TODO model typedef struct { uint8_t* uid; uint8_t uid_size; @@ -72,15 +84,55 @@ void fuzzer_view_field_editor_draw(Canvas* canvas, FuzzerViewFieldEditorModel* m canvas_clear(canvas); canvas_set_color(canvas, ColorBlack); +#ifdef FIELD_EDITOR_V2 + canvas_set_font(canvas, FontSecondary); - canvas_draw_str_aligned(canvas, 64, 5, AlignCenter, AlignTop, "Left and right: select byte"); - canvas_draw_str_aligned(canvas, 64, 15, AlignCenter, AlignTop, "Up and down: adjust byte"); + + canvas_draw_icon(canvas, 2, 4, &I_ButtonLeft_4x7); + canvas_draw_icon(canvas, 8, 4, &I_ButtonRight_4x7); + + canvas_draw_icon_ex(canvas, 62, 3, &I_Pin_arrow_up_7x9, IconRotation180); + canvas_draw_icon(canvas, 69, 3, &I_Pin_arrow_up_7x9); + + canvas_draw_str(canvas, 14, 10, "select byte"); + canvas_draw_str(canvas, 79, 10, "adjust byte"); char msg_index[18]; canvas_set_font(canvas, FontPrimary); snprintf(msg_index, sizeof(msg_index), "Field index : %d", model->index); - canvas_draw_str_aligned(canvas, 64, 30, AlignCenter, AlignTop, msg_index); + canvas_draw_str_aligned( + canvas, GUI_DISPLAY_HORIZONTAL_CENTER, 24, AlignCenter, AlignBottom, msg_index); + + canvas_set_font(canvas, FontSecondary); + canvas_draw_icon(canvas, 4, 52, &I_Pin_back_arrow_10x8); + canvas_draw_icon(canvas, 85, 52, &I_Ok_btn_9x9); + + canvas_draw_str(canvas, 16, 60, "Back"); + canvas_draw_str(canvas, 96, 60, "Attack"); +#else + canvas_set_font(canvas, FontSecondary); + canvas_draw_str_aligned( + canvas, + GUI_DISPLAY_HORIZONTAL_CENTER, + 5, + AlignCenter, + AlignTop, + "Left and right: select byte"); + canvas_draw_str_aligned( + canvas, + GUI_DISPLAY_HORIZONTAL_CENTER, + 15, + AlignCenter, + AlignTop, + "Up and down: adjust byte"); + + char msg_index[18]; + canvas_set_font(canvas, FontPrimary); + snprintf(msg_index, sizeof(msg_index), "Field index : %d", model->index); + canvas_draw_str_aligned( + canvas, GUI_DISPLAY_HORIZONTAL_CENTER, 28, AlignCenter, AlignTop, msg_index); +#endif // ####### Editor ####### FuriString* temp_s = model->uid_str; canvas_set_font(canvas, FontSecondary); @@ -88,7 +140,7 @@ void fuzzer_view_field_editor_draw(Canvas* canvas, FuzzerViewFieldEditorModel* m furi_string_reset(temp_s); for(int i = -3; i != 0; i++) { if(0 <= (model->index + i)) { - furi_string_cat_printf(temp_s, "%2X ", model->uid[model->index + i]); + furi_string_cat_printf(temp_s, "%02X ", model->uid[model->index + i]); } } canvas_draw_str_aligned( @@ -97,7 +149,7 @@ void fuzzer_view_field_editor_draw(Canvas* canvas, FuzzerViewFieldEditorModel* m furi_string_reset(temp_s); for(int i = 1; i != 4; i++) { if((model->index + i) < model->uid_size) { - furi_string_cat_printf(temp_s, " %2X", model->uid[model->index + i]); + furi_string_cat_printf(temp_s, " %02X", model->uid[model->index + i]); } } canvas_draw_str_aligned( @@ -108,16 +160,31 @@ void fuzzer_view_field_editor_draw(Canvas* canvas, FuzzerViewFieldEditorModel* m furi_string_reset(temp_s); furi_string_cat_printf(temp_s, "<%02X>", model->uid[model->index]); canvas_draw_str_aligned( - canvas, 64, EDITOR_STRING_Y, AlignCenter, AlignBottom, furi_string_get_cstr(temp_s)); + canvas, + GUI_DISPLAY_HORIZONTAL_CENTER, + EDITOR_STRING_Y, + AlignCenter, + AlignBottom, + furi_string_get_cstr(temp_s)); uint16_t w = canvas_string_width(canvas, furi_string_get_cstr(temp_s)); w -= 11; // '<' & '>' w /= 2; if(model->lo) { - canvas_draw_line(canvas, 64 + 1, EDITOR_STRING_Y + 2, 64 + w, EDITOR_STRING_Y + 2); + canvas_draw_line( + canvas, + GUI_DISPLAY_HORIZONTAL_CENTER + 1, + EDITOR_STRING_Y + 2, + GUI_DISPLAY_HORIZONTAL_CENTER + w, + EDITOR_STRING_Y + 2); } else { - canvas_draw_line(canvas, 64 - w, EDITOR_STRING_Y + 2, 64 - 1, EDITOR_STRING_Y + 2); + canvas_draw_line( + canvas, + GUI_DISPLAY_HORIZONTAL_CENTER - w, + EDITOR_STRING_Y + 2, + GUI_DISPLAY_HORIZONTAL_CENTER - 1, + EDITOR_STRING_Y + 2); } // ####### Editor ####### } @@ -211,29 +278,6 @@ bool fuzzer_view_field_editor_input(InputEvent* event, void* context) { void fuzzer_view_field_editor_enter(void* context) { furi_assert(context); - // TODO delete only for debug - // FuzzerViewFieldEditor* view_edit = context; - // uint8_t temp[8] = { - // 0x12, - // 0x34, - // 0x56, - // 0x78, - // 0x90, - // 0xAB, - // 0xCD, - // 0xEF, - // }; - // with_view_model( - // view_edit->view, - // FuzzerViewFieldEditorModel * model, - // { - // memcpy(model->uid, &temp, 8); - - // // memset(model->uid, 0xCC, 8); - // model->index = 0; - // model->uid_size = 8; - // }, - // true); } void fuzzer_view_field_editor_exit(void* context) { diff --git a/applications/external/pacs_fuzzer/views/main_menu.c b/applications/external/pacs_fuzzer/views/main_menu.c index 49b0a0d9c..14422145b 100644 --- a/applications/external/pacs_fuzzer/views/main_menu.c +++ b/applications/external/pacs_fuzzer/views/main_menu.c @@ -14,7 +14,6 @@ struct FuzzerViewMain { void* context; }; -// TODO Furi string for procol name typedef struct { uint8_t proto_index; uint8_t menu_index;