mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-24 03:29:57 -07:00
Magspoof move folder and add example files
This commit is contained in:
10
applications/external/magspoof/mag.c
vendored
10
applications/external/magspoof/mag.c
vendored
@@ -168,8 +168,6 @@ int32_t mag_app(void* p) {
|
||||
Mag* mag = mag_alloc();
|
||||
UNUSED(p);
|
||||
|
||||
mag_make_app_folder(mag);
|
||||
|
||||
view_dispatcher_attach_to_gui(mag->view_dispatcher, mag->gui, ViewDispatcherTypeFullscreen);
|
||||
scene_manager_next_scene(mag->scene_manager, MagSceneStart);
|
||||
|
||||
@@ -180,14 +178,6 @@ int32_t mag_app(void* p) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
void mag_make_app_folder(Mag* mag) {
|
||||
furi_assert(mag);
|
||||
|
||||
if(!storage_simply_mkdir(mag->storage, MAG_APP_FOLDER)) {
|
||||
dialog_message_show_storage_error(mag->dialogs, "Cannot create\napp folder");
|
||||
}
|
||||
}
|
||||
|
||||
void mag_text_store_set(Mag* mag, const char* text, ...) {
|
||||
furi_assert(mag);
|
||||
va_list args;
|
||||
|
||||
2
applications/external/magspoof/mag_device.c
vendored
2
applications/external/magspoof/mag_device.c
vendored
@@ -76,8 +76,6 @@ static bool mag_device_save_file(
|
||||
// Make path to file to be saved
|
||||
furi_string_cat_printf(temp_str, "/%s%s", dev_name, extension);
|
||||
} else {
|
||||
// Create mag directory if necessary
|
||||
if(!storage_simply_mkdir((mag_dev->storage), MAG_APP_FOLDER)) break;
|
||||
// First remove mag device file if it was saved
|
||||
furi_string_printf(temp_str, "%s/%s%s", folder, dev_name, extension);
|
||||
}
|
||||
|
||||
2
applications/external/magspoof/mag_device.h
vendored
2
applications/external/magspoof/mag_device.h
vendored
@@ -11,7 +11,7 @@
|
||||
#define MAG_DEV_NAME_MAX_LEN 22
|
||||
#define MAG_DEV_TRACKS 3
|
||||
|
||||
#define MAG_APP_FOLDER ANY_PATH("mag")
|
||||
#define MAG_APP_FOLDER STORAGE_APP_DATA_PATH_PREFIX
|
||||
#define MAG_APP_EXTENSION ".mag"
|
||||
|
||||
typedef void (*MagLoadingCallback)(void* context, bool state);
|
||||
|
||||
2
applications/external/magspoof/mag_i.h
vendored
2
applications/external/magspoof/mag_i.h
vendored
@@ -92,8 +92,6 @@ void mag_text_store_clear(Mag* mag);
|
||||
|
||||
void mag_show_loading_popup(void* context, bool show);
|
||||
|
||||
void mag_make_app_folder(Mag* mag);
|
||||
|
||||
void mag_popup_timeout_callback(void* context);
|
||||
|
||||
void mag_widget_callback(GuiButtonType result, InputType type, void* context);
|
||||
|
||||
7
assets/resources/apps_data/magspoof/SamyExampleImage.mag
Normal file
7
assets/resources/apps_data/magspoof/SamyExampleImage.mag
Normal file
@@ -0,0 +1,7 @@
|
||||
Filetype: Flipper Mag device
|
||||
Version: 1
|
||||
# Mag device track data
|
||||
# Data matching image example in Samy's repo, for ease of comparison
|
||||
Track 1: %B426684131234567^LASTNAME/FIRST^YYMMSSSDDDDDDDDDDDDDDDDDDDDDDDDD?
|
||||
Track 2: ;426684131234567=230188855555555555555?
|
||||
Track 3:
|
||||
7
assets/resources/apps_data/magspoof/SamyExpiredCard.mag
Normal file
7
assets/resources/apps_data/magspoof/SamyExpiredCard.mag
Normal file
@@ -0,0 +1,7 @@
|
||||
Filetype: Flipper Mag device
|
||||
Version: 1
|
||||
# Mag device track data
|
||||
# Found in samyk's MagSpoof branch f150bb783237051fba7e4e6ed96a722e542a9663; using as test data, card is long expired
|
||||
Track 1: %B493173000682759^URISTA HDZ-IVAN JAVIER ^150220100234000000?
|
||||
Track 2: ;493173000682759=15022100000234?
|
||||
Track 3:
|
||||
6
assets/resources/apps_data/magspoof/TestMagstripe.mag
Normal file
6
assets/resources/apps_data/magspoof/TestMagstripe.mag
Normal file
@@ -0,0 +1,6 @@
|
||||
Filetype: Flipper Mag device
|
||||
Version: 1
|
||||
# Mag device track data
|
||||
Track 1: %B123456781234567^LASTNAME/FIRST^YYMMSSSDDDDDDDDDDDDDDDDDDDDDDDDD?
|
||||
Track 2: ;123456781234567=YYMMSSSDDDDDDDDDDDDDD?
|
||||
Track 3:
|
||||
Reference in New Issue
Block a user