mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-23 04:53:08 +00:00
Change MIFARE name accroding to new requirements
This commit is contained in:
parent
1ea99d119b
commit
cfb974dc1f
4 changed files with 18 additions and 18 deletions
|
@ -58,7 +58,7 @@ bool mf_classic_key_cache_save(MfClassicKeyCache* instance, const MfClassicData*
|
||||||
ff, mf_classic_key_cache_file_header, mf_classic_key_cache_file_version))
|
ff, mf_classic_key_cache_file_header, mf_classic_key_cache_file_version))
|
||||||
break;
|
break;
|
||||||
if(!flipper_format_write_string_cstr(
|
if(!flipper_format_write_string_cstr(
|
||||||
ff, "Mifare Classic type", mf_classic_get_device_name(data, NfcDeviceNameTypeShort)))
|
ff, "MIFARE Classic type", mf_classic_get_device_name(data, NfcDeviceNameTypeShort)))
|
||||||
break;
|
break;
|
||||||
if(!flipper_format_write_hex_uint64(ff, "Key A map", &data->key_a_mask, 1)) break;
|
if(!flipper_format_write_hex_uint64(ff, "Key A map", &data->key_a_mask, 1)) break;
|
||||||
if(!flipper_format_write_hex_uint64(ff, "Key B map", &data->key_b_mask, 1)) break;
|
if(!flipper_format_write_hex_uint64(ff, "Key B map", &data->key_b_mask, 1)) break;
|
||||||
|
|
|
@ -24,7 +24,7 @@ void nfc_scene_extra_actions_on_enter(void* context) {
|
||||||
instance);
|
instance);
|
||||||
submenu_add_item(
|
submenu_add_item(
|
||||||
submenu,
|
submenu,
|
||||||
"Mifare Classic Keys",
|
"MIFARE Classic Keys",
|
||||||
SubmenuIndexMfClassicKeys,
|
SubmenuIndexMfClassicKeys,
|
||||||
nfc_scene_extra_actions_submenu_callback,
|
nfc_scene_extra_actions_submenu_callback,
|
||||||
instance);
|
instance);
|
||||||
|
|
|
@ -482,27 +482,27 @@ static void nfc_generate_mf_classic_4k_7b_uid(NfcDevice* nfc_device) {
|
||||||
static const NfcDataGenerator nfc_data_generator[NfcDataGeneratorTypeNum] = {
|
static const NfcDataGenerator nfc_data_generator[NfcDataGeneratorTypeNum] = {
|
||||||
[NfcDataGeneratorTypeMfUltralight] =
|
[NfcDataGeneratorTypeMfUltralight] =
|
||||||
{
|
{
|
||||||
.name = "Mifare Ultralight",
|
.name = "MIFARE Ultralight",
|
||||||
.handler = nfc_generate_mf_ul_orig,
|
.handler = nfc_generate_mf_ul_orig,
|
||||||
},
|
},
|
||||||
[NfcDataGeneratorTypeMfUltralightEV1_11] =
|
[NfcDataGeneratorTypeMfUltralightEV1_11] =
|
||||||
{
|
{
|
||||||
.name = "Mifare Ultralight EV1 11",
|
.name = "MIFARE Ultralight EV1 11",
|
||||||
.handler = nfc_generate_mf_ul_11,
|
.handler = nfc_generate_mf_ul_11,
|
||||||
},
|
},
|
||||||
[NfcDataGeneratorTypeMfUltralightEV1_H11] =
|
[NfcDataGeneratorTypeMfUltralightEV1_H11] =
|
||||||
{
|
{
|
||||||
.name = "Mifare Ultralight EV1 H11",
|
.name = "MIFARE Ultralight EV1 H11",
|
||||||
.handler = nfc_generate_mf_ul_h11,
|
.handler = nfc_generate_mf_ul_h11,
|
||||||
},
|
},
|
||||||
[NfcDataGeneratorTypeMfUltralightEV1_21] =
|
[NfcDataGeneratorTypeMfUltralightEV1_21] =
|
||||||
{
|
{
|
||||||
.name = "Mifare Ultralight EV1 21",
|
.name = "MIFARE Ultralight EV1 21",
|
||||||
.handler = nfc_generate_mf_ul_21,
|
.handler = nfc_generate_mf_ul_21,
|
||||||
},
|
},
|
||||||
[NfcDataGeneratorTypeMfUltralightEV1_H21] =
|
[NfcDataGeneratorTypeMfUltralightEV1_H21] =
|
||||||
{
|
{
|
||||||
.name = "Mifare Ultralight EV1 H21",
|
.name = "MIFARE Ultralight EV1 H21",
|
||||||
.handler = nfc_generate_mf_ul_h21,
|
.handler = nfc_generate_mf_ul_h21,
|
||||||
},
|
},
|
||||||
[NfcDataGeneratorTypeNTAG203] =
|
[NfcDataGeneratorTypeNTAG203] =
|
||||||
|
@ -547,27 +547,27 @@ static const NfcDataGenerator nfc_data_generator[NfcDataGeneratorTypeNum] = {
|
||||||
},
|
},
|
||||||
[NfcDataGeneratorTypeMfClassicMini] =
|
[NfcDataGeneratorTypeMfClassicMini] =
|
||||||
{
|
{
|
||||||
.name = "Mifare Mini",
|
.name = "MIFARE Mini",
|
||||||
.handler = nfc_generate_mf_classic_mini,
|
.handler = nfc_generate_mf_classic_mini,
|
||||||
},
|
},
|
||||||
[NfcDataGeneratorTypeMfClassic1k_4b] =
|
[NfcDataGeneratorTypeMfClassic1k_4b] =
|
||||||
{
|
{
|
||||||
.name = "Mifare Classic 1k 4byte UID",
|
.name = "MIFARE Classic 1k 4byte UID",
|
||||||
.handler = nfc_generate_mf_classic_1k_4b_uid,
|
.handler = nfc_generate_mf_classic_1k_4b_uid,
|
||||||
},
|
},
|
||||||
[NfcDataGeneratorTypeMfClassic1k_7b] =
|
[NfcDataGeneratorTypeMfClassic1k_7b] =
|
||||||
{
|
{
|
||||||
.name = "Mifare Classic 1k 7byte UID",
|
.name = "MIFARE Classic 1k 7byte UID",
|
||||||
.handler = nfc_generate_mf_classic_1k_7b_uid,
|
.handler = nfc_generate_mf_classic_1k_7b_uid,
|
||||||
},
|
},
|
||||||
[NfcDataGeneratorTypeMfClassic4k_4b] =
|
[NfcDataGeneratorTypeMfClassic4k_4b] =
|
||||||
{
|
{
|
||||||
.name = "Mifare Classic 4k 4byte UID",
|
.name = "MIFARE Classic 4k 4byte UID",
|
||||||
.handler = nfc_generate_mf_classic_4k_4b_uid,
|
.handler = nfc_generate_mf_classic_4k_4b_uid,
|
||||||
},
|
},
|
||||||
[NfcDataGeneratorTypeMfClassic4k_7b] =
|
[NfcDataGeneratorTypeMfClassic4k_7b] =
|
||||||
{
|
{
|
||||||
.name = "Mifare Classic 4k 7byte UID",
|
.name = "MIFARE Classic 4k 7byte UID",
|
||||||
.handler = nfc_generate_mf_classic_4k_7b_uid,
|
.handler = nfc_generate_mf_classic_4k_7b_uid,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -21,21 +21,21 @@ static const MfClassicFeatures mf_classic_features[MfClassicTypeNum] = {
|
||||||
{
|
{
|
||||||
.sectors_total = 5,
|
.sectors_total = 5,
|
||||||
.blocks_total = 20,
|
.blocks_total = 20,
|
||||||
.full_name = "Mifare Classic Mini 0.3K",
|
.full_name = "MIFARE Classic Mini 0.3K",
|
||||||
.type_name = "MINI",
|
.type_name = "MINI",
|
||||||
},
|
},
|
||||||
[MfClassicType1k] =
|
[MfClassicType1k] =
|
||||||
{
|
{
|
||||||
.sectors_total = 16,
|
.sectors_total = 16,
|
||||||
.blocks_total = 64,
|
.blocks_total = 64,
|
||||||
.full_name = "Mifare Classic 1K",
|
.full_name = "MIFARE Classic 1K",
|
||||||
.type_name = "1K",
|
.type_name = "1K",
|
||||||
},
|
},
|
||||||
[MfClassicType4k] =
|
[MfClassicType4k] =
|
||||||
{
|
{
|
||||||
.sectors_total = 40,
|
.sectors_total = 40,
|
||||||
.blocks_total = 256,
|
.blocks_total = 256,
|
||||||
.full_name = "Mifare Classic 4K",
|
.full_name = "MIFARE Classic 4K",
|
||||||
.type_name = "4K",
|
.type_name = "4K",
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@ -261,15 +261,15 @@ bool mf_classic_save(const MfClassicData* data, FlipperFormat* ff) {
|
||||||
do {
|
do {
|
||||||
if(!iso14443_3a_save(data->iso14443_3a_data, ff)) break;
|
if(!iso14443_3a_save(data->iso14443_3a_data, ff)) break;
|
||||||
|
|
||||||
if(!flipper_format_write_comment_cstr(ff, "Mifare Classic specific data")) break;
|
if(!flipper_format_write_comment_cstr(ff, "MIFARE Classic specific data")) break;
|
||||||
if(!flipper_format_write_string_cstr(
|
if(!flipper_format_write_string_cstr(
|
||||||
ff, "Mifare Classic type", mf_classic_features[data->type].type_name))
|
ff, "MIFARE Classic type", mf_classic_features[data->type].type_name))
|
||||||
break;
|
break;
|
||||||
if(!flipper_format_write_uint32(
|
if(!flipper_format_write_uint32(
|
||||||
ff, "Data format version", &mf_classic_data_format_version, 1))
|
ff, "Data format version", &mf_classic_data_format_version, 1))
|
||||||
break;
|
break;
|
||||||
if(!flipper_format_write_comment_cstr(
|
if(!flipper_format_write_comment_cstr(
|
||||||
ff, "Mifare Classic blocks, \'??\' means unknown data"))
|
ff, "MIFARE Classic blocks, \'??\' means unknown data"))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
uint16_t blocks_total = mf_classic_get_total_block_num(data->type);
|
uint16_t blocks_total = mf_classic_get_total_block_num(data->type);
|
||||||
|
|
Loading…
Reference in a new issue