2023-06-02 14:48:21 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
2023-06-03 11:24:27 +00:00
|
|
|
// #define RFID_125_PROTOCOL
|
|
|
|
|
|
|
|
#if defined(RFID_125_PROTOCOL)
|
|
|
|
|
|
|
|
#define MAX_PAYLOAD_SIZE 6
|
|
|
|
|
|
|
|
#define FUZZ_TIME_DELAY_MIN (5)
|
|
|
|
#define FUZZ_TIME_DELAY_DEFAULT (10)
|
|
|
|
#define FUZZ_TIME_DELAY_MAX (70)
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
2023-06-02 21:32:32 +00:00
|
|
|
#define MAX_PAYLOAD_SIZE 8
|
|
|
|
|
2023-06-02 17:33:28 +00:00
|
|
|
#define FUZZ_TIME_DELAY_MIN (4)
|
|
|
|
#define FUZZ_TIME_DELAY_DEFAULT (8)
|
|
|
|
#define FUZZ_TIME_DELAY_MAX (80)
|
|
|
|
|
2023-06-03 11:24:27 +00:00
|
|
|
#endif
|
|
|
|
|
2023-06-02 14:48:21 +00:00
|
|
|
typedef enum {
|
2023-06-03 11:24:27 +00:00
|
|
|
|
|
|
|
#if defined(RFID_125_PROTOCOL)
|
|
|
|
EM4100,
|
|
|
|
HIDProx,
|
|
|
|
PAC,
|
|
|
|
H10301,
|
|
|
|
#else
|
2023-06-02 14:48:21 +00:00
|
|
|
DS1990,
|
|
|
|
Metakom,
|
|
|
|
Cyfral,
|
2023-06-03 11:24:27 +00:00
|
|
|
#endif
|
|
|
|
|
2023-06-02 14:48:21 +00:00
|
|
|
// Reserved
|
|
|
|
FuzzerProtoMax,
|
|
|
|
} FuzzerProtos;
|
|
|
|
|
|
|
|
struct ProtoDict {
|
|
|
|
const uint8_t* val;
|
|
|
|
const uint8_t len;
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct ProtoDict ProtoDict;
|
|
|
|
|
|
|
|
struct FuzzerProtocol {
|
|
|
|
const char* name;
|
|
|
|
const uint8_t data_size;
|
|
|
|
const ProtoDict dict;
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct FuzzerProtocol FuzzerProtocol;
|
|
|
|
|
|
|
|
extern const FuzzerProtocol fuzzer_proto_items[];
|