Skip to content

[Bug] systemVersionPlist.py crashes with TypeError due to incorrect variable assignment #1390

@Tokenzrey

Description

@Tokenzrey

The system_version_plist function in systemVersionPlist.py encounters a critical TypeError when attempting to parse the SystemVersion.plist file. The parser fails immediately, preventing the extraction of iOS version, build ID, and product name information.

Root Cause Analysis
The issue is caused by a variable name confusion on line 39. The code assigns the function object system_version_plist (the function itself) to the data_source variable, instead of assigning the local variable plist_file which contains the actual file path string.

When get_plist_file_content(data_source) is subsequently called, it receives a function object instead of a file path string, causing the underlying file open operation to fail.

Traceback

TypeError: expected str, bytes or os.PathLike object, not function
Traceback (most recent call last):
  File "scripts/artifacts/systemVersionPlist.py", line 40
    pl = get_plist_file_content(data_source)
  Error was: expected str, bytes or os.PathLike object, not function

Affected File

  • systemVersionPlist.py (Line 39)

Steps to Reproduce

  1. Run iLEAPP against an iOS extraction containing System/Library/CoreServices/SystemVersion.plist.
  2. Observe the crash during the "System Version plist" artifact parsing stage.
  3. Check the logs for the TypeError.

Expected Behavior
The parser should pass the valid file path string to get_plist_file_content, successfully parse the plist, and populate the device information fields (iOS Version, Product Name, etc.).

Proposed Fix
Change the assignment on line 39 from:

data_source = system_version_plist

to:

data_source = plist_file

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions