ipsw-parser 1.3.4__tar.gz → 1.3.6__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ipsw_parser-1.3.4 → ipsw_parser-1.3.6}/PKG-INFO +1 -1
- {ipsw_parser-1.3.4 → ipsw_parser-1.3.6}/ipsw_parser/__main__.py +1 -19
- {ipsw_parser-1.3.4 → ipsw_parser-1.3.6}/ipsw_parser/_version.py +2 -2
- {ipsw_parser-1.3.4 → ipsw_parser-1.3.6}/ipsw_parser/build_identity.py +5 -1
- {ipsw_parser-1.3.4 → ipsw_parser-1.3.6}/ipsw_parser/ipsw.py +21 -0
- {ipsw_parser-1.3.4 → ipsw_parser-1.3.6}/ipsw_parser.egg-info/PKG-INFO +1 -1
- {ipsw_parser-1.3.4 → ipsw_parser-1.3.6}/.gitattributes +0 -0
- {ipsw_parser-1.3.4 → ipsw_parser-1.3.6}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {ipsw_parser-1.3.4 → ipsw_parser-1.3.6}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {ipsw_parser-1.3.4 → ipsw_parser-1.3.6}/.github/workflows/codeql.yml +0 -0
- {ipsw_parser-1.3.4 → ipsw_parser-1.3.6}/.github/workflows/python-app.yml +0 -0
- {ipsw_parser-1.3.4 → ipsw_parser-1.3.6}/.github/workflows/python-publish.yml +0 -0
- {ipsw_parser-1.3.4 → ipsw_parser-1.3.6}/.gitignore +0 -0
- {ipsw_parser-1.3.4 → ipsw_parser-1.3.6}/.pre-commit-config.yaml +0 -0
- {ipsw_parser-1.3.4 → ipsw_parser-1.3.6}/CODE_OF_CONDUCT.md +0 -0
- {ipsw_parser-1.3.4 → ipsw_parser-1.3.6}/LICENSE +0 -0
- {ipsw_parser-1.3.4 → ipsw_parser-1.3.6}/README.md +0 -0
- {ipsw_parser-1.3.4 → ipsw_parser-1.3.6}/ipsw_parser/__init__.py +0 -0
- {ipsw_parser-1.3.4 → ipsw_parser-1.3.6}/ipsw_parser/build_manifest.py +0 -0
- {ipsw_parser-1.3.4 → ipsw_parser-1.3.6}/ipsw_parser/component.py +0 -0
- {ipsw_parser-1.3.4 → ipsw_parser-1.3.6}/ipsw_parser/exceptions.py +0 -0
- {ipsw_parser-1.3.4 → ipsw_parser-1.3.6}/ipsw_parser/firmware.py +0 -0
- {ipsw_parser-1.3.4 → ipsw_parser-1.3.6}/ipsw_parser/img4.py +0 -0
- {ipsw_parser-1.3.4 → ipsw_parser-1.3.6}/ipsw_parser.egg-info/SOURCES.txt +0 -0
- {ipsw_parser-1.3.4 → ipsw_parser-1.3.6}/ipsw_parser.egg-info/dependency_links.txt +0 -0
- {ipsw_parser-1.3.4 → ipsw_parser-1.3.6}/ipsw_parser.egg-info/entry_points.txt +0 -0
- {ipsw_parser-1.3.4 → ipsw_parser-1.3.6}/ipsw_parser.egg-info/requires.txt +0 -0
- {ipsw_parser-1.3.4 → ipsw_parser-1.3.6}/ipsw_parser.egg-info/top_level.txt +0 -0
- {ipsw_parser-1.3.4 → ipsw_parser-1.3.6}/pyproject.toml +0 -0
- {ipsw_parser-1.3.4 → ipsw_parser-1.3.6}/pytest.ini +0 -0
- {ipsw_parser-1.3.4 → ipsw_parser-1.3.6}/requirements.txt +0 -0
- {ipsw_parser-1.3.4 → ipsw_parser-1.3.6}/setup.cfg +0 -0
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env python3
|
|
2
2
|
import logging
|
|
3
|
-
import plistlib
|
|
4
|
-
from datetime import datetime
|
|
5
3
|
from pathlib import Path
|
|
6
4
|
from typing import IO
|
|
7
5
|
from zipfile import ZipFile
|
|
@@ -66,23 +64,7 @@ def extract(file: IO, output: str) -> None:
|
|
|
66
64
|
@click.argument('file', type=click.Path(exists=True, file_okay=True, dir_okay=False))
|
|
67
65
|
def device_support(file: IO) -> None:
|
|
68
66
|
""" Create DeviceSupport directory """
|
|
69
|
-
|
|
70
|
-
ipsw = IPSW(ZipFile(file))
|
|
71
|
-
device_support_path /= (f'{ipsw.build_manifest.supported_product_types[0]} '
|
|
72
|
-
f'{ipsw.build_manifest.product_version} ({ipsw.build_manifest.product_build_version})')
|
|
73
|
-
build_identity = ipsw.build_manifest.build_identities[0]
|
|
74
|
-
symbols_path = device_support_path / 'Symbols'
|
|
75
|
-
build_identity.extract_dsc(symbols_path)
|
|
76
|
-
for file in (symbols_path / 'private/preboot/Cryptexes/OS/System/Library/Caches/com.apple.dyld').iterdir():
|
|
77
|
-
file.unlink()
|
|
78
|
-
(device_support_path / 'Info.plist').write_bytes(plistlib.dumps({
|
|
79
|
-
'DSC Extractor Version': '1228.0.0.0.0',
|
|
80
|
-
'DateCollected': datetime.now(),
|
|
81
|
-
'Version': '16.0',
|
|
82
|
-
}))
|
|
83
|
-
(device_support_path / '.finalized').write_bytes(plistlib.dumps({}))
|
|
84
|
-
(device_support_path / '.processed_dyld_shared_cache_arm64e').touch()
|
|
85
|
-
(device_support_path / '.processing_lock').touch()
|
|
67
|
+
IPSW(ZipFile(file)).create_device_support()
|
|
86
68
|
|
|
87
69
|
|
|
88
70
|
if __name__ == '__main__':
|
|
@@ -7,6 +7,7 @@ from typing import List, Mapping, Optional
|
|
|
7
7
|
|
|
8
8
|
from cached_property import cached_property
|
|
9
9
|
from plumbum import local
|
|
10
|
+
from pyimg4 import IM4P
|
|
10
11
|
|
|
11
12
|
from ipsw_parser.component import Component
|
|
12
13
|
|
|
@@ -161,7 +162,10 @@ class BuildIdentity(UserDict):
|
|
|
161
162
|
kernel_output = output / 'System/Library/Caches/com.apple.kernelcaches' / kernel_path.parts[-1]
|
|
162
163
|
|
|
163
164
|
logger.info(f'extracting kernel into: {kernel_output}')
|
|
164
|
-
kernel_output.write_bytes(kernel_component.data)
|
|
165
|
+
# kernel_output.write_bytes(kernel_component.data)
|
|
166
|
+
im4p = IM4P(kernel_component.data)
|
|
167
|
+
im4p.payload.decompress()
|
|
168
|
+
kernel_output.write_bytes(im4p.payload.output().data)
|
|
165
169
|
|
|
166
170
|
for cryptex in ('App', 'OS'):
|
|
167
171
|
name = {
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import logging
|
|
2
|
+
import plistlib
|
|
2
3
|
import zipfile
|
|
3
4
|
from contextlib import contextmanager
|
|
5
|
+
from datetime import datetime
|
|
6
|
+
from pathlib import Path
|
|
4
7
|
from typing import List
|
|
5
8
|
|
|
6
9
|
from cached_property import cached_property
|
|
@@ -109,3 +112,21 @@ class IPSW:
|
|
|
109
112
|
if release in entry.lower():
|
|
110
113
|
result.append(entry)
|
|
111
114
|
return result
|
|
115
|
+
|
|
116
|
+
def create_device_support(self) -> None:
|
|
117
|
+
device_support_path = Path('~/Library/Developer/Xcode/iOS DeviceSupport').expanduser()
|
|
118
|
+
device_support_path /= (f'{self.build_manifest.supported_product_types[0]} '
|
|
119
|
+
f'{self.build_manifest.product_version} ({self.build_manifest.product_build_version})')
|
|
120
|
+
build_identity = self.build_manifest.build_identities[0]
|
|
121
|
+
symbols_path = device_support_path / 'Symbols'
|
|
122
|
+
build_identity.extract_dsc(symbols_path)
|
|
123
|
+
for file in (symbols_path / 'private/preboot/Cryptexes/OS/System/Library/Caches/com.apple.dyld').iterdir():
|
|
124
|
+
file.unlink()
|
|
125
|
+
(device_support_path / 'Info.plist').write_bytes(plistlib.dumps({
|
|
126
|
+
'DSC Extractor Version': '1228.0.0.0.0',
|
|
127
|
+
'DateCollected': datetime.now(),
|
|
128
|
+
'Version': '16.0',
|
|
129
|
+
}))
|
|
130
|
+
(device_support_path / '.finalized').write_bytes(plistlib.dumps({}))
|
|
131
|
+
(device_support_path / '.processed_dyld_shared_cache_arm64e').touch()
|
|
132
|
+
(device_support_path / '.processing_lock').touch()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|