ipsw-parser 1.2.3__tar.gz → 1.3.1__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.
Files changed (32) hide show
  1. {ipsw_parser-1.2.3 → ipsw_parser-1.3.1}/.github/workflows/python-app.yml +7 -11
  2. ipsw_parser-1.3.1/.pre-commit-config.yaml +14 -0
  3. {ipsw_parser-1.2.3 → ipsw_parser-1.3.1}/PKG-INFO +1 -1
  4. {ipsw_parser-1.2.3 → ipsw_parser-1.3.1}/ipsw_parser/_version.py +2 -2
  5. {ipsw_parser-1.2.3 → ipsw_parser-1.3.1}/ipsw_parser/build_identity.py +11 -11
  6. {ipsw_parser-1.2.3 → ipsw_parser-1.3.1}/ipsw_parser.egg-info/PKG-INFO +1 -1
  7. {ipsw_parser-1.2.3 → ipsw_parser-1.3.1}/ipsw_parser.egg-info/SOURCES.txt +1 -0
  8. {ipsw_parser-1.2.3 → ipsw_parser-1.3.1}/.gitattributes +0 -0
  9. {ipsw_parser-1.2.3 → ipsw_parser-1.3.1}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  10. {ipsw_parser-1.2.3 → ipsw_parser-1.3.1}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  11. {ipsw_parser-1.2.3 → ipsw_parser-1.3.1}/.github/workflows/codeql.yml +0 -0
  12. {ipsw_parser-1.2.3 → ipsw_parser-1.3.1}/.github/workflows/python-publish.yml +0 -0
  13. {ipsw_parser-1.2.3 → ipsw_parser-1.3.1}/.gitignore +0 -0
  14. {ipsw_parser-1.2.3 → ipsw_parser-1.3.1}/CODE_OF_CONDUCT.md +0 -0
  15. {ipsw_parser-1.2.3 → ipsw_parser-1.3.1}/LICENSE +0 -0
  16. {ipsw_parser-1.2.3 → ipsw_parser-1.3.1}/README.md +0 -0
  17. {ipsw_parser-1.2.3 → ipsw_parser-1.3.1}/ipsw_parser/__init__.py +0 -0
  18. {ipsw_parser-1.2.3 → ipsw_parser-1.3.1}/ipsw_parser/__main__.py +0 -0
  19. {ipsw_parser-1.2.3 → ipsw_parser-1.3.1}/ipsw_parser/build_manifest.py +0 -0
  20. {ipsw_parser-1.2.3 → ipsw_parser-1.3.1}/ipsw_parser/component.py +0 -0
  21. {ipsw_parser-1.2.3 → ipsw_parser-1.3.1}/ipsw_parser/exceptions.py +0 -0
  22. {ipsw_parser-1.2.3 → ipsw_parser-1.3.1}/ipsw_parser/firmware.py +0 -0
  23. {ipsw_parser-1.2.3 → ipsw_parser-1.3.1}/ipsw_parser/img4.py +0 -0
  24. {ipsw_parser-1.2.3 → ipsw_parser-1.3.1}/ipsw_parser/ipsw.py +0 -0
  25. {ipsw_parser-1.2.3 → ipsw_parser-1.3.1}/ipsw_parser.egg-info/dependency_links.txt +0 -0
  26. {ipsw_parser-1.2.3 → ipsw_parser-1.3.1}/ipsw_parser.egg-info/entry_points.txt +0 -0
  27. {ipsw_parser-1.2.3 → ipsw_parser-1.3.1}/ipsw_parser.egg-info/requires.txt +0 -0
  28. {ipsw_parser-1.2.3 → ipsw_parser-1.3.1}/ipsw_parser.egg-info/top_level.txt +0 -0
  29. {ipsw_parser-1.2.3 → ipsw_parser-1.3.1}/pyproject.toml +0 -0
  30. {ipsw_parser-1.2.3 → ipsw_parser-1.3.1}/pytest.ini +0 -0
  31. {ipsw_parser-1.2.3 → ipsw_parser-1.3.1}/requirements.txt +0 -0
  32. {ipsw_parser-1.2.3 → ipsw_parser-1.3.1}/setup.cfg +0 -0
@@ -14,7 +14,7 @@ jobs:
14
14
  strategy:
15
15
  matrix:
16
16
  python-version: [ 3.8, 3.9, "3.10", "3.11" ]
17
- os: [ ubuntu-latest, macos-latest, windows-latest ]
17
+ os: [ macos-latest ]
18
18
 
19
19
  steps:
20
20
  - uses: actions/checkout@v2
@@ -22,20 +22,16 @@ jobs:
22
22
  uses: actions/setup-python@v2
23
23
  with:
24
24
  python-version: ${{ matrix.python-version }}
25
- - name: Lint with flake8
25
+ - name: Install dependencies
26
26
  run: |
27
- python -m pip install flake8
28
- # stop the build if there are Python syntax errors or undefined names
29
- flake8 . --count --select=E9,F63,F7,F82,F401,E741 --show-source --statistics
30
- # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
31
- flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
32
- - name: Verify sorted imports
27
+ brew install blacktop/tap/ipsw
28
+ python3 -m pip install --upgrade pip
29
+ python3 -m pip install pre-commit
30
+ - name: Run pre-commit hooks
33
31
  run: |
34
- python -m pip install isort
35
- isort . -m HANGING_INDENT -l 120 --check-only
32
+ pre-commit run --all-files
36
33
  - name: Test install
37
34
  run: |
38
- python -m pip install --upgrade pip
39
35
  python -m pip install -U .
40
36
  - name: Test show usage
41
37
  run: |
@@ -0,0 +1,14 @@
1
+ repos:
2
+ - repo: https://github.com/pre-commit/mirrors-isort
3
+ rev: v5.9.3
4
+ hooks:
5
+ - id: isort
6
+ args: [ '-m', 'HANGING_INDENT', '-l', '120','--check-only' ]
7
+ files: \.py$
8
+
9
+ - repo: https://github.com/pycqa/flake8
10
+ rev: "7.0.0"
11
+ hooks:
12
+ - id: flake8
13
+ args: [ '--count', '--select=E9,F63,F7,F82,F401,E741', '--show-source', '--statistics', '--max-complexity=10', '--max-line-length=127' ]
14
+ files: \.py$
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ipsw-parser
3
- Version: 1.2.3
3
+ Version: 1.3.1
4
4
  Summary: python3 utility for parsing and extracting data from IPSW
5
5
  Author-email: doronz88 <doron88@gmail.com>
6
6
  Maintainer-email: doronz88 <doron88@gmail.com>
@@ -12,5 +12,5 @@ __version__: str
12
12
  __version_tuple__: VERSION_TUPLE
13
13
  version_tuple: VERSION_TUPLE
14
14
 
15
- __version__ = version = '1.2.3'
16
- __version_tuple__ = version_tuple = (1, 2, 3)
15
+ __version__ = version = '1.3.1'
16
+ __version_tuple__ = version_tuple = (1, 3, 1)
@@ -6,7 +6,7 @@ from tempfile import TemporaryDirectory
6
6
  from typing import List, Mapping
7
7
 
8
8
  from cached_property import cached_property
9
- from plumbum import CommandNotFound, local
9
+ from plumbum import local
10
10
 
11
11
  from ipsw_parser.component import Component
12
12
 
@@ -14,17 +14,22 @@ logger = logging.getLogger(__name__)
14
14
 
15
15
 
16
16
  def _extract_dmg(buf: bytes, output: Path) -> None:
17
+ ipsw = local['ipsw']
17
18
  hdiutil = local['hdiutil']
18
-
19
19
  # darwin system statistically have problems cleaning up after detaching the mountpoint
20
20
  with TemporaryDirectory() as temp_dir:
21
21
  temp_dir = Path(temp_dir)
22
-
23
22
  mnt = temp_dir / 'mnt'
24
23
  mnt.mkdir()
25
-
26
24
  dmg = temp_dir / 'image.dmg'
27
- dmg.write_bytes(buf)
25
+
26
+ if buf.startswith(b'AEA1'):
27
+ logger.debug('Found Apple Encrypted Archive. Decrypting...')
28
+ dmg_aea = Path(str(dmg) + '.aea')
29
+ dmg_aea.write_bytes(buf)
30
+ ipsw('fw', 'aea', dmg_aea, '-o', temp_dir)
31
+ else:
32
+ dmg.write_bytes(buf)
28
33
 
29
34
  hdiutil('attach', '-mountpoint', mnt, dmg)
30
35
 
@@ -110,6 +115,7 @@ class BuildIdentity(UserDict):
110
115
  parameters['RequiresUIDMode'] = requires_uid_mode
111
116
 
112
117
  def extract(self, output: Path) -> None:
118
+ ipsw = local['ipsw']
113
119
  logger.info(f'extracting into: {output}')
114
120
 
115
121
  build_identity = self.build_manifest.build_identities[0]
@@ -139,12 +145,6 @@ class BuildIdentity(UserDict):
139
145
  logger.info(f'extracting {name} into: {cryptex_path}')
140
146
  _extract_dmg(build_identity.get_component(name).data, cryptex_path)
141
147
 
142
- try:
143
- ipsw = local['ipsw']
144
- except CommandNotFound:
145
- logger.warning('skipping DSC split since no blacktop/ipsw could not be found in path')
146
- return
147
-
148
148
  dsc_paths = [output / 'System/Library/Caches/com.apple.dyld/dyld_shared_cache_arm64',
149
149
  output / 'System/Library/Caches/com.apple.dyld/dyld_shared_cache_arm64e',
150
150
  output / 'System/Cryptexes/OS/System/Library/Caches/com.apple.dyld/dyld_shared_cache_arm64',
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ipsw-parser
3
- Version: 1.2.3
3
+ Version: 1.3.1
4
4
  Summary: python3 utility for parsing and extracting data from IPSW
5
5
  Author-email: doronz88 <doron88@gmail.com>
6
6
  Maintainer-email: doronz88 <doron88@gmail.com>
@@ -1,5 +1,6 @@
1
1
  .gitattributes
2
2
  .gitignore
3
+ .pre-commit-config.yaml
3
4
  CODE_OF_CONDUCT.md
4
5
  LICENSE
5
6
  README.md
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes