Skip to content

Add error handling for link_table parsing#11

Open
Matthijsy wants to merge 2 commits intosynacktiv:mainfrom
Matthijsy:hotfix/link_table_error
Open

Add error handling for link_table parsing#11
Matthijsy wants to merge 2 commits intosynacktiv:mainfrom
Matthijsy:hotfix/link_table_error

Conversation

@Matthijsy
Copy link

I currently have an NTDS file where the link_table couldn't completely be parsed. One of the records results in the following error:

File "/Users/user/.virtualenvs/ntdissector/lib/python3.11/site-packages/dissect/esedb/cursor.py", line 110, in search
    raise KeyNotFoundError(f"Can't find key: {key}")
dissect.esedb.exceptions.KeyNotFoundError: Can't find key: b'<redacted>'

This PR adds a check for this, if this happens a warning is logged and the record is ignored. If there is any better way of handling this exception please let me know, would be happy to implement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant