Magspoof move folder and add example files

This commit is contained in:
Willy-JL
2023-08-04 19:58:56 +02:00
parent 299ab3e89b
commit 95a6dae54a
7 changed files with 21 additions and 15 deletions

View File

@@ -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;

View File

@@ -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);
}

View File

@@ -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);

View File

@@ -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);

View 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:

View 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:

View 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: