forked from RogueMaster/flipperzero-firmware-wPlugins
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request RogueMaster#55 from Ganapati/dev
Fix memory issues and add new attack
- Loading branch information
Showing
8 changed files
with
191 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Flipfrid | ||
|
||
Basic EM4100 Fuzzer | ||
|
||
## Why | ||
|
||
Flipfrid is a simple Rfid fuzzer using EM4100 protocol (125khz). | ||
Objective is to provide a simple to use fuzzer to test readers by emulating various cards. | ||
|
||
EM4100 cards use a 1 byte customer id and 4 bytes card id. | ||
|
||
## How | ||
|
||
There is 4 modes : | ||
- Default key loop over 16 factory/default keys and emulate each one after one ; | ||
- BF customer id. just an iteration from 0X00 to 0XFF on the first byte ; | ||
- Load Dump file : Load an existing EM4100 dump generated by Flipperzero, select an index and bruteforce from 0X00 to 0XFF; | ||
- Uids list: loop over a text file (one uid per line) | ||
|
||
TODO : | ||
- blank screen on back press |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
77 changes: 77 additions & 0 deletions
77
applications/flipfrid/scene/flipfrid_scene_load_custom_uids.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
#include "flipfrid_scene_load_custom_uids.h" | ||
#include "flipfrid_scene_run_attack.h" | ||
#include "flipfrid_scene_entrypoint.h" | ||
|
||
#define LFRFID_UIDS_EXTENSION ".txt" | ||
|
||
bool flipfrid_load_uids(FlipFridState* context, const char* file_path) { | ||
bool result = false; | ||
Storage* storage = furi_record_open(RECORD_STORAGE); | ||
context->uids_stream = buffered_file_stream_alloc(storage); | ||
result = | ||
buffered_file_stream_open(context->uids_stream, file_path, FSAM_READ, FSOM_OPEN_EXISTING); | ||
// Close if loading fails | ||
if(!result) { | ||
buffered_file_stream_close(context->uids_stream); | ||
return false; | ||
} | ||
return result; | ||
} | ||
|
||
bool flipfrid_load_custom_uids_from_file(FlipFridState* context) { | ||
// Input events and views are managed by file_select | ||
bool res = dialog_file_browser_show( | ||
context->dialogs, | ||
context->file_path, | ||
context->file_path, | ||
LFRFID_UIDS_EXTENSION, | ||
true, | ||
&I_sub1_10px, | ||
true); | ||
|
||
if(res) { | ||
res = flipfrid_load_uids(context, string_get_cstr(context->file_path)); | ||
} | ||
return res; | ||
} | ||
|
||
void flipfrid_scene_load_custom_uids_on_enter(FlipFridState* context) { | ||
if(flipfrid_load_custom_uids_from_file(context)) { | ||
// Force context loading | ||
flipfrid_scene_run_attack_on_enter(context); | ||
context->current_scene = SceneAttack; | ||
} else { | ||
flipfrid_scene_entrypoint_on_enter(context); | ||
context->current_scene = SceneEntryPoint; | ||
} | ||
} | ||
|
||
void flipfrid_scene_load_custom_uids_on_exit(FlipFridState* context) { | ||
UNUSED(context); | ||
} | ||
|
||
void flipfrid_scene_load_custom_uids_on_tick(FlipFridState* context) { | ||
UNUSED(context); | ||
} | ||
|
||
void flipfrid_scene_load_custom_uids_on_event(FlipFridEvent event, FlipFridState* context) { | ||
if(event.evt_type == EventTypeKey) { | ||
if(event.input_type == InputTypeShort) { | ||
switch(event.key) { | ||
case InputKeyDown: | ||
case InputKeyUp: | ||
case InputKeyLeft: | ||
case InputKeyRight: | ||
case InputKeyOk: | ||
case InputKeyBack: | ||
context->current_scene = SceneEntryPoint; | ||
break; | ||
} | ||
} | ||
} | ||
} | ||
|
||
void flipfrid_scene_load_custom_uids_on_draw(Canvas* canvas, FlipFridState* context) { | ||
UNUSED(context); | ||
UNUSED(canvas); | ||
} |
9 changes: 9 additions & 0 deletions
9
applications/flipfrid/scene/flipfrid_scene_load_custom_uids.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#pragma once | ||
#include "../flipfrid.h" | ||
|
||
void flipfrid_scene_load_custom_uids_on_enter(FlipFridState* context); | ||
void flipfrid_scene_load_custom_uids_on_exit(FlipFridState* context); | ||
void flipfrid_scene_load_custom_uids_on_tick(FlipFridState* context); | ||
void flipfrid_scene_load_custom_uids_on_event(FlipFridEvent event, FlipFridState* context); | ||
void flipfrid_scene_load_custom_uids_on_draw(Canvas* canvas, FlipFridState* context); | ||
bool flipfrid_load_custom_uids_from_file(FlipFridState* context); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters