mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2025-12-12 12:42:30 +04:00
formatting
This commit is contained in:
@@ -9,11 +9,11 @@
|
||||
|
||||
#define TAG "Bip"
|
||||
|
||||
#define BIP_CARD_ID_SECTOR_NUMBER (0)
|
||||
#define BIP_BALANCE_SECTOR_NUMBER (8)
|
||||
#define BIP_CARD_ID_SECTOR_NUMBER (0)
|
||||
#define BIP_BALANCE_SECTOR_NUMBER (8)
|
||||
#define BIP_TRIP_TIME_WINDOW_SECTOR_NUMBER (5)
|
||||
#define BIP_LAST_TOP_UPS_SECTOR_NUMBER (10)
|
||||
#define BIP_TRIPS_INFO_SECTOR_NUMBER (11)
|
||||
#define BIP_LAST_TOP_UPS_SECTOR_NUMBER (10)
|
||||
#define BIP_TRIPS_INFO_SECTOR_NUMBER (11)
|
||||
|
||||
typedef struct {
|
||||
DateTime datetime;
|
||||
|
||||
@@ -92,10 +92,10 @@
|
||||
0, 0, 0, 1, 1, 2003, 4 \
|
||||
}
|
||||
// timestep is one minute
|
||||
#define CHARLIE_TIME_DELTA_SECS 60
|
||||
#define CHARLIE_END_VALID_DELTA_SECS 60 * 8
|
||||
#define CHARLIE_TIME_DELTA_SECS 60
|
||||
#define CHARLIE_END_VALID_DELTA_SECS 60 * 8
|
||||
#define CHARLIE_N_TRANSACTION_HISTORY 10
|
||||
#define CHARLIE_N_PASSES 4
|
||||
#define CHARLIE_N_PASSES 4
|
||||
|
||||
typedef struct {
|
||||
uint64_t a;
|
||||
|
||||
@@ -201,4 +201,4 @@ static const FlipperAppPluginDescriptor emv_plugin_descriptor = {
|
||||
/* Plugin entry point - must return a pointer to const descriptor */
|
||||
const FlipperAppPluginDescriptor* emv_plugin_ep() {
|
||||
return &emv_plugin_descriptor;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -84,4 +84,4 @@ static const FlipperAppPluginDescriptor gallagher_plugin_descriptor = {
|
||||
/* Plugin entry point */
|
||||
const FlipperAppPluginDescriptor* gallagher_plugin_ep(void) {
|
||||
return &gallagher_plugin_descriptor;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,10 +5,10 @@
|
||||
|
||||
#include <bit_lib.h>
|
||||
|
||||
#define TAG "HI!"
|
||||
#define KEY_LENGTH 6
|
||||
#define TAG "HI!"
|
||||
#define KEY_LENGTH 6
|
||||
#define HI_KEY_TO_GEN 5
|
||||
#define UID_LENGTH 7
|
||||
#define UID_LENGTH 7
|
||||
|
||||
typedef struct {
|
||||
uint64_t a;
|
||||
|
||||
@@ -411,4 +411,4 @@ static const FlipperAppPluginDescriptor kazan_plugin_descriptor = {
|
||||
/* Plugin entry point - must return a pointer to const descriptor */
|
||||
const FlipperAppPluginDescriptor* kazan_plugin_ep() {
|
||||
return &kazan_plugin_descriptor;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -187,4 +187,4 @@ static const FlipperAppPluginDescriptor metromoney_plugin_descriptor = {
|
||||
/* Plugin entry point - must return a pointer to const descriptor */
|
||||
const FlipperAppPluginDescriptor* metromoney_plugin_ep() {
|
||||
return &metromoney_plugin_descriptor;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
#include <bit_lib.h>
|
||||
|
||||
#define TAG "Microel"
|
||||
#define TAG "Microel"
|
||||
#define KEY_LENGTH 6
|
||||
#define UID_LENGTH 4
|
||||
|
||||
@@ -228,4 +228,4 @@ static const FlipperAppPluginDescriptor microel_plugin_descriptor = {
|
||||
/* Plugin entry point - must return a pointer to const descriptor */
|
||||
const FlipperAppPluginDescriptor* microel_plugin_ep(void) {
|
||||
return µel_plugin_descriptor;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,10 +5,10 @@
|
||||
|
||||
#include <bit_lib.h>
|
||||
|
||||
#define TAG "MiZIP"
|
||||
#define KEY_LENGTH 6
|
||||
#define TAG "MiZIP"
|
||||
#define KEY_LENGTH 6
|
||||
#define MIZIP_KEY_TO_GEN 5
|
||||
#define UID_LENGTH 4
|
||||
#define UID_LENGTH 4
|
||||
|
||||
typedef struct {
|
||||
uint64_t a;
|
||||
|
||||
@@ -154,4 +154,4 @@ static const FlipperAppPluginDescriptor mykey_plugin_descriptor = {
|
||||
/* Plugin entry point - must return a pointer to const descriptor */
|
||||
const FlipperAppPluginDescriptor* mykey_plugin_ep(void) {
|
||||
return &mykey_plugin_descriptor;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -148,16 +148,16 @@ static void parse_ndef_vcard(FuriString* str, const uint8_t* payload, uint32_t p
|
||||
|
||||
static void parse_ndef_wifi(FuriString* str, const uint8_t* payload, uint32_t payload_len) {
|
||||
// https://android.googlesource.com/platform/packages/apps/Nfc/+/refs/heads/main/src/com/android/nfc/NfcWifiProtectedSetup.java
|
||||
#define CREDENTIAL_FIELD_ID (0x100E)
|
||||
#define SSID_FIELD_ID (0x1045)
|
||||
#define NETWORK_KEY_FIELD_ID (0x1027)
|
||||
#define AUTH_TYPE_FIELD_ID (0x1003)
|
||||
#define AUTH_TYPE_EXPECTED_SIZE (2)
|
||||
#define AUTH_TYPE_OPEN (0x0001)
|
||||
#define AUTH_TYPE_WPA_PSK (0x0002)
|
||||
#define AUTH_TYPE_WPA_EAP (0x0008)
|
||||
#define AUTH_TYPE_WPA2_EAP (0x0010)
|
||||
#define AUTH_TYPE_WPA2_PSK (0x0020)
|
||||
#define CREDENTIAL_FIELD_ID (0x100E)
|
||||
#define SSID_FIELD_ID (0x1045)
|
||||
#define NETWORK_KEY_FIELD_ID (0x1027)
|
||||
#define AUTH_TYPE_FIELD_ID (0x1003)
|
||||
#define AUTH_TYPE_EXPECTED_SIZE (2)
|
||||
#define AUTH_TYPE_OPEN (0x0001)
|
||||
#define AUTH_TYPE_WPA_PSK (0x0002)
|
||||
#define AUTH_TYPE_WPA_EAP (0x0008)
|
||||
#define AUTH_TYPE_WPA2_EAP (0x0010)
|
||||
#define AUTH_TYPE_WPA2_PSK (0x0020)
|
||||
#define AUTH_TYPE_WPA_AND_WPA2_PSK (0x0022)
|
||||
#define MAX_NETWORK_KEY_SIZE_BYTES (64)
|
||||
|
||||
|
||||
@@ -62,18 +62,18 @@ static const char* opal_usages[14] = {
|
||||
|
||||
// Opal file 0x7 structure. Assumes a little-endian CPU.
|
||||
typedef struct FURI_PACKED {
|
||||
uint32_t serial : 32;
|
||||
uint8_t check_digit : 4;
|
||||
bool blocked : 1;
|
||||
uint16_t txn_number : 16;
|
||||
int32_t balance : 21;
|
||||
uint16_t days : 15;
|
||||
uint16_t minutes : 11;
|
||||
uint8_t mode : 3;
|
||||
uint16_t usage : 4;
|
||||
bool auto_topup : 1;
|
||||
uint32_t serial : 32;
|
||||
uint8_t check_digit : 4;
|
||||
bool blocked : 1;
|
||||
uint16_t txn_number : 16;
|
||||
int32_t balance : 21;
|
||||
uint16_t days : 15;
|
||||
uint16_t minutes : 11;
|
||||
uint8_t mode : 3;
|
||||
uint16_t usage : 4;
|
||||
bool auto_topup : 1;
|
||||
uint8_t weekly_journeys : 4;
|
||||
uint16_t checksum : 16;
|
||||
uint16_t checksum : 16;
|
||||
} OpalFile;
|
||||
|
||||
static_assert(sizeof(OpalFile) == 16, "OpalFile");
|
||||
|
||||
@@ -9,11 +9,11 @@
|
||||
|
||||
#include <bit_lib.h>
|
||||
|
||||
#define TAG "Saflok"
|
||||
#define TAG "Saflok"
|
||||
#define MAGIC_TABLE_SIZE 192
|
||||
#define KEY_LENGTH 6
|
||||
#define UID_LENGTH 4
|
||||
#define CHECK_SECTOR 1
|
||||
#define KEY_LENGTH 6
|
||||
#define UID_LENGTH 4
|
||||
#define CHECK_SECTOR 1
|
||||
|
||||
typedef struct {
|
||||
uint64_t a;
|
||||
|
||||
@@ -260,4 +260,4 @@ static const FlipperAppPluginDescriptor troika_plugin_descriptor = {
|
||||
/* Plugin entry point - must return a pointer to const descriptor */
|
||||
const FlipperAppPluginDescriptor* troika_plugin_ep(void) {
|
||||
return &troika_plugin_descriptor;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -192,4 +192,4 @@ static const FlipperAppPluginDescriptor washcity_plugin_descriptor = {
|
||||
/* Plugin entry point - must return a pointer to const descriptor */
|
||||
const FlipperAppPluginDescriptor* washcity_plugin_ep(void) {
|
||||
return &washcity_plugin_descriptor;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,9 +29,9 @@
|
||||
|
||||
#define TAG "Zolotaya Korona"
|
||||
|
||||
#define TRIP_SECTOR_NUM (4)
|
||||
#define TRIP_SECTOR_NUM (4)
|
||||
#define PURSE_SECTOR_NUM (6)
|
||||
#define INFO_SECTOR_NUM (15)
|
||||
#define INFO_SECTOR_NUM (15)
|
||||
|
||||
// Sector 15 data. Byte [11] contains the mistake. If byte [11] was 0xEF, bytes [1-18] means "ЗАО Золотая Корона"
|
||||
static const uint8_t info_sector_signature[] = {0xE2, 0x87, 0x80, 0x8E, 0x20, 0x87, 0xAE,
|
||||
@@ -211,4 +211,4 @@ static const FlipperAppPluginDescriptor zolotaya_korona_plugin_descriptor = {
|
||||
/* Plugin entry point - must return a pointer to const descriptor */
|
||||
const FlipperAppPluginDescriptor* zolotaya_korona_plugin_ep() {
|
||||
return &zolotaya_korona_plugin_descriptor;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -141,4 +141,4 @@ static const FlipperAppPluginDescriptor zolotaya_korona_online_plugin_descriptor
|
||||
/* Plugin entry point - must return a pointer to const descriptor */
|
||||
const FlipperAppPluginDescriptor* zolotaya_korona_online_plugin_ep() {
|
||||
return &zolotaya_korona_online_plugin_descriptor;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user