Skip to content

Multiple: Fix datetime parsing, missing table/column handling and type validation issues#1401

Open
faithmry wants to merge 9 commits into
abrignoni:mainfrom
faithmry:fix-bugs
Open

Multiple: Fix datetime parsing, missing table/column handling and type validation issues#1401
faithmry wants to merge 9 commits into
abrignoni:mainfrom
faithmry:fix-bugs

Conversation

@faithmry

@faithmry faithmry commented Dec 9, 2025

Copy link
Copy Markdown

Summary

This PR fixes 11 bugs across multiple artifacts that were causing runtime errors during iOS forensic data extraction. The fixes address datetime parsing issues, missing table/column handling, and type validation problems.

Bugs Fixed

Datetime/ISO Format Issues (6 bugs)

  1. bluetoothPairedReg - Fixed NameError: name 'UTC' is not defined

    • Changed import and function call from convert_unix_ts_to_str to convert_unix_ts_to_utc
  2. alarms - Fixed ValueError: Invalid isoformat string with 'Z' suffix

    • Modified convert_plist_date_to_utc() in ilapfuncs.py (line 1160)
    • Removed 'Z' suffix from datetime format string
  3. dhcpLeases - Fixed ValueError: Invalid isoformat string with 'Z' suffix

    • Modified convert_plist_date_to_timezone_offset() in ilapfuncs.py (line 1149)
    • Removed 'Z' suffix from datetime format string

4-5. keyboardAppUsage & appleWifiKnownNetworksTimes - Fixed by change in ilapfuncs.py.

Type Validation Issues (2 bugs)

  1. user_defaults - Fixed AttributeError: 'str' object has no attribute 'items'

    • Added isinstance(plist, dict) check before calling .items()
    • Prevents error when plist is 'INVALID FILE' string
  2. system_version_plist - Fixed TypeError: expected str, bytes or os.PathLike object, not function

    • Changed variable assignment from function name to actual file path
    • data_source = system_version_plistdata_source = plist_file

Database Schema Issues (4 bugs)

  1. photosDbexif - Fixed OperationalError: no such table: ZASSET

    • Added table existence check before querying
    • Gracefully skips databases without ZASSET table
  2. parseCDCache - Fixed OperationalError: no such column: score

    • Added column existence check using PRAGMA
    • Handles both iOS 13.4.1 and newer schema versions
  3. trustedPeers - Fixed OperationalError: no such table: ZESCROWCLIENTMETADATA

    • Added table existence check before querying
    • Returns early if table doesn't exist
  4. sysdiagnose - Fixed AttributeError: 'Context' has no attribute 'get_model_name'

    • Changed to correct method name: get_device_model()

@faithmry faithmry changed the title Fix datetime parsing, SQL errors, and type validation issues Fix datetime parsing, missing table/column handling and type validation issues Dec 9, 2025
@JamesHabben

Copy link
Copy Markdown
Collaborator

this is a very large PR covering a lot of modules. having so many modules makes this review very difficult because many of these have already been addressed in other PRs. could you please review this PR and see what is still valid? I recognize quite a few issues that have already been resolved.

@JamesHabben JamesHabben added the question Further information is requested label Jun 17, 2026
@JamesHabben JamesHabben changed the title Fix datetime parsing, missing table/column handling and type validation issues Multiple: Fix datetime parsing, missing table/column handling and type validation issues Jun 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

question Further information is requested

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants