Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "iso14443_3a_render.h"

void nfc_render_iso14443_3a_format_bytes(FuriString* str, const uint8_t* const data, size_t size) {
void nfc_render_iso14443_3a_format_bytes(FuriString* str, const uint8_t* data, size_t size) {
for(size_t i = 0; i < size; i++) {
furi_string_cat_printf(str, " %02X", data[i]);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ void nfc_render_iso14443_3a_info(

void nfc_render_iso14443_tech_type(const Iso14443_3aData* data, FuriString* str);

void nfc_render_iso14443_3a_format_bytes(FuriString* str, const uint8_t* const data, size_t size);
void nfc_render_iso14443_3a_format_bytes(FuriString* str, const uint8_t* data, size_t size);

void nfc_render_iso14443_3a_brief(const Iso14443_3aData* data, FuriString* str);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,29 @@ static void nfc_render_mf_ultralight_pages_count(const MfUltralightData* data, F
}

void nfc_render_mf_ultralight_pwd_pack(const MfUltralightData* data, FuriString* str) {
MfUltralightConfigPages* config;

bool all_pages = mf_ultralight_is_all_data_read(data);
if(all_pages) {
bool has_config = mf_ultralight_get_config_page(data, &config);

if(!has_config) {
furi_string_cat_printf(str, "\e#Already Unlocked!");
} else if(all_pages) {
furi_string_cat_printf(str, "\e#All Pages Are Unlocked!");
} else {
furi_string_cat_printf(str, "\e#Some Pages Are Locked!");
}

MfUltralightConfigPages* config;
mf_ultralight_get_config_page(data, &config);
if(has_config) {
furi_string_cat_printf(str, "\nPassword: ");
nfc_render_iso14443_3a_format_bytes(
str, config->password.data, MF_ULTRALIGHT_AUTH_PASSWORD_SIZE);

furi_string_cat_printf(str, "\nPassword: ");
nfc_render_iso14443_3a_format_bytes(
str, config->password.data, MF_ULTRALIGHT_AUTH_PASSWORD_SIZE);

furi_string_cat_printf(str, "\nPACK: ");
nfc_render_iso14443_3a_format_bytes(str, config->pack.data, MF_ULTRALIGHT_AUTH_PACK_SIZE);
furi_string_cat_printf(str, "\nPACK: ");
nfc_render_iso14443_3a_format_bytes(str, config->pack.data, MF_ULTRALIGHT_AUTH_PACK_SIZE);
} else {
furi_string_cat_printf(str, "\nThis card does not support\npassword protection!");
}

nfc_render_mf_ultralight_pages_count(data, str);
}
Expand Down
Loading