Skip to content

Conversation

@faithmry
Copy link

@faithmry faithmry commented Dec 9, 2025

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
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