SubGhz: reading keys from encrypted files (#803)
* SubGhz: add file with manufactory codes, and the ability to add your own manufactory codes for KeeLog * SubGhz: add encrypt RAW data, add decrypt and get RAW data * SubGhz: add encrypt magic_xor_atomo * SubGhz: parsing atomo using file encrypt * SubGhz: fix calculating the size of the read buffer * SubGhz: parsing Nice FLOR S using file encrypt * SubGhz: add file encrypt nice_flor_s_tx, fix name load file * SubGhz: fix checking read buffer size * Update subghz_keystore.c * SubGhz: fix calculating the size of the read buffer Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
#include <furi.h>
|
||||
#include "file-worker.h"
|
||||
#include "../subghz_keystore.h"
|
||||
/*
|
||||
* https://phreakerclub.com/1615
|
||||
* https://phreakerclub.com/forum/showthread.php?t=2360
|
||||
@@ -103,17 +104,13 @@ void subghz_protocol_nice_flor_s_send_key(
|
||||
uint8_t subghz_nice_flor_s_get_byte_in_file(SubGhzProtocolNiceFlorS* instance, uint32_t address) {
|
||||
if(!instance->rainbow_table_file_name) return 0;
|
||||
|
||||
uint8_t buffer = 0;
|
||||
FileWorker* file_worker = file_worker_alloc(true);
|
||||
if(file_worker_open(
|
||||
file_worker, instance->rainbow_table_file_name, FSAM_READ, FSOM_OPEN_EXISTING)) {
|
||||
file_worker_seek(file_worker, address, true);
|
||||
file_worker_read(file_worker, &buffer, 1);
|
||||
uint8_t buffer[1] = {0};
|
||||
if(subghz_keystore_raw_get_data(
|
||||
instance->rainbow_table_file_name, address, buffer, sizeof(uint8_t))) {
|
||||
return buffer[0];
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
file_worker_close(file_worker);
|
||||
file_worker_free(file_worker);
|
||||
|
||||
return buffer;
|
||||
}
|
||||
|
||||
/** Decrypt protocol Nice Flor S
|
||||
|
Reference in New Issue
Block a user