Fixing Database Related Error on [parsecdCache, photosDbexif, photosDbexif] Artifact Tested On IOS 13.4.1 #1393
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Improve Exception Handling for SQLite Artifacts (ParsedCache, PhotosDBExif, TrustedPeers)
Summary
This pull request resolves multiple runtime errors encountered when parsing several iLEAPP artifacts where certain SQLite tables or columns may be missing depending on the iOS version or device configuration.
Previously, artifacts failed with errors such as:
no such column: engagement_dateno such table: ZASSETno such table: ZSECUREBACKUPMETADATATIMESTAMPThese issues caused crashes and incomplete reports.
This PR introduces safer
try/exceptblocks to ensure graceful handling of malformed databases without interrupting the entire processing pipeline.Changes Included
1. parsedCache Artifact
try/exceptaround SQL queries.completion_cache_engagement.2. photosDBExif Artifact
ZASSETtable is missing (common in older iOS builds).3. trustedPeers Artifact
ZSECUREBACKUPMETADATATIMESTAMPon iOS 13.4.1.4. General Improvements
Error reading <artifact> database: <exception>Testing Performed
All artifacts were tested using a real forensic image obtained from the Digital Corpora public repository.
Image / Device Specifications:
Results:
Notes
These fixes significantly improve iLEAPP’s resilience when handling inconsistent or version-specific SQLite schemas commonly found in real forensic extractions.
Future improvements may include: