Skip to content

Commit

Permalink
Fix MRUList assumption (fox-it#471)
Browse files Browse the repository at this point in the history
A windows target does not always have a MRUList key/value pair.
This assumption is now fixed.
  • Loading branch information
JSCU-CNI authored and Zawadidone committed Apr 5, 2024
1 parent a704c27 commit 1af3f00
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions dissect/target/plugins/os/windows/regf/mru.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,13 +322,17 @@ def msoffice(self):

def parse_mru_key(target, key, record):
user = target.registry.get_user(key)
mrulist = key.value("MRUList").value

try:
mrulist = key.value("MRUList").value
except RegistryError:
mrulist = None

for value in key.values():
if value.name == "MRUList":
continue

entry_index = mrulist.index(value.name)
entry_index = mrulist.index(value.name) if mrulist else None
entry_value = value.value

yield record(
Expand Down

0 comments on commit 1af3f00

Please sign in to comment.