nfc_worker_i.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. #pragma once
  2. #include "nfc_worker.h"
  3. #include <furi.h>
  4. #include <lib/toolbox/stream/file_stream.h>
  5. #include <lib/nfc/protocols/nfc_util.h>
  6. #include <lib/nfc/protocols/mifare_common.h>
  7. #include <lib/nfc/protocols/mifare_ultralight.h>
  8. #include <lib/nfc/protocols/mifare_classic.h>
  9. #include <lib/nfc/protocols/mifare_desfire.h>
  10. #include <lib/nfc/protocols/nfca.h>
  11. #include <lib/nfc/helpers/reader_analyzer.h>
  12. struct NfcWorker {
  13. FuriThread* thread;
  14. Storage* storage;
  15. Stream* dict_stream;
  16. NfcDeviceData* dev_data;
  17. NfcWorkerCallback callback;
  18. void* context;
  19. NfcWorkerState state;
  20. ReaderAnalyzer* reader_analyzer;
  21. };
  22. void nfc_worker_change_state(NfcWorker* nfc_worker, NfcWorkerState state);
  23. int32_t nfc_worker_task(void* context);
  24. void nfc_worker_read(NfcWorker* nfc_worker);
  25. void nfc_worker_read_type(NfcWorker* nfc_worker);
  26. void nfc_worker_emulate_uid(NfcWorker* nfc_worker);
  27. void nfc_worker_emulate_mf_ultralight(NfcWorker* nfc_worker);
  28. void nfc_worker_emulate_mf_classic(NfcWorker* nfc_worker);
  29. void nfc_worker_write_mf_classic(NfcWorker* nfc_worker);
  30. void nfc_worker_update_mf_classic(NfcWorker* nfc_worker);
  31. void nfc_worker_mf_classic_dict_attack(NfcWorker* nfc_worker);
  32. void nfc_worker_mf_ultralight_read_auth(NfcWorker* nfc_worker);
  33. void nfc_worker_mf_ul_auth_attack(NfcWorker* nfc_worker);
  34. void nfc_worker_emulate_apdu(NfcWorker* nfc_worker);
  35. void nfc_worker_analyze_reader(NfcWorker* nfc_worker);