mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2025-12-12 20:49:49 +04:00
Merge remote-tracking branch 'OFW/dev' into dev
This commit is contained in:
@@ -166,7 +166,7 @@ void mf_classic_key_cache_load_from_data(MfClassicKeyCache* instance, const MfCl
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool mf_classic_key_cahce_get_next_key(
|
bool mf_classic_key_cache_get_next_key(
|
||||||
MfClassicKeyCache* instance,
|
MfClassicKeyCache* instance,
|
||||||
uint8_t* sector_num,
|
uint8_t* sector_num,
|
||||||
MfClassicKey* key,
|
MfClassicKey* key,
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ bool mf_classic_key_cache_load(MfClassicKeyCache* instance, const uint8_t* uid,
|
|||||||
|
|
||||||
void mf_classic_key_cache_load_from_data(MfClassicKeyCache* instance, const MfClassicData* data);
|
void mf_classic_key_cache_load_from_data(MfClassicKeyCache* instance, const MfClassicData* data);
|
||||||
|
|
||||||
bool mf_classic_key_cahce_get_next_key(
|
bool mf_classic_key_cache_get_next_key(
|
||||||
MfClassicKeyCache* instance,
|
MfClassicKeyCache* instance,
|
||||||
uint8_t* sector_num,
|
uint8_t* sector_num,
|
||||||
MfClassicKey* key,
|
MfClassicKey* key,
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ static NfcCommand nfc_scene_read_poller_callback_mf_classic(NfcGenericEvent even
|
|||||||
uint8_t sector_num = 0;
|
uint8_t sector_num = 0;
|
||||||
MfClassicKey key = {};
|
MfClassicKey key = {};
|
||||||
MfClassicKeyType key_type = MfClassicKeyTypeA;
|
MfClassicKeyType key_type = MfClassicKeyTypeA;
|
||||||
if(mf_classic_key_cahce_get_next_key(
|
if(mf_classic_key_cache_get_next_key(
|
||||||
instance->mfc_key_cache, §or_num, &key, &key_type)) {
|
instance->mfc_key_cache, §or_num, &key, &key_type)) {
|
||||||
mfc_event->data->read_sector_request_data.sector_num = sector_num;
|
mfc_event->data->read_sector_request_data.sector_num = sector_num;
|
||||||
mfc_event->data->read_sector_request_data.key = key;
|
mfc_event->data->read_sector_request_data.key = key;
|
||||||
|
|||||||
@@ -102,7 +102,8 @@ static const IdMapping bart_zones[] = {
|
|||||||
{.id = 0x001d, .name = "Lake Merrit"},
|
{.id = 0x001d, .name = "Lake Merrit"},
|
||||||
{.id = 0x001e, .name = "Fruitvale"},
|
{.id = 0x001e, .name = "Fruitvale"},
|
||||||
{.id = 0x001f, .name = "Coliseum"},
|
{.id = 0x001f, .name = "Coliseum"},
|
||||||
{.id = 0x0021, .name = "San Leandro"},
|
{.id = 0x0020, .name = "San Leandro"},
|
||||||
|
{.id = 0x0021, .name = "Bay Fair"},
|
||||||
{.id = 0x0022, .name = "Hayward"},
|
{.id = 0x0022, .name = "Hayward"},
|
||||||
{.id = 0x0023, .name = "South Hayward"},
|
{.id = 0x0023, .name = "South Hayward"},
|
||||||
{.id = 0x0024, .name = "Union City"},
|
{.id = 0x0024, .name = "Union City"},
|
||||||
@@ -132,6 +133,9 @@ static const IdMapping muni_zones[] = {
|
|||||||
{.id = 0x000b, .name = "Castro"},
|
{.id = 0x000b, .name = "Castro"},
|
||||||
{.id = 0x000c, .name = "Forest Hill"}, // Guessed
|
{.id = 0x000c, .name = "Forest Hill"}, // Guessed
|
||||||
{.id = 0x000d, .name = "West Portal"},
|
{.id = 0x000d, .name = "West Portal"},
|
||||||
|
{.id = 0x0019, .name = "Union Square/Market Street"},
|
||||||
|
{.id = 0x001a, .name = "Chinatown - Rose Pak"},
|
||||||
|
{.id = 0x001b, .name = "Yerba Buena/Moscone"},
|
||||||
};
|
};
|
||||||
static const size_t kNumMUNIZones = COUNT(muni_zones);
|
static const size_t kNumMUNIZones = COUNT(muni_zones);
|
||||||
|
|
||||||
|
|||||||
@@ -310,9 +310,11 @@ static bool plantain_parse(const NfcDevice* device, FuriString* parsed_data) {
|
|||||||
last_payment_date.year,
|
last_payment_date.year,
|
||||||
last_payment_date.hour,
|
last_payment_date.hour,
|
||||||
last_payment_date.minute);
|
last_payment_date.minute);
|
||||||
//payment amount. This needs to be investigated more, currently it shows incorrect amount on some cards.
|
//Last payment amount.
|
||||||
uint16_t last_payment = (data->block[18].data[9] << 8) | data->block[18].data[8];
|
uint16_t last_payment = ((data->block[18].data[10] << 16) |
|
||||||
furi_string_cat_printf(parsed_data, "Amount: %d rub", last_payment / 100);
|
(data->block[18].data[9] << 8) | (data->block[18].data[8])) /
|
||||||
|
100;
|
||||||
|
furi_string_cat_printf(parsed_data, "Amount: %d rub", last_payment);
|
||||||
furi_string_free(card_number_s);
|
furi_string_free(card_number_s);
|
||||||
furi_string_free(tmp_s);
|
furi_string_free(tmp_s);
|
||||||
//This is for 4K Plantains.
|
//This is for 4K Plantains.
|
||||||
@@ -369,9 +371,11 @@ static bool plantain_parse(const NfcDevice* device, FuriString* parsed_data) {
|
|||||||
last_payment_date.year,
|
last_payment_date.year,
|
||||||
last_payment_date.hour,
|
last_payment_date.hour,
|
||||||
last_payment_date.minute);
|
last_payment_date.minute);
|
||||||
//payment amount
|
//Last payment amount
|
||||||
uint16_t last_payment = (data->block[18].data[9] << 8) | data->block[18].data[8];
|
uint16_t last_payment = ((data->block[18].data[10] << 16) |
|
||||||
furi_string_cat_printf(parsed_data, "Amount: %d rub", last_payment / 100);
|
(data->block[18].data[9] << 8) | (data->block[18].data[8])) /
|
||||||
|
100;
|
||||||
|
furi_string_cat_printf(parsed_data, "Amount: %d rub", last_payment);
|
||||||
furi_string_free(card_number_s);
|
furi_string_free(card_number_s);
|
||||||
furi_string_free(tmp_s);
|
furi_string_free(tmp_s);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ NfcCommand nfc_mf_classic_update_initial_worker_callback(NfcGenericEvent event,
|
|||||||
uint8_t sector_num = 0;
|
uint8_t sector_num = 0;
|
||||||
MfClassicKey key = {};
|
MfClassicKey key = {};
|
||||||
MfClassicKeyType key_type = MfClassicKeyTypeA;
|
MfClassicKeyType key_type = MfClassicKeyTypeA;
|
||||||
if(mf_classic_key_cahce_get_next_key(
|
if(mf_classic_key_cache_get_next_key(
|
||||||
instance->mfc_key_cache, §or_num, &key, &key_type)) {
|
instance->mfc_key_cache, §or_num, &key, &key_type)) {
|
||||||
mfc_event->data->read_sector_request_data.sector_num = sector_num;
|
mfc_event->data->read_sector_request_data.sector_num = sector_num;
|
||||||
mfc_event->data->read_sector_request_data.key = key;
|
mfc_event->data->read_sector_request_data.key = key;
|
||||||
|
|||||||
@@ -1040,6 +1040,7 @@ EXCLUDE = $(DOXY_SRC_ROOT)/lib/mlib \
|
|||||||
$(DOXY_SRC_ROOT)/applications/plugins/dap_link/lib/free-dap \
|
$(DOXY_SRC_ROOT)/applications/plugins/dap_link/lib/free-dap \
|
||||||
$(DOXY_SRC_ROOT)/applications/debug \
|
$(DOXY_SRC_ROOT)/applications/debug \
|
||||||
$(DOXY_SRC_ROOT)/applications/main \
|
$(DOXY_SRC_ROOT)/applications/main \
|
||||||
|
$(DOXY_SRC_ROOT)/applications/system/js_app/packages \
|
||||||
$(DOXY_SRC_ROOT)/applications/settings \
|
$(DOXY_SRC_ROOT)/applications/settings \
|
||||||
$(DOXY_SRC_ROOT)/lib/micro-ecc \
|
$(DOXY_SRC_ROOT)/lib/micro-ecc \
|
||||||
$(DOXY_SRC_ROOT)/lib/ReadMe.md \
|
$(DOXY_SRC_ROOT)/lib/ReadMe.md \
|
||||||
|
|||||||
Reference in New Issue
Block a user