Skip to content

Commit b681e75

Browse files
authored
Improve catroot plugin exception handling (#962)
1 parent 4388f76 commit b681e75

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

dissect/target/plugins/os/windows/catroot.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,8 +227,14 @@ def catdb(self) -> Iterator[CatrootRecord]:
227227

228228
for record in table.records():
229229
file_digest = digest()
230-
setattr(file_digest, hash_type, record.get("HashCatNameTable_HashCol").hex())
231-
catroot_names = record.get("HashCatNameTable_CatNameCol").decode().rstrip("|").split("|")
230+
231+
try:
232+
setattr(file_digest, hash_type, record.get("HashCatNameTable_HashCol").hex())
233+
catroot_names = record.get("HashCatNameTable_CatNameCol").decode().rstrip("|").split("|")
234+
except Exception as e:
235+
self.target.log.warning("Unable to parse catroot names for %s in %s", record, ese_file)
236+
self.target.log.debug("", exc_info=e)
237+
continue
232238

233239
for catroot_name in catroot_names:
234240
yield CatrootRecord(

0 commit comments

Comments
 (0)