mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-23 13:03:13 +00:00
1853359d78
* nfc: start nfc over rpc * nfc: add detect reader state * nfc: add reader analyzer * nfc: rework reader analyzer * reader_analyzer: print collected nonces to debug * reader analyzer: add save on SD card * reader_analyzer: separate mfkey related part to different file * mfkey32: add logic for collecting parameters * nfc: rework pcap with reader analyzer * nfc: add logger for reader * nfc: clean up * nfc: add detect reader view * nfc: add detect reader and mfkey nonces scenes * nfc: add mfkey comlplete scene * nfc: add new assets * nfc: fix gui * nfc: fix iso14443-4 UID emulation * nfc: add no sd card notification * nfc: fix grammar Co-authored-by: あく <alleteam@gmail.com>
41 lines
1.1 KiB
C
41 lines
1.1 KiB
C
#pragma once
|
|
|
|
#include <stdint.h>
|
|
#include <lib/nfc/nfc_device.h>
|
|
|
|
typedef enum {
|
|
ReaderAnalyzerModeDebugLog = 0x01,
|
|
ReaderAnalyzerModeMfkey = 0x02,
|
|
ReaderAnalyzerModeDebugPcap = 0x04,
|
|
} ReaderAnalyzerMode;
|
|
|
|
typedef enum {
|
|
ReaderAnalyzerEventMfkeyCollected,
|
|
} ReaderAnalyzerEvent;
|
|
|
|
typedef struct ReaderAnalyzer ReaderAnalyzer;
|
|
|
|
typedef void (*ReaderAnalyzerParseDataCallback)(ReaderAnalyzerEvent event, void* context);
|
|
|
|
ReaderAnalyzer* reader_analyzer_alloc();
|
|
|
|
void reader_analyzer_free(ReaderAnalyzer* instance);
|
|
|
|
void reader_analyzer_set_callback(
|
|
ReaderAnalyzer* instance,
|
|
ReaderAnalyzerParseDataCallback callback,
|
|
void* context);
|
|
|
|
void reader_analyzer_start(ReaderAnalyzer* instance, ReaderAnalyzerMode mode);
|
|
|
|
void reader_analyzer_stop(ReaderAnalyzer* instance);
|
|
|
|
NfcProtocol
|
|
reader_analyzer_guess_protocol(ReaderAnalyzer* instance, uint8_t* buff_rx, uint16_t len);
|
|
|
|
FuriHalNfcDevData* reader_analyzer_get_nfc_data(ReaderAnalyzer* instance);
|
|
|
|
void reader_analyzer_prepare_tx_rx(
|
|
ReaderAnalyzer* instance,
|
|
FuriHalNfcTxRxContext* tx_rx,
|
|
bool is_picc);
|