diff --git a/LnkParse3/lnk_file.py b/LnkParse3/lnk_file.py index bf139829..59636293 100755 --- a/LnkParse3/lnk_file.py +++ b/LnkParse3/lnk_file.py @@ -257,7 +257,14 @@ def nice_id(identifier): for extra_key, extra_value in self.extras.as_dict().items(): cprint(f"{extra_key}", 2) for key, value in extra_value.items(): - cprint(f"{nice_id(key)}: {value}", 3) + if extra_key == "METADATA_PROPERTIES_BLOCK" and isinstance(value, list): + cprint(f"{nice_id(key)}:", 3) + for item in value: + cprint("Property:", 4) + for item_key, item_value in item.items(): + cprint(f"{nice_id(item_key)}: {item_value}", 5) + else: + cprint(f"{nice_id(key)}: {value}", 3) def format_linkFlags(self): return " | ".join(self.header.link_flags()) diff --git a/tests/json/readable_with_local_info.txt b/tests/json/readable_with_local_info.txt index 34c983c8..d9218970 100644 --- a/tests/json/readable_with_local_info.txt +++ b/tests/json/readable_with_local_info.txt @@ -77,4 +77,9 @@ Windows Shortcut Information: Storage size: 125 Version: 0x53505331 Format id: DABD30ED-0043-4789-A7F8-D013A4736622 - Serialized property values: [{'value_size': 97, 'id': 100, 'value': 'Roaming (C:\\Usuários\\Jonathan\\AppData)', 'value_type': 'VT_LPWSTR'}] + Serialized property values: + Property: + Value size: 97 + Id: 100 + Value: Roaming (C:\Usuários\Jonathan\AppData) + Value type: VT_LPWSTR diff --git a/tests/json/readable_with_network_info.txt b/tests/json/readable_with_network_info.txt index 7e36249a..8a130531 100644 --- a/tests/json/readable_with_network_info.txt +++ b/tests/json/readable_with_network_info.txt @@ -105,4 +105,29 @@ Windows Shortcut Information: Storage size: 229 Version: 0x53505331 Format id: B725F130-47EF-101A-A5F1-02608C9EEBAC - Serialized property values: [{'value_size': 73, 'id': 10, 'value': 'ETN-lift programme 2017.pdf', 'value_type': 'VT_LPWSTR'}, {'value_size': 21, 'id': 15, 'value': None, 'value_type': 'VT_FILETIME'}, {'value_size': 21, 'id': 12, 'value': None, 'value_type': 'VT_UI8'}, {'value_size': 65, 'id': 4, 'value': 'Adobe Acrobat Document', 'value_type': 'VT_LPWSTR'}, {'value_size': 21, 'id': 14, 'value': None, 'value_type': 'VT_FILETIME'}] + Serialized property values: + Property: + Value size: 73 + Id: 10 + Value: ETN-lift programme 2017.pdf + Value type: VT_LPWSTR + Property: + Value size: 21 + Id: 15 + Value: None + Value type: VT_FILETIME + Property: + Value size: 21 + Id: 12 + Value: None + Value type: VT_UI8 + Property: + Value size: 65 + Id: 4 + Value: Adobe Acrobat Document + Value type: VT_LPWSTR + Property: + Value size: 21 + Id: 14 + Value: None + Value type: VT_FILETIME