-
Notifications
You must be signed in to change notification settings - Fork 227
Description
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
- Run iLEAPP against an iOS extraction containing
System/Library/CoreServices/SystemVersion.plist. - Observe the crash during the "System Version plist" artifact parsing stage.
- 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_plistto:
data_source = plist_file