Skip to content

Commit

Permalink
Merge pull request #396 from ESurge/420
Browse files Browse the repository at this point in the history
Bad USB as FAP
  • Loading branch information
RogueMaster authored Nov 4, 2022
2 parents 5fa48b7 + eaa5adc commit 550dc6f
Show file tree
Hide file tree
Showing 35 changed files with 37 additions and 2 deletions.
3 changes: 2 additions & 1 deletion applications/main/application.fam
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ App(
"lfrfid",
"nfc",
"subghz",
"bad_usb",
#"bad_usb",
"bad_usb_loader",
# "u2f",
"u2f_loader",
"fap_loader",
Expand Down
8 changes: 8 additions & 0 deletions applications/main/archive/scenes/archive_scene_browser.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,14 @@ static void archive_run_in_app(ArchiveBrowserView* browser, ArchiveFile_t* selec
char* result =
malloc(strlen(tmpType) + strlen(furi_string_get_cstr(selected->path)) + 1);

strcpy(result, tmpType);
strcat(result, furi_string_get_cstr(selected->path));
status = loader_start(loader, "Applications", result);
} else if(strcmp(flipper_app_name[selected->type], "Bad USB") == 0) {
char* tmpType = "/ext/apps/Main/bad_usb.fap¯";
char* result =
malloc(strlen(tmpType) + strlen(furi_string_get_cstr(selected->path)) + 1);

strcpy(result, tmpType);
strcat(result, furi_string_get_cstr(selected->path));
status = loader_start(loader, "Applications", result);
Expand Down
5 changes: 4 additions & 1 deletion applications/main/bad_usb/application.fam
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
App(
appid="bad_usb",
name="Bad USB",
apptype=FlipperAppType.APP,
apptype=FlipperAppType.EXTERNAL,
entry_point="bad_usb_app",
cdefines=["APP_BAD_USB"],
requires=[
Expand All @@ -11,4 +11,7 @@ App(
stack_size=2 * 1024,
icon="A_BadUsb_14",
order=70,
fap_category="Main",
fap_icon="badusb_10px.png",
fap_icon_assets="images",
)
Binary file added applications/main/bad_usb/badusb_10px.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added applications/main/bad_usb/images/Clock_18x18.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added applications/main/bad_usb/images/Error_18x18.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added applications/main/bad_usb/images/Smile_18x18.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added applications/main/bad_usb/images/badusb_10px.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added applications/main/bad_usb/images/keyboard_10px.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions applications/main/bad_usb_loader/application.fam
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
App(
appid="bad_usb_loader",
name="Bad USB",
apptype=FlipperAppType.APP,
entry_point="bad_usb_loader_app",
requires=[
"gui",
"dialogs",
],
stack_size=int(2 * 1024),
icon="A_BadUsb_14",
order=80,
link="/ext/apps/Main/bad_usb.fap",
)
9 changes: 9 additions & 0 deletions applications/main/bad_usb_loader/bad_usb_loader_app.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#include <applications/services/loader/loader_i.h>

#define TAG "bad_usb_loader_app"

int32_t bad_usb_loader_app(void* p) {
UNUSED(p);

return 0;
}
File renamed without changes

0 comments on commit 550dc6f

Please sign in to comment.