RFID Fuzzer fixes

This commit is contained in:
MX 2022-11-13 02:56:32 +03:00
parent f7fb055ae3
commit aface38b42
No known key found for this signature in database
GPG key ID: 6C4C311DFD4B4AB5
3 changed files with 13 additions and 4 deletions

View file

@ -17,6 +17,7 @@
* SubGHz Remote: Cleanup code in unirf, fix issue #153 * SubGHz Remote: Cleanup code in unirf, fix issue #153
* Plugins: Remove `srand` calls * Plugins: Remove `srand` calls
* Plugins: Fix DHT Monitor icon * Plugins: Fix DHT Monitor icon
* Plugins: RFID Fuzzer - Fix random crashes and improve stability
* Plugins: RFID Fuzzer - allow holding left right to change delay faster (hold TD button to add +10 or -10 to time delay) * Plugins: RFID Fuzzer - allow holding left right to change delay faster (hold TD button to add +10 or -10 to time delay)
* Plugins: Morse code cleanup text by pressing back * Plugins: Morse code cleanup text by pressing back
* Plugins: TOTP Update - "BadUSB" type key into pc mode [(by akopachov)](https://github.com/akopachov/flipper-zero_authenticator) * Plugins: TOTP Update - "BadUSB" type key into pc mode [(by akopachov)](https://github.com/akopachov/flipper-zero_authenticator)

View file

@ -81,6 +81,7 @@ typedef struct {
LFRFIDWorker* worker; LFRFIDWorker* worker;
ProtocolDict* dict; ProtocolDict* dict;
ProtocolId protocol; ProtocolId protocol;
bool workr_rund;
uint8_t time_between_cards; uint8_t time_between_cards;

View file

@ -94,8 +94,11 @@ void flipfrid_scene_run_attack_on_enter(FlipFridState* context) {
} }
void flipfrid_scene_run_attack_on_exit(FlipFridState* context) { void flipfrid_scene_run_attack_on_exit(FlipFridState* context) {
lfrfid_worker_stop(context->worker); if(context->workr_rund) {
lfrfid_worker_stop_thread(context->worker); lfrfid_worker_stop(context->worker);
lfrfid_worker_stop_thread(context->worker);
context->workr_rund = false;
}
lfrfid_worker_free(context->worker); lfrfid_worker_free(context->worker);
protocol_dict_free(context->dict); protocol_dict_free(context->dict);
notification_message(context->notify, &sequence_blink_stop); notification_message(context->notify, &sequence_blink_stop);
@ -109,9 +112,13 @@ void flipfrid_scene_run_attack_on_tick(FlipFridState* context) {
context->worker = lfrfid_worker_alloc(context->dict); context->worker = lfrfid_worker_alloc(context->dict);
lfrfid_worker_start_thread(context->worker); lfrfid_worker_start_thread(context->worker);
lfrfid_worker_emulate_start(context->worker, context->protocol); lfrfid_worker_emulate_start(context->worker, context->protocol);
context->workr_rund = true;
} else if(0 == counter) { } else if(0 == counter) {
lfrfid_worker_stop(context->worker); if(context->workr_rund) {
lfrfid_worker_stop_thread(context->worker); lfrfid_worker_stop(context->worker);
lfrfid_worker_stop_thread(context->worker);
context->workr_rund = false;
}
switch(context->attack) { switch(context->attack) {
case FlipFridAttackDefaultValues: case FlipFridAttackDefaultValues:
if(context->proto == EM4100) { if(context->proto == EM4100) {